diff options
author | Jorik Schellekens <joriksch@gmail.com> | 2019-09-03 10:21:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-03 10:21:30 +0100 |
commit | a90d16dabc6f498136a098568b1d37858d4af5b6 (patch) | |
tree | c8f5e2e1750a594b8986ff07823c31f69712f6f8 /synapse/handlers/devicemessage.py | |
parent | Remove unused methods from c/s api v1 in register.py (#5963) (diff) | |
download | synapse-a90d16dabc6f498136a098568b1d37858d4af5b6.tar.xz |
Opentrace device lists (#5853)
Trace device list changes.
Diffstat (limited to 'synapse/handlers/devicemessage.py')
-rw-r--r-- | synapse/handlers/devicemessage.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/devicemessage.py b/synapse/handlers/devicemessage.py index c7d56779b8..01731cb2d0 100644 --- a/synapse/handlers/devicemessage.py +++ b/synapse/handlers/devicemessage.py @@ -22,6 +22,7 @@ from twisted.internet import defer from synapse.api.errors import SynapseError from synapse.logging.opentracing import ( get_active_span_text_map, + log_kv, set_tag, start_active_span, whitelisted_homeserver, @@ -86,7 +87,8 @@ class DeviceMessageHandler(object): @defer.inlineCallbacks def send_device_message(self, sender_user_id, message_type, messages): - + set_tag("number_of_messages", len(messages)) + set_tag("sender", sender_user_id) local_messages = {} remote_messages = {} for user_id, by_device in messages.items(): @@ -124,6 +126,7 @@ class DeviceMessageHandler(object): else None, } + log_kv({"local_messages": local_messages}) stream_id = yield self.store.add_messages_to_device_inbox( local_messages, remote_edu_contents ) @@ -132,6 +135,7 @@ class DeviceMessageHandler(object): "to_device_key", stream_id, users=local_messages.keys() ) + log_kv({"remote_messages": remote_messages}) for destination in remote_messages.keys(): # Enqueue a new federation transaction to send the new # device messages to each remote destination. |