diff --git a/core/core/metrics.py b/core/core/metrics.py index 2b1f4a6..b46fb37 100644 --- a/core/core/metrics.py +++ b/core/core/metrics.py @@ -12,8 +12,6 @@ class ItemCountCollector(object): def collect(self): counter = CounterMetricFamily("item_count", "Current number of items", labels=['event', 'returned_state']) - yield counter - if not apps.models_ready or not apps.apps_ready: return @@ -53,8 +51,6 @@ class TicketCountCollector(object): yield counter -try: - REGISTRY.register(ItemCountCollector()) - REGISTRY.register(TicketCountCollector()) -except Exception as e: - print(e) + +REGISTRY.register(ItemCountCollector()) +REGISTRY.register(TicketCountCollector())