Skip to content
Snippets Groups Projects
Commit 89ac1fa8 authored by Paul "LeoNerd" Evans's avatar Paul "LeoNerd" Evans
Browse files

Add a counter to track total number of events served by the notifier

parent 2e4f0b2b
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,8 @@ logger = logging.getLogger(__name__) ...@@ -28,6 +28,8 @@ logger = logging.getLogger(__name__)
metrics = synapse.metrics.get_metrics_for(__name__) metrics = synapse.metrics.get_metrics_for(__name__)
notified_events_counter = metrics.register_counter("notified_events")
# TODO(paul): Should be shared somewhere # TODO(paul): Should be shared somewhere
def count(func, l): def count(func, l):
...@@ -72,6 +74,7 @@ class _NotificationListener(object): ...@@ -72,6 +74,7 @@ class _NotificationListener(object):
try: try:
self.deferred.callback(result) self.deferred.callback(result)
notified_events_counter.inc_by(len(events))
except defer.AlreadyCalledError: except defer.AlreadyCalledError:
pass pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment