diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-07-19 14:14:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-19 14:14:30 -0400 |
commit | a6895dd576f96d7fd086fb4128d48ac8a3f098c5 (patch) | |
tree | 464b6f0f02bf9f134e8ebd34dd0f0ae5e88439e1 /synapse/rest/client/sync.py | |
parent | Merge branch 'master' into develop (diff) | |
download | synapse-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/rest/client/sync.py')
-rw-r--r-- | synapse/rest/client/sync.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/rest/client/sync.py b/synapse/rest/client/sync.py index 8bbf35148d..c2989765ce 100644 --- a/synapse/rest/client/sync.py +++ b/synapse/rest/client/sync.py @@ -37,7 +37,7 @@ from synapse.handlers.sync import ( from synapse.http.server import HttpServer from synapse.http.servlet import RestServlet, parse_boolean, parse_integer, parse_string from synapse.http.site import SynapseRequest -from synapse.logging.opentracing import trace +from synapse.logging.opentracing import trace_with_opname from synapse.types import JsonDict, StreamToken from synapse.util import json_decoder @@ -210,7 +210,7 @@ class SyncRestServlet(RestServlet): logger.debug("Event formatting complete") return 200, response_content - @trace(opname="sync.encode_response") + @trace_with_opname("sync.encode_response") async def encode_response( self, time_now: int, @@ -315,7 +315,7 @@ class SyncRestServlet(RestServlet): ] } - @trace(opname="sync.encode_joined") + @trace_with_opname("sync.encode_joined") async def encode_joined( self, rooms: List[JoinedSyncResult], @@ -340,7 +340,7 @@ class SyncRestServlet(RestServlet): return joined - @trace(opname="sync.encode_invited") + @trace_with_opname("sync.encode_invited") async def encode_invited( self, rooms: List[InvitedSyncResult], @@ -371,7 +371,7 @@ class SyncRestServlet(RestServlet): return invited - @trace(opname="sync.encode_knocked") + @trace_with_opname("sync.encode_knocked") async def encode_knocked( self, rooms: List[KnockedSyncResult], @@ -420,7 +420,7 @@ class SyncRestServlet(RestServlet): return knocked - @trace(opname="sync.encode_archived") + @trace_with_opname("sync.encode_archived") async def encode_archived( self, rooms: List[ArchivedSyncResult], |