Macro holochain::prelude::kitsune_p2p::dependencies::kitsune_p2p_types::dependencies::ghost_actor::dependencies::observability::span_context
source · macro_rules! span_context {
(current, $lvl:expr) => { ... };
($span:expr, $lvl:expr) => { ... };
($span:expr) => { ... };
() => { ... };
}
Expand description
Emit a tracing event with the context of a span.
Usage
span_context!()
will emit a trace event with the current span.span_context!(current, Level::DEBUG)
will emit a debug event with the current span.- Pass a span in and emit a trace event:
let span = tracing::debug_span!("my_pan");
span_context!(span)
- Pass a span in and emit a warn event:
let span = tracing::debug_span!("my_pan");
span_context!(span, tracing::Level::WARN)