Additional logging/tracing tweaks around sliding-sync.
Additional spans around receipt service interface. Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -94,7 +94,7 @@ pub(super) async fn collect(
|
||||
})
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "trace", skip_all, fields(room_id))]
|
||||
#[tracing::instrument(level = "trace", skip_all, fields(room_id), ret)]
|
||||
async fn collect_room(
|
||||
SyncInfo { services, sender_user, .. }: SyncInfo<'_>,
|
||||
conn: &Connection,
|
||||
|
||||
@@ -44,7 +44,7 @@ pub(super) async fn collect(
|
||||
Ok(response::Receipts { rooms })
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "trace", skip_all, fields(room_id))]
|
||||
#[tracing::instrument(level = "trace", skip_all, fields(room_id), ret)]
|
||||
async fn collect_room(
|
||||
SyncInfo { services, sender_user, .. }: SyncInfo<'_>,
|
||||
conn: &Connection,
|
||||
|
||||
@@ -29,9 +29,8 @@ pub(super) async fn selector(
|
||||
) -> (Window, ResponseLists) {
|
||||
use MembershipState::*;
|
||||
|
||||
let SyncInfo { services, sender_user, request, .. } = sync_info;
|
||||
let SyncInfo { services, sender_user, .. } = sync_info;
|
||||
|
||||
trace!(?request);
|
||||
let mut rooms = services
|
||||
.state_cache
|
||||
.user_memberships(sender_user, Some(&[Join, Invite, Knock]))
|
||||
@@ -64,7 +63,12 @@ pub(super) async fn selector(
|
||||
(window, lists)
|
||||
}
|
||||
|
||||
#[tracing::instrument(name = "window", level = "debug", skip_all)]
|
||||
#[tracing::instrument(
|
||||
name = "window",
|
||||
level = "debug",
|
||||
skip_all,
|
||||
fields(rooms = rooms.clone().count())
|
||||
)]
|
||||
async fn select_window<'a, Rooms>(
|
||||
sync_info: SyncInfo<'_>,
|
||||
conn: &Connection,
|
||||
|
||||
@@ -4,7 +4,7 @@ use tuwunel_core::{self, Result};
|
||||
|
||||
use super::{Connection, SyncInfo};
|
||||
|
||||
#[tracing::instrument(name = "to_device", level = "trace", skip_all)]
|
||||
#[tracing::instrument(name = "to_device", level = "trace", skip_all, ret)]
|
||||
pub(super) async fn collect(
|
||||
SyncInfo { services, sender_user, sender_device, .. }: SyncInfo<'_>,
|
||||
conn: &Connection,
|
||||
|
||||
@@ -13,7 +13,7 @@ use tuwunel_core::{
|
||||
|
||||
use super::{Connection, SyncInfo, Window, extension_rooms_selector};
|
||||
|
||||
#[tracing::instrument(name = "typing", level = "trace", skip_all)]
|
||||
#[tracing::instrument(name = "typing", level = "trace", skip_all, ret)]
|
||||
pub(super) async fn collect(
|
||||
sync_info: SyncInfo<'_>,
|
||||
conn: &Connection,
|
||||
|
||||
Reference in New Issue
Block a user