summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2022-08-03 10:57:38 -0500
committerGitHub <noreply@github.com>2022-08-03 10:57:38 -0500
commit92d21faf12c982a8d27ad465eb94f2fed0e8b32f (patch)
tree92575050ec2751e404df3328020ad73eeb1c3d81 /synapse/api/auth.py
parentReturn 404 or member list when getting joined_members after leaving (#13374) (diff)
downloadsynapse-92d21faf12c982a8d27ad465eb94f2fed0e8b32f.tar.xz
Instrument `/messages` for understandable traces in Jaeger (#13368)
In Jaeger:

 - Before: huge list of uncategorized database calls
 - After: nice and collapsible into units of work
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r--synapse/api/auth.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index 82e6475ef5..523bad0c55 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -31,7 +31,12 @@ from synapse.api.errors import (
 from synapse.appservice import ApplicationService
 from synapse.http import get_request_user_agent
 from synapse.http.site import SynapseRequest
-from synapse.logging.opentracing import active_span, force_tracing, start_active_span
+from synapse.logging.opentracing import (
+    active_span,
+    force_tracing,
+    start_active_span,
+    trace,
+)
 from synapse.storage.databases.main.registration import TokenLookupResult
 from synapse.types import Requester, UserID, create_requester
 
@@ -567,6 +572,7 @@ class Auth:
 
             return query_params[0].decode("ascii")
 
+    @trace
     async def check_user_in_room_or_world_readable(
         self, room_id: str, user_id: str, allow_departed_users: bool = False
     ) -> Tuple[str, Optional[str]]: