[][src]Trait opentelemetry::global::BoxedTracer

pub trait BoxedTracer: Send + Sync {
    fn invalid_boxed(&self) -> Box<dyn Span>;
fn start_boxed(
        &self,
        name: &'static str,
        parent: Option<SpanContext>
    ) -> 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: u64); }

Boxed Tracer allows GlobalTracer's to contain and use a Tracer type object.

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: &'static str,
    parent: Option<SpanContext>
) -> 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: u64)

Marks the current span as inactive

Loading content...

Trait Implementations

impl Tracer for dyn BoxedTracer[src]

type Span = BoxedSpan

BoxedTracer returns a BoxedSpan so that it doesn't need a generic type parameter.

fn invalid(&self) -> Self::Span[src]

Returns an invalid boxed span

fn start(
    &self,
    name: &'static str,
    parent_span: Option<SpanContext>
) -> Self::Span
[src]

Starts a new boxed span.

fn get_active_span(&self) -> Self::Span[src]

Returns the current active span.

fn mark_span_as_active(&self, span: &Self::Span)[src]

Marks a given Span as active.

fn mark_span_as_inactive(&self, span_id: u64)[src]

Marks a given Span as inactive.

Implementations on Foreign Types

impl<S: Span + 'static> BoxedTracer for Box<dyn 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: &'static str,
    parent: Option<SpanContext>
) -> 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: u64)[src]

Mark span as inactive.

Loading content...

Implementors

Loading content...