Improve tracing spans for notif counts and sliding-sync exts.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user