opentelemetry::global

Trait ObjectSafeTracerProvider

Source
pub trait ObjectSafeTracerProvider {
    // Required method
    fn boxed_tracer(
        &self,
        scope: InstrumentationScope,
    ) -> Box<dyn ObjectSafeTracer + Send + Sync>;
}
Available on crate feature trace only.
Expand description

Allows a specific TracerProvider to be used generically by the GlobalTracerProvider by mirroring the interface and boxing the return types.

Required Methods§

Source

fn boxed_tracer( &self, scope: InstrumentationScope, ) -> Box<dyn ObjectSafeTracer + Send + Sync>

Creates a versioned named tracer instance that is a trait object through the underlying TracerProvider.

Implementors§

Source§

impl<S, T, P> ObjectSafeTracerProvider for P
where S: Span + Send + Sync + 'static, T: Tracer<Span = S> + Send + Sync + 'static, P: TracerProvider<Tracer = T>,