SpanExtension

Trait SpanExtension 

Source
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§

Source

fn register_default<S>(span_ref: &SpanRef<'_, S>)
where S: Subscriber + for<'a> LookupSpan<'a>, Self: Default + Send + Sync + 'static,

Registers an extension with default values

Source

fn register_value<S>(initial_value: Self, span_ref: &SpanRef<'_, S>)
where S: Subscriber + for<'a> LookupSpan<'a>, Self: Send + Sync + Sized + 'static,

Registers an extension with initial value

Source

fn record_attrs<S>(span_ref: &SpanRef<'_, S>, attrs: &Attributes<'_>)
where S: Subscriber + for<'a> LookupSpan<'a>, Self: Visit + Sized + 'static,

Records the span attributes for the extension

Implementors§