Add user_id to v3 sync span; add span for sync token association.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-07-27 03:58:31 +00:00
parent 730920b571
commit 8c8985e8f2
3 changed files with 5 additions and 0 deletions

View File

@@ -115,6 +115,7 @@ type PresenceUpdates = HashMap<OwnedUserId, PresenceEventContent>;
level = "debug", level = "debug",
skip_all, skip_all,
fields( fields(
user_id = %body.sender_user(),
since = %body.body.since.as_deref().unwrap_or_default(), since = %body.body.since.as_deref().unwrap_or_default(),
) )
)] )]

View File

@@ -103,13 +103,16 @@ impl crate::Service for Service {
impl Service { impl Service {
#[inline] #[inline]
#[tracing::instrument(level = "trace", skip(self))]
pub async fn wait_pending(&self) -> Result<u64> { self.db.wait_pending().await } pub async fn wait_pending(&self) -> Result<u64> { self.db.wait_pending().await }
#[inline] #[inline]
#[tracing::instrument(level = "trace", skip(self))]
pub async fn wait_count(&self, count: &u64) -> Result<u64> { self.db.wait_count(count).await } pub async fn wait_count(&self, count: &u64) -> Result<u64> { self.db.wait_count(count).await }
#[inline] #[inline]
#[must_use] #[must_use]
#[tracing::instrument(level = "debug", skip(self))]
pub fn next_count(&self) -> data::Permit { self.db.next_count() } pub fn next_count(&self) -> data::Permit { self.db.next_count() }
#[inline] #[inline]

View File

@@ -97,6 +97,7 @@ pub async fn last_notification_read(&self, user_id: &UserId, room_id: &RoomId) -
} }
#[implement(Service)] #[implement(Service)]
#[tracing::instrument(level = "trace", skip(self))]
pub async fn associate_token_shortstatehash( pub async fn associate_token_shortstatehash(
&self, &self,
room_id: &RoomId, room_id: &RoomId,