Compare commits

...

3 Commits

Author SHA1 Message Date
Eric Eastwood
2c8d28cb9e Add changelog 2024-09-11 19:46:15 -05:00
Eric Eastwood
c00ae2d6cd Merge branch 'develop' into madlittlemods/trace-get_sliding_sync_rooms_for_user 2024-09-11 19:45:28 -05:00
Eric Eastwood
be3d17ac95 Trace get_sliding_sync_rooms_for_user(...) 2024-09-11 10:51:59 -05:00
2 changed files with 7 additions and 3 deletions

1
changelog.d/17700.misc Normal file
View File

@@ -0,0 +1 @@
Add tracing to `get_sliding_sync_rooms_for_user(...)`.

View File

@@ -220,9 +220,12 @@ class SlidingSyncRoomLists:
# include rooms that are outside the list ranges.
all_rooms: Set[str] = set()
room_membership_for_user_map = await self.store.get_sliding_sync_rooms_for_user(
user_id
)
# We can't trace the function directly because it's cached and the `@cached`
# decorator doesn't mix with `@trace` yet.
with start_active_span("get_sliding_sync_rooms_for_user"):
room_membership_for_user_map = (
await self.store.get_sliding_sync_rooms_for_user(user_id)
)
changes = await self._get_rewind_changes_to_current_membership_to_token(
sync_config.user, room_membership_for_user_map, to_token=to_token