MCPcopy Create free account
hub / github.com/hashintel/hash / span_trace

Function span_trace

libs/error-stack/src/fmt/hook.rs:532–543  ·  view source on GitHub ↗
(span_trace: &SpanTrace, context: &mut HookContext<SpanTrace>)

Source from the content-addressed store, hash-verified

530
531 #[cfg(feature = "spantrace")]
532 fn span_trace(span_trace: &SpanTrace, context: &mut HookContext<SpanTrace>) {
533 let idx = context.increment_counter();
534
535 let mut span = 0;
536 span_trace.with_spans(|_, _| {
537 span += 1;
538 true
539 });
540
541 context.push_appendix(format!("span trace No. {}\n{span_trace}", idx + 1));
542 context.push_body(format!("span trace with {span} frames ({})", idx + 1));
543 }
544}

Callers

nothing calls this directly

Calls 2

push_appendixMethod · 0.80
push_bodyMethod · 0.80

Tested by

no test coverage detected