Function tracing::collect::set_default
source · [−]pub fn set_default<C>(collector: C) -> DefaultGuard where
C: Collect + Send + Sync + 'static,
Available on crate feature
std
only.Expand description
Sets the collector as the default for the duration of the lifetime of the
returned DefaultGuard
The default collector is used when creating a new Span
or
Event
, if no span is currently executing. If a span is currently
executing, new spans or events are dispatched to the collector that
tagged that span, instead.