diff --git a/lbry/lbry/wallet/server/metrics.py b/lbry/lbry/wallet/server/metrics.py index 1a55bd70c..95fd960bc 100644 --- a/lbry/lbry/wallet/server/metrics.py +++ b/lbry/lbry/wallet/server/metrics.py @@ -120,11 +120,11 @@ class ServerLoadData: self._apis[name] = APICallMetrics(name) return self._apis[name] - def to_json_and_reset(self, server): + def to_json_and_reset(self, status): try: return { 'api': {name: api.to_json_and_reset() for name, api in self._apis.items()}, - 'server': server + 'status': status } finally: self._apis = {} diff --git a/lbry/tests/unit/wallet/server/test_metrics.py b/lbry/tests/unit/wallet/server/test_metrics.py index b252953e9..63a2bc75f 100644 --- a/lbry/tests/unit/wallet/server/test_metrics.py +++ b/lbry/tests/unit/wallet/server/test_metrics.py @@ -59,4 +59,4 @@ class TestCollectingMetrics(unittest.TestCase): 'wait_avg': 12, 'wait_percentiles': (10, 10, 10, 12, 14, 15, 15) }}}) - self.assertEqual(load.to_json_and_reset({}), {'api': {}}) + self.assertEqual(load.to_json_and_reset({}), {'status': {}, 'api': {}})