Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Instrument get_metadata_for_events for tracing #13730

Merged
merged 3 commits into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/13730.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Instrument `get_metadata_for_events` for understandable traces in Jaeger.
2 changes: 2 additions & 0 deletions synapse/storage/databases/main/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from synapse.api.room_versions import KNOWN_ROOM_VERSIONS, RoomVersion
from synapse.events import EventBase
from synapse.events.snapshot import EventContext
from synapse.logging.opentracing import trace
from synapse.storage._base import SQLBaseStore
from synapse.storage.database import (
DatabasePool,
Expand Down Expand Up @@ -142,6 +143,7 @@ def get_room_version_id_txn(self, txn: LoggingTransaction, room_id: str) -> str:

return room_version

@trace
async def get_metadata_for_events(
self, event_ids: Collection[str]
) -> Dict[str, EventMetadata]:
Expand Down