Additional missing tracing spans on state_res::resolve components.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -13,7 +13,14 @@ use tuwunel_core::{
|
||||
use crate::rooms::state_compressor::CompressedState;
|
||||
|
||||
#[implement(super::Service)]
|
||||
#[tracing::instrument(name = "resolve", level = "debug", skip_all)]
|
||||
#[tracing::instrument(
|
||||
name = "state",
|
||||
level = "debug",
|
||||
skip_all,
|
||||
fields(
|
||||
incoming = ?incoming_state.len()
|
||||
),
|
||||
)]
|
||||
pub async fn resolve_state(
|
||||
&self,
|
||||
room_id: &RoomId,
|
||||
@@ -64,7 +71,7 @@ pub async fn resolve_state(
|
||||
|
||||
trace!("Resolving state");
|
||||
let state = self
|
||||
.state_resolution(room_version, fork_states, auth_chain_sets)
|
||||
.state_resolution(room_id, room_version, fork_states, auth_chain_sets)
|
||||
.await?;
|
||||
|
||||
trace!("State resolution done.");
|
||||
@@ -96,8 +103,15 @@ pub async fn resolve_state(
|
||||
}
|
||||
|
||||
#[implement(super::Service)]
|
||||
#[tracing::instrument(
|
||||
name = "resolve",
|
||||
level = "debug",
|
||||
skip_all,
|
||||
fields(%room_id),
|
||||
)]
|
||||
pub(super) async fn state_resolution<StateSets, AuthSets>(
|
||||
&self,
|
||||
room_id: &RoomId,
|
||||
room_version: &RoomVersionId,
|
||||
state_sets: StateSets,
|
||||
auth_chains: AuthSets,
|
||||
|
||||
@@ -17,7 +17,7 @@ use crate::rooms::short::ShortStateHash;
|
||||
// TODO: if we know the prev_events of the incoming event we can avoid the
|
||||
#[implement(super::Service)]
|
||||
// request and build the state from a known point and resolve if > 1 prev_event
|
||||
#[tracing::instrument(name = "state", level = "debug", skip_all)]
|
||||
#[tracing::instrument(name = "state1", level = "debug", skip_all)]
|
||||
pub(super) async fn state_at_incoming_degree_one<Pdu>(
|
||||
&self,
|
||||
incoming_pdu: &Pdu,
|
||||
@@ -96,7 +96,7 @@ where
|
||||
}
|
||||
|
||||
#[implement(super::Service)]
|
||||
#[tracing::instrument(name = "state", level = "debug", skip_all)]
|
||||
#[tracing::instrument(name = "stateN", level = "debug", skip_all)]
|
||||
pub(super) async fn state_at_incoming_resolved<Pdu>(
|
||||
&self,
|
||||
incoming_pdu: &Pdu,
|
||||
@@ -149,7 +149,7 @@ where
|
||||
|
||||
trace!("Resolving state");
|
||||
let Ok(new_state) = self
|
||||
.state_resolution(room_version, fork_states, auth_chain_sets)
|
||||
.state_resolution(room_id, room_version, fork_states, auth_chain_sets)
|
||||
.inspect_ok(|_| trace!("State resolution done."))
|
||||
.await
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user