From a7e6bcb366eda6cda9a4cba042ac6df8aafe6bdb Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Sun, 22 May 2022 12:11:24 -0400 Subject: [PATCH] fix metric --- hub/herald/session.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hub/herald/session.py b/hub/herald/session.py index 83745a0..d452eea 100644 --- a/hub/herald/session.py +++ b/hub/herald/session.py @@ -878,8 +878,6 @@ class LBRYElectrumX(asyncio.Protocol): """Handle an incoming request. ElectrumX doesn't receive notifications from client sessions. """ - self.session_manager.request_count_metric.labels(method=request.method).inc() - if isinstance(request, Request): method = request.method if method == 'blockchain.block.get_chunk': @@ -958,6 +956,7 @@ class LBRYElectrumX(asyncio.Protocol): raise RPCError(JSONRPC.METHOD_NOT_FOUND, f'unknown method "{method}"') else: raise ValueError + self.session_manager.request_count_metric.labels(method=request.method).inc() if isinstance(request.args, dict): return await coro(**request.args) return await coro(*request.args)