diff options
author | Eric Eastwood <erice@element.io> | 2022-08-16 12:39:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-16 12:39:40 -0500 |
commit | 0a4efbc1ddc3a58a6d75ad5d4d960b9ed367481e (patch) | |
tree | 323829e05d63712953bf4c901d07519612cc3e51 /synapse/storage/controllers/state.py | |
parent | Merge branch 'master' into develop (diff) | |
download | synapse-0a4efbc1ddc3a58a6d75ad5d4d960b9ed367481e.tar.xz |
Instrument the federation/backfill part of `/messages` (#13489)
Instrument the federation/backfill part of `/messages` so it's easier to follow what's going on in Jaeger when viewing a trace. Split out from https://github.com/matrix-org/synapse/pull/13440 Follow-up from https://github.com/matrix-org/synapse/pull/13368 Part of https://github.com/matrix-org/synapse/issues/13356
Diffstat (limited to 'synapse/storage/controllers/state.py')
-rw-r--r-- | synapse/storage/controllers/state.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/storage/controllers/state.py b/synapse/storage/controllers/state.py index 0c78eb735e..1ad002f57b 100644 --- a/synapse/storage/controllers/state.py +++ b/synapse/storage/controllers/state.py @@ -29,7 +29,7 @@ from typing import ( from synapse.api.constants import EventTypes from synapse.events import EventBase -from synapse.logging.opentracing import trace +from synapse.logging.opentracing import tag_args, trace from synapse.storage.roommember import ProfileInfo from synapse.storage.state import StateFilter from synapse.storage.util.partial_state_events_tracker import ( @@ -229,6 +229,7 @@ class StateStorageController: return {event: event_to_state[event] for event in event_ids} @trace + @tag_args async def get_state_ids_for_events( self, event_ids: Collection[str], @@ -333,6 +334,7 @@ class StateStorageController: ) @trace + @tag_args async def get_state_group_for_events( self, event_ids: Collection[str], @@ -474,6 +476,7 @@ class StateStorageController: prev_stream_id, max_stream_id ) + @trace async def get_current_state( self, room_id: str, state_filter: Optional[StateFilter] = None ) -> StateMap[EventBase]: |