[][src]Trait opentelemetry::global::GenericTracer

pub trait GenericTracer: Debug + 'static {
    fn invalid_boxed(&self) -> Box<dyn Span + Send + Sync>;
fn start_with_context_boxed(
        &self,
        name: &str,
        cx: &Context
    ) -> Box<dyn Span + Send + Sync>;
fn build_with_context_boxed(
        &self,
        builder: SpanBuilder,
        cx: &Context
    ) -> 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>

Create a new invalid span for use in cases where there are no active spans.

fn start_with_context_boxed(
    &self,
    name: &str,
    cx: &Context
) -> Box<dyn Span + Send + Sync>

Returns a trait object so the underlying implementation can be swapped out at runtime.

fn build_with_context_boxed(
    &self,
    builder: SpanBuilder,
    cx: &Context
) -> Box<dyn Span + Send + Sync>

Returns a trait object so the underlying implementation can be swapped out at runtime.

Loading content...

Implementors

impl<S, T> GenericTracer for T where
    S: Span + Send + Sync,
    T: Tracer<Span = S>, 
[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: &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_with_context_boxed(
    &self,
    builder: SpanBuilder,
    cx: &Context
) -> Box<dyn Span + Send + Sync>
[src]

Returns a trait object so the underlying implementation can be swapped out at runtime.

Loading content...