pub trait SpanExtension {
// Provided methods
fn register_default<S>(span_ref: &SpanRef<'_, S>)
where S: Subscriber + for<'a> LookupSpan<'a>,
Self: Default + Send + Sync + 'static { ... }
fn register_value<S>(initial_value: Self, span_ref: &SpanRef<'_, S>)
where S: Subscriber + for<'a> LookupSpan<'a>,
Self: Send + Sync + Sized + 'static { ... }
fn record_attrs<S>(span_ref: &SpanRef<'_, S>, attrs: &Attributes<'_>)
where S: Subscriber + for<'a> LookupSpan<'a>,
Self: Visit + Sized + 'static { ... }
}Expand description
Trait for a span extension
Provided Methods§
Sourcefn register_default<S>(span_ref: &SpanRef<'_, S>)
fn register_default<S>(span_ref: &SpanRef<'_, S>)
Registers an extension with default values
Sourcefn register_value<S>(initial_value: Self, span_ref: &SpanRef<'_, S>)
fn register_value<S>(initial_value: Self, span_ref: &SpanRef<'_, S>)
Registers an extension with initial value
Sourcefn record_attrs<S>(span_ref: &SpanRef<'_, S>, attrs: &Attributes<'_>)
fn record_attrs<S>(span_ref: &SpanRef<'_, S>, attrs: &Attributes<'_>)
Records the span attributes for the extension