summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/handlers/presence.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 86b94ab84b..c3cfc9441d 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -46,6 +46,9 @@ metrics = synapse.metrics.get_metrics_for(__name__)
 
 notified_presence_counter = metrics.register_counter("notified_presence")
 presence_updates_counter = metrics.register_counter("presence_updates")
+presence_updates_counter = metrics.register_counter("presence_updates")
+timers_fired_counter = metrics.register_counter("timers_fired")
+federation_presence_counter = metrics.register_counter("federation_presence")
 
 
 # If a user was last active in the last LAST_ACTIVE_GRANULARITY, consider them
@@ -276,6 +279,8 @@ class PresenceHandler(BaseHandler):
             for user_id in set(users_to_check)
         ]
 
+        timers_fired_counter.inc_by(len(states))
+
         changes = handle_timeouts(
             states,
             is_mine_fn=self.hs.is_mine_id,
@@ -507,6 +512,7 @@ class PresenceHandler(BaseHandler):
             updates.append(prev_state.copy_and_replace(**new_fields))
 
         if updates:
+            federation_presence_counter.inc_by(len(updates))
             yield self._update_states(updates)
 
     @defer.inlineCallbacks