summary refs log tree commit diff
path: root/synapse/rest/client/v2_alpha/keys.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/rest/client/v2_alpha/keys.py')
-rw-r--r--synapse/rest/client/v2_alpha/keys.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/synapse/rest/client/v2_alpha/keys.py b/synapse/rest/client/v2_alpha/keys.py
index 8de9e12df4..40052e7a05 100644
--- a/synapse/rest/client/v2_alpha/keys.py
+++ b/synapse/rest/client/v2_alpha/keys.py
@@ -25,11 +25,7 @@ from synapse.http.servlet import (
     parse_string,
 )
 from synapse.types import StreamToken
-from synapse.util.tracerutils import (
-    TracerUtil,
-    trace_defered_function_using_operation_name,
-)
-
+import synapse.util.tracerutils as tracerutils
 from ._base import client_patterns
 
 logger = logging.getLogger(__name__)
@@ -72,7 +68,7 @@ class KeyUploadServlet(RestServlet):
         self.auth = hs.get_auth()
         self.e2e_keys_handler = hs.get_e2e_keys_handler()
 
-    @trace_defered_function_using_operation_name("upload_keys")
+    @tracerutils.trace_defered_function_using_operation_name("upload_keys")
     @defer.inlineCallbacks
     def on_POST(self, request, device_id):
         requester = yield self.auth.get_user_by_req(request, allow_guest=True)
@@ -83,8 +79,8 @@ class KeyUploadServlet(RestServlet):
             # passing the device_id here is deprecated; however, we allow it
             # for now for compatibility with older clients.
             if requester.device_id is not None and device_id != requester.device_id:
-                TracerUtil.set_tag("error", True)
-                TracerUtil.log_kv(
+                tracerutils.set_tag("error", True)
+                tracerutils.log_kv(
                     {
                         "message": "Client uploading keys for a different device",
                         "logged_in_id": requester.device_id,