summary refs log tree commit diff
path: root/synapse/replication/http
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-07-19 14:14:30 -0400
committerGitHub <noreply@github.com>2022-07-19 14:14:30 -0400
commita6895dd576f96d7fd086fb4128d48ac8a3f098c5 (patch)
tree464b6f0f02bf9f134e8ebd34dd0f0ae5e88439e1 /synapse/replication/http
parentMerge branch 'master' into develop (diff)
downloadsynapse-a6895dd576f96d7fd086fb4128d48ac8a3f098c5.tar.xz
Add type annotations to `trace` decorator. (#13328)
Functions that are decorated with `trace` are now properly typed
and the type hints for them are fixed.
Diffstat (limited to 'synapse/replication/http')
-rw-r--r--synapse/replication/http/_base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/replication/http/_base.py b/synapse/replication/http/_base.py
index a4ae4040c3..561ad5bf04 100644
--- a/synapse/replication/http/_base.py
+++ b/synapse/replication/http/_base.py
@@ -29,7 +29,7 @@ from synapse.http import RequestTimedOutError
 from synapse.http.server import HttpServer, is_method_cancellable
 from synapse.http.site import SynapseRequest
 from synapse.logging import opentracing
-from synapse.logging.opentracing import trace
+from synapse.logging.opentracing import trace_with_opname
 from synapse.types import JsonDict
 from synapse.util.caches.response_cache import ResponseCache
 from synapse.util.stringutils import random_string
@@ -196,7 +196,7 @@ class ReplicationEndpoint(metaclass=abc.ABCMeta):
                 "ascii"
             )
 
-        @trace(opname="outgoing_replication_request")
+        @trace_with_opname("outgoing_replication_request")
         async def send_request(*, instance_name: str = "master", **kwargs: Any) -> Any:
             with outgoing_gauge.track_inprogress():
                 if instance_name == local_instance_name: