mirror of
https://github.com/element-hq/synapse
synced 2024-09-05 22:20:06 +00:00
Add presence metric
This commit is contained in:
parent
be799453aa
commit
4a95eb0a12
1 changed files with 3 additions and 0 deletions
|
@ -48,6 +48,7 @@ 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")
|
timers_fired_counter = metrics.register_counter("timers_fired")
|
||||||
federation_presence_counter = metrics.register_counter("federation_presence")
|
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
|
# 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()
|
user_id = user.to_string()
|
||||||
|
|
||||||
|
bump_active_time_counter.inc()
|
||||||
|
|
||||||
prev_state = yield self.current_state_for_user(user_id)
|
prev_state = yield self.current_state_for_user(user_id)
|
||||||
|
|
||||||
new_fields = {
|
new_fields = {
|
||||||
|
|
Loading…
Reference in a new issue