Additional missing tracing spans on state_res::resolve components.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2026-01-25 23:51:00 +00:00
parent 23a3e87e93
commit daa869fced
7 changed files with 35 additions and 7 deletions

View File

@@ -24,6 +24,7 @@ use crate::utils::stream::{IterStream, ReadyExt};
/// ## Returns
///
/// Outputs the event IDs that are not present in all the auth chains.
#[tracing::instrument(level = "debug", skip_all)]
pub(super) fn auth_difference<'a, AuthSets, Id>(auth_sets: AuthSets) -> impl Stream<Item = Id>
where
AuthSets: Stream<Item = AuthSet<Id>>,

View File

@@ -25,6 +25,7 @@ struct Local {
stack: Vec<Vec<OwnedEventId>>,
}
#[tracing::instrument(name = "conflicted_subgraph", level = "debug", skip_all)]
pub(super) fn conflicted_subgraph_dfs<ConflictedEventIds, Fetch, Fut, Pdu>(
conflicted_event_ids: ConflictedEventIds,
fetch: &Fetch,
@@ -65,6 +66,15 @@ where
.flatten_stream()
}
#[tracing::instrument(
name = "descent",
level = "trace",
skip_all,
fields(
event_id = %conflicted_event_id,
event_ids = conflicted_event_ids.len(),
)
)]
async fn subgraph_descent<Fetch, Fut, Pdu>(
state: Arc<Global>,
conflicted_event_id: OwnedEventId,

View File

@@ -79,11 +79,11 @@ where
#[tracing::instrument(
name = "check",
level = "debug",
level = "trace",
skip_all,
fields(
%event_id,
%state_key,
?state_key,
)
)]
async fn auth_check<Fetch, Fut, Pdu>(

View File

@@ -98,6 +98,7 @@ where
/// Add the event with the given event ID and all the events in its auth chain
/// that are in the full conflicted set to the graph.
#[tracing::instrument(
name = "auth_chain",
level = "trace",
skip_all,
fields(
@@ -182,6 +183,7 @@ where
/// Returns the power level of the sender of the event or an `Err(_)` if one of
/// the auth events if malformed.
#[tracing::instrument(
name = "sender_power",
level = "trace",
skip_all,
fields(

View File

@@ -25,6 +25,7 @@ use crate::validated;
/// ## Returns
///
/// Returns an `(unconflicted_state, conflicted_states)` tuple.
#[tracing::instrument(name = "split", level = "debug", skip_all)]
pub(super) async fn split_conflicted_state<'a, Maps, Id>(
state_maps: Maps,
) -> (StateMap<Id>, StateMap<Vec<Id>>)