From 8e64b1840d2cc3f05aa44fffa499c628e21c8c3f Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Tue, 16 Jul 2019 13:39:17 -0400 Subject: [PATCH] added errors key to metrics tracking --- lbry/lbry/wallet/server/db/reader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lbry/lbry/wallet/server/db/reader.py b/lbry/lbry/wallet/server/db/reader.py index 820a970f5..97b72553e 100644 --- a/lbry/lbry/wallet/server/db/reader.py +++ b/lbry/lbry/wallet/server/db/reader.py @@ -91,7 +91,9 @@ def measure(func): state = ctx.get() if not state.is_tracking_metrics: return func(*args, **kwargs) - metric = state.metrics.setdefault(func.__name__, {'calls': 0, 'total': 0, 'isolated': 0}) + metric = state.metrics.setdefault(func.__name__, { + 'calls': 0, 'total': 0, 'isolated': 0, 'errors': 0 + }) state.stack.append([]) start = time.perf_counter() try: