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

pub trait GenericTracer: Debug + 'static {
    fn invalid_boxed(&self) -> Box<dyn Span>;
fn start_boxed(
        &self,
        name: &str,
        parent: Option<SpanContext>
    ) -> Box<dyn Span>;
fn build_boxed(&self, builder: SpanBuilder) -> Box<dyn Span>;
fn get_active_span_boxed(&self) -> Box<dyn Span>;
fn mark_span_as_active_boxed(&self, span: &dyn Span);
fn mark_span_as_inactive_boxed(&self, span_id: SpanId);
fn clone_span_boxed(&self, span: &dyn Span) -> Box<dyn Span>; }

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>

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

fn start_boxed(&self, name: &str, parent: Option<SpanContext>) -> Box<dyn Span>

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

fn build_boxed(&self, builder: SpanBuilder) -> Box<dyn Span>

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

fn get_active_span_boxed(&self) -> Box<dyn Span>

Returns the currently active span as a BoxedSpan

fn mark_span_as_active_boxed(&self, span: &dyn Span)

Returns the currently active span as a BoxedSpan

fn mark_span_as_inactive_boxed(&self, span_id: SpanId)

Marks the current span as inactive

fn clone_span_boxed(&self, span: &dyn Span) -> Box<dyn Span>

Clone span

Loading content...

Implementors

impl<S, T> GenericTracer for T where
    S: Span,
    T: Tracer<Span = S>, 
[src]

fn invalid_boxed(&self) -> Box<dyn Span>[src]

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

fn start_boxed(&self, name: &str, parent: Option<SpanContext>) -> Box<dyn Span>[src]

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

fn build_boxed(&self, builder: SpanBuilder) -> Box<dyn Span>[src]

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

fn get_active_span_boxed(&self) -> Box<dyn Span>[src]

Returns the current active span.

fn mark_span_as_active_boxed(&self, some_span: &dyn Span)[src]

Mark span as active.

fn mark_span_as_inactive_boxed(&self, span_id: SpanId)[src]

Mark span as inactive.

fn clone_span_boxed(&self, some_span: &dyn Span) -> Box<dyn Span>[src]

Clone span

Loading content...