Trait tracing_record_hierarchical::SpanExt
source · pub trait SpanExt: Sealed {
// Required methods
fn record_hierarchical<Q, V>(&self, field: &Q, value: V) -> &Self
where Q: AsField + Display + ?Sized,
V: Value;
fn must_record_hierarchical<Q, V>(&self, field: &Q, value: V) -> &Self
where Q: AsField + Display + ?Sized,
V: Value;
}
Expand description
Extension of a tracing::Span
providing more ergonomic handling of
tracing::Span::record
s.
Required Methods§
sourcefn record_hierarchical<Q, V>(&self, field: &Q, value: V) -> &Self
fn record_hierarchical<Q, V>(&self, field: &Q, value: V) -> &Self
Same as tracing::Span::record()
, but ensures that the provided
field
’s value
will be written into the first tracing::Span
with
this field
up by hierarchy.
sourcefn must_record_hierarchical<Q, V>(&self, field: &Q, value: V) -> &Self
fn must_record_hierarchical<Q, V>(&self, field: &Q, value: V) -> &Self
Same as SpanExt::record_hierarchical()
, but panics.
Panics
In case none of tracing::Span
s in the hierarchy has the provided
field
.
Object Safety§
This trait is not object safe.