switch all tracing imports to observability::prelude

This commit is contained in:
Olivia Lee 2024-12-14 00:49:56 -08:00
parent bc5f31b3a2
commit 5fca67054e
No known key found for this signature in database
GPG key ID: 54D568A15B9CD1F9
63 changed files with 824 additions and 735 deletions

View file

@ -4,6 +4,7 @@ use ruma::{events::StateEventType, EventId, RoomId};
use crate::{
database::KeyValueDatabase,
observability::prelude::*,
service::{
self,
rooms::short::{
@ -14,7 +15,7 @@ use crate::{
};
impl service::rooms::short::Data for KeyValueDatabase {
#[tracing::instrument(skip(self))]
#[t::instrument(skip(self))]
fn get_or_create_shorteventid(
&self,
event_id: &EventId,
@ -40,7 +41,7 @@ impl service::rooms::short::Data for KeyValueDatabase {
Ok((ShortEventId::new(short), created))
}
#[tracing::instrument(skip(self), fields(cache_result))]
#[t::instrument(skip(self), fields(cache_result))]
fn get_shortstatekey(
&self,
event_type: &StateEventType,
@ -65,7 +66,7 @@ impl service::rooms::short::Data for KeyValueDatabase {
Ok(short)
}
#[tracing::instrument(skip(self))]
#[t::instrument(skip(self))]
fn get_or_create_shortstatekey(
&self,
event_type: &StateEventType,
@ -98,7 +99,7 @@ impl service::rooms::short::Data for KeyValueDatabase {
Ok((short, created))
}
#[tracing::instrument(skip(self))]
#[t::instrument(skip(self))]
fn get_eventid_from_short(
&self,
shorteventid: ShortEventId,
@ -124,7 +125,7 @@ impl service::rooms::short::Data for KeyValueDatabase {
Ok(event_id)
}
#[tracing::instrument(skip(self))]
#[t::instrument(skip(self))]
fn get_statekey_from_short(
&self,
shortstatekey: ShortStateKey,
@ -162,7 +163,7 @@ impl service::rooms::short::Data for KeyValueDatabase {
}
/// Returns `(shortstatehash, already_existed)`
#[tracing::instrument(skip(self))]
#[t::instrument(skip(self))]
fn get_or_create_shortstatehash(
&self,
state_hash: &[u8],