mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-22 12:44:30 +03:00
Some tracing
This commit is contained in:
parent
957cd77e95
commit
1ed790d67a
1 changed files with 6 additions and 0 deletions
|
@ -397,6 +397,7 @@ class DeviceHandler(DeviceWorkerHandler):
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
@opentracing.trace_defered_function
|
||||||
@measure_func("notify_device_update")
|
@measure_func("notify_device_update")
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def notify_device_update(self, user_id, device_ids):
|
def notify_device_update(self, user_id, device_ids):
|
||||||
|
@ -412,6 +413,8 @@ class DeviceHandler(DeviceWorkerHandler):
|
||||||
hosts.update(get_domain_from_id(u) for u in users_who_share_room)
|
hosts.update(get_domain_from_id(u) for u in users_who_share_room)
|
||||||
hosts.discard(self.server_name)
|
hosts.discard(self.server_name)
|
||||||
|
|
||||||
|
opentracing.set_tag("hosts to update", hosts)
|
||||||
|
|
||||||
position = yield self.store.add_device_change_to_streams(
|
position = yield self.store.add_device_change_to_streams(
|
||||||
user_id, device_ids, list(hosts)
|
user_id, device_ids, list(hosts)
|
||||||
)
|
)
|
||||||
|
@ -431,6 +434,9 @@ class DeviceHandler(DeviceWorkerHandler):
|
||||||
)
|
)
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
self.federation_sender.send_device_messages(host)
|
self.federation_sender.send_device_messages(host)
|
||||||
|
opentracing.log_kv(
|
||||||
|
{"message": "sent device update to host", "host": host}
|
||||||
|
)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def on_federation_query_user_devices(self, user_id):
|
def on_federation_query_user_devices(self, user_id):
|
||||||
|
|
Loading…
Reference in a new issue