mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 16:21:24 +01:00
switch all tracing imports to observability::prelude
This commit is contained in:
parent
bc5f31b3a2
commit
5fca67054e
63 changed files with 824 additions and 735 deletions
|
|
@ -21,11 +21,11 @@ use ruma::{
|
|||
},
|
||||
uint, JsOption, UInt, UserId,
|
||||
};
|
||||
use tracing::{debug, error};
|
||||
|
||||
use super::{load_timeline, share_encrypted_room};
|
||||
use crate::{
|
||||
service::rooms::timeline::PduCount, services, Ar, Error, Ra, Result,
|
||||
observability::prelude::*, service::rooms::timeline::PduCount, services,
|
||||
Ar, Error, Ra, Result,
|
||||
};
|
||||
|
||||
#[allow(clippy::too_many_lines)]
|
||||
|
|
@ -93,7 +93,7 @@ pub(crate) async fn sync_events_v4_route(
|
|||
let Some(current_shortstatehash) =
|
||||
services().rooms.state.get_room_shortstatehash(room_id)?
|
||||
else {
|
||||
error!(%room_id, "Room has no state");
|
||||
t::error!(%room_id, "Room has no state");
|
||||
continue;
|
||||
};
|
||||
|
||||
|
|
@ -171,7 +171,10 @@ pub(crate) async fn sync_events_v4_route(
|
|||
let Some(pdu) =
|
||||
services().rooms.timeline.get_pdu(&event_id)?
|
||||
else {
|
||||
error!(%event_id, "Event in state not found");
|
||||
t::error!(
|
||||
%event_id,
|
||||
"Event in state not found"
|
||||
);
|
||||
continue;
|
||||
};
|
||||
if pdu.kind == TimelineEventType::RoomMember {
|
||||
|
|
@ -450,7 +453,7 @@ pub(crate) async fn sync_events_v4_route(
|
|||
.map_or(Ok::<_, Error>(None), |(pdu_count, _)| {
|
||||
Ok(Some(match pdu_count {
|
||||
PduCount::Backfilled(_) => {
|
||||
error!("Timeline in backfill state?!");
|
||||
t::error!("Timeline in backfill state?!");
|
||||
"0".to_owned()
|
||||
}
|
||||
PduCount::Normal(c) => c.to_string(),
|
||||
|
|
@ -602,7 +605,7 @@ pub(crate) async fn sync_events_v4_route(
|
|||
}
|
||||
match tokio::time::timeout(duration, watcher).await {
|
||||
Ok(x) => x.expect("watcher should succeed"),
|
||||
Err(error) => debug!(%error, "Timed out"),
|
||||
Err(error) => t::debug!(%error, "Timed out"),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue