summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-02-19 11:32:04 +0000
committerErik Johnston <erik@matrix.org>2016-02-19 11:32:04 +0000
commit4a95eb0a1257087d7dce1493442e519dabc8d159 (patch)
tree45fdb964bb9fe7edb44296e65cdc7de92a794b83
parentRemove spurious extra metrics (diff)
downloadsynapse-4a95eb0a1257087d7dce1493442e519dabc8d159.tar.xz
Add presence metric
-rw-r--r--synapse/handlers/presence.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 8ef5ce1acd..4197311a97 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -48,6 +48,7 @@ notified_presence_counter = metrics.register_counter("notified_presence")
 presence_updates_counter = metrics.register_counter("presence_updates")
 timers_fired_counter = metrics.register_counter("timers_fired")
 federation_presence_counter = metrics.register_counter("federation_presence")
+bump_active_time_counter = metrics.register_counter("bump_active_time")
 
 
 # If a user was last active in the last LAST_ACTIVE_GRANULARITY, consider them
@@ -296,6 +297,8 @@ class PresenceHandler(BaseHandler):
         """
         user_id = user.to_string()
 
+        bump_active_time_counter.inc()
+
         prev_state = yield self.current_state_for_user(user_id)
 
         new_fields = {