summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2015-03-10 18:06:24 +0000
committerPaul "LeoNerd" Evans <paul@matrix.org>2015-03-12 16:24:51 +0000
commit89ac1fa8ba55c6cbb4f1888e0542d106209d9c2a (patch)
tree39beb34b0a552c2a75358755914ef1f9bf47891e /synapse
parentReplace the @metrics.counted annotations in federation with specifically-writ... (diff)
downloadsynapse-89ac1fa8ba55c6cbb4f1888e0542d106209d9c2a.tar.xz
Add a counter to track total number of events served by the notifier
Diffstat (limited to '')
-rw-r--r--synapse/notifier.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py
index 75e8152d03..88873d4534 100644
--- a/synapse/notifier.py
+++ b/synapse/notifier.py
@@ -28,6 +28,8 @@ logger = logging.getLogger(__name__)
 
 metrics = synapse.metrics.get_metrics_for(__name__)
 
+notified_events_counter = metrics.register_counter("notified_events")
+
 
 # TODO(paul): Should be shared somewhere
 def count(func, l):
@@ -72,6 +74,7 @@ class _NotificationListener(object):
 
         try:
             self.deferred.callback(result)
+            notified_events_counter.inc_by(len(events))
         except defer.AlreadyCalledError:
             pass