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/sendtodevice.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/sendtodevice.py')
-rw-r--r-- | synapse/rest/client/sendtodevice.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/client/sendtodevice.py b/synapse/rest/client/sendtodevice.py index 3322c8ef48..1a8e9a96d4 100644 --- a/synapse/rest/client/sendtodevice.py +++ b/synapse/rest/client/sendtodevice.py @@ -19,7 +19,7 @@ from synapse.http import servlet from synapse.http.server import HttpServer from synapse.http.servlet import assert_params_in_dict, parse_json_object_from_request from synapse.http.site import SynapseRequest -from synapse.logging.opentracing import set_tag, trace +from synapse.logging.opentracing import set_tag, trace_with_opname from synapse.rest.client.transactions import HttpTransactionCache from synapse.types import JsonDict @@ -43,7 +43,7 @@ class SendToDeviceRestServlet(servlet.RestServlet): self.txns = HttpTransactionCache(hs) self.device_message_handler = hs.get_device_message_handler() - @trace(opname="sendToDevice") + @trace_with_opname("sendToDevice") def on_PUT( self, request: SynapseRequest, message_type: str, txn_id: str ) -> Awaitable[Tuple[int, JsonDict]]: |