Trait opentelemetry::global::GenericTracer [−][src]
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>; }
Allows a specific Tracer
to be used generically by BoxedTracer
instances by mirroring the interface and boxing the return types.
Required methods
fn invalid_boxed(&self) -> Box<dyn Span + Send + Sync>
[src]
Create a new invalid span for use in cases where there are no active spans.
fn start_with_context_boxed(
&self,
name: Cow<'static, str>,
cx: Context
) -> Box<dyn Span + Send + Sync>
[src]
&self,
name: Cow<'static, str>,
cx: Context
) -> Box<dyn Span + Send + Sync>
Returns a trait object so the underlying implementation can be swapped out at runtime.
fn build_boxed(&self, builder: SpanBuilder) -> Box<dyn Span + Send + Sync>
[src]
Returns a trait object so the underlying implementation can be swapped out at runtime.
Implementors
impl<S, T> GenericTracer for T where
S: Span + Send + Sync + 'static,
T: Tracer<Span = S>,
[src]
impl<S, T> GenericTracer for T where
S: Span + Send + Sync + 'static,
T: Tracer<Span = S>,
[src]fn invalid_boxed(&self) -> Box<dyn Span + Send + Sync>
[src]
fn invalid_boxed(&self) -> Box<dyn Span + Send + Sync>
[src]Create a new invalid span for use in cases where there are no active spans.
fn start_with_context_boxed(
&self,
name: Cow<'static, str>,
cx: Context
) -> Box<dyn Span + Send + Sync>
[src]
fn start_with_context_boxed(
&self,
name: Cow<'static, str>,
cx: Context
) -> Box<dyn Span + Send + Sync>
[src]Returns a trait object so the underlying implementation can be swapped out at runtime.
fn build_boxed(&self, builder: SpanBuilder) -> Box<dyn Span + Send + Sync>
[src]
fn build_boxed(&self, builder: SpanBuilder) -> Box<dyn Span + Send + Sync>
[src]Returns a trait object so the underlying implementation can be swapped out at runtime.