summary refs log tree commit diff
path: root/synapse/storage/devices.py
diff options
context:
space:
mode:
authorJorik Schellekens <joriksch@gmail.com>2019-09-03 10:21:30 +0100
committerGitHub <noreply@github.com>2019-09-03 10:21:30 +0100
commita90d16dabc6f498136a098568b1d37858d4af5b6 (patch)
treec8f5e2e1750a594b8986ff07823c31f69712f6f8 /synapse/storage/devices.py
parentRemove unused methods from c/s api v1 in register.py (#5963) (diff)
downloadsynapse-a90d16dabc6f498136a098568b1d37858d4af5b6.tar.xz
Opentrace device lists (#5853)
Trace device list changes.
Diffstat (limited to 'synapse/storage/devices.py')
-rw-r--r--synapse/storage/devices.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/storage/devices.py b/synapse/storage/devices.py

index 76542c512d..41f62828bd 100644 --- a/synapse/storage/devices.py +++ b/synapse/storage/devices.py
@@ -23,6 +23,7 @@ from twisted.internet import defer from synapse.api.errors import StoreError from synapse.logging.opentracing import ( get_active_span_text_map, + set_tag, trace, whitelisted_homeserver, ) @@ -321,6 +322,7 @@ class DeviceWorkerStore(SQLBaseStore): def get_device_stream_token(self): return self._device_list_id_gen.get_current_token() + @trace @defer.inlineCallbacks def get_user_devices_from_cache(self, query_list): """Get the devices (and keys if any) for remote users from the cache. @@ -352,6 +354,9 @@ class DeviceWorkerStore(SQLBaseStore): else: results[user_id] = yield self._get_cached_devices_for_user(user_id) + set_tag("in_cache", results) + set_tag("not_in_cache", user_ids_not_in_cache) + return user_ids_not_in_cache, results @cachedInlineCallbacks(num_args=2, tree=True)