summary refs log tree commit diff
path: root/synapse/streams/events.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/streams/events.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/streams/events.py')
-rw-r--r--synapse/streams/events.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/streams/events.py b/synapse/streams/events.py
index 54e0b1a23b..bcd840bd88 100644
--- a/synapse/streams/events.py
+++ b/synapse/streams/events.py
@@ -21,6 +21,7 @@ from synapse.handlers.presence import PresenceEventSource
 from synapse.handlers.receipts import ReceiptEventSource
 from synapse.handlers.room import RoomEventSource
 from synapse.handlers.typing import TypingNotificationEventSource
+from synapse.logging.opentracing import trace
 from synapse.streams import EventSource
 from synapse.types import StreamToken
 
@@ -69,6 +70,7 @@ class EventSources:
         )
         return token
 
+    @trace
     async def get_current_token_for_pagination(self, room_id: str) -> StreamToken:
         """Get the current token for a given room to be used to paginate
         events.