Improve tracing spans for notif counts and sliding-sync exts.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-10-22 07:05:03 +00:00
parent 7cbc2ee385
commit e53968d9eb
7 changed files with 10 additions and 5 deletions

View File

@@ -35,6 +35,7 @@ impl crate::Service for Service {
}
#[implement(Service)]
#[tracing::instrument(level = "debug", skip(self))]
pub fn reset_notification_counts(&self, user_id: &UserId, room_id: &RoomId) {
let count = self.services.globals.next_count();
@@ -53,6 +54,7 @@ pub fn reset_notification_counts(&self, user_id: &UserId, room_id: &RoomId) {
}
#[implement(Service)]
#[tracing::instrument(level = "debug", skip(self), ret)]
pub async fn notification_count(&self, user_id: &UserId, room_id: &RoomId) -> u64 {
let key = (user_id, room_id);
self.db
@@ -64,6 +66,7 @@ pub async fn notification_count(&self, user_id: &UserId, room_id: &RoomId) -> u6
}
#[implement(Service)]
#[tracing::instrument(level = "debug", skip(self), ret)]
pub async fn highlight_count(&self, user_id: &UserId, room_id: &RoomId) -> u64 {
let key = (user_id, room_id);
self.db
@@ -75,6 +78,7 @@ pub async fn highlight_count(&self, user_id: &UserId, room_id: &RoomId) -> u64 {
}
#[implement(Service)]
#[tracing::instrument(level = "debug", skip(self), ret)]
pub async fn last_notification_read(&self, user_id: &UserId, room_id: &RoomId) -> u64 {
let key = (room_id, user_id);
self.db