Trait opentelemetry::global::GenericTracer
source · [−]pub trait GenericTracer: Debug + 'static {
fn invalid_boxed(&self) -> Box<dyn Span + Send + Sync>;
fn start_with_context_boxed(
&self,
name: Cow<'static, str>,
cx: Context
) -> Box<dyn Span + Send + Sync>;
fn build_boxed(&self, builder: SpanBuilder) -> Box<dyn Span + Send + Sync>;
}
Expand description
Allows a specific Tracer
to be used generically by BoxedTracer
instances by mirroring the interface and boxing the return types.
Required Methods
Create a new invalid span for use in cases where there are no active spans.
Returns a trait object so the underlying implementation can be swapped out at runtime.
sourcefn build_boxed(&self, builder: SpanBuilder) -> Box<dyn Span + Send + Sync>
fn build_boxed(&self, builder: SpanBuilder) -> Box<dyn Span + Send + Sync>
Returns a trait object so the underlying implementation can be swapped out at runtime.