mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-10 11:00:07 -04:00
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.
This commit is contained in:
parent
47822fd2e8
commit
a6895dd576
12 changed files with 102 additions and 55 deletions
|
@ -26,7 +26,7 @@ from synapse.http.servlet import (
|
|||
parse_string,
|
||||
)
|
||||
from synapse.http.site import SynapseRequest
|
||||
from synapse.logging.opentracing import log_kv, set_tag, trace
|
||||
from synapse.logging.opentracing import log_kv, set_tag, trace_with_opname
|
||||
from synapse.types import JsonDict, StreamToken
|
||||
|
||||
from ._base import client_patterns, interactive_auth_handler
|
||||
|
@ -71,7 +71,7 @@ class KeyUploadServlet(RestServlet):
|
|||
self.e2e_keys_handler = hs.get_e2e_keys_handler()
|
||||
self.device_handler = hs.get_device_handler()
|
||||
|
||||
@trace(opname="upload_keys")
|
||||
@trace_with_opname("upload_keys")
|
||||
async def on_POST(
|
||||
self, request: SynapseRequest, device_id: Optional[str]
|
||||
) -> Tuple[int, JsonDict]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue