Struct opentelemetry::global::BoxedTracer
source · [−]pub struct BoxedTracer(_);
Expand description
Wraps the GlobalTracerProvider
’s Tracer
so it can be used generically by
applications without knowing the underlying type.
Trait Implementations
sourceimpl Debug for BoxedTracer
impl Debug for BoxedTracer
sourceimpl Tracer for BoxedTracer
impl Tracer for BoxedTracer
type Span = BoxedSpan
type Span = BoxedSpan
Global tracer uses BoxedSpan
s so that it can be a global singleton,
which is not possible if it takes generic type parameters.
sourcefn build_with_context(
&self,
builder: SpanBuilder,
parent_cx: &Context
) -> <BoxedTracer as Tracer>::Span
fn build_with_context(
&self,
builder: SpanBuilder,
parent_cx: &Context
) -> <BoxedTracer as Tracer>::Span
Create a span from a SpanBuilder
sourcefn start_with_context<T>(&self, name: T, parent_cx: &Context) -> Self::Spanwhere
T: Into<Cow<'static, str>>,
fn start_with_context<T>(&self, name: T, parent_cx: &Context) -> Self::Spanwhere
T: Into<Cow<'static, str>>,
sourcefn span_builder<T>(&self, name: T) -> SpanBuilderwhere
T: Into<Cow<'static, str>>,
fn span_builder<T>(&self, name: T) -> SpanBuilderwhere
T: Into<Cow<'static, str>>,
Creates a span builder. Read more
sourcefn build(&self, builder: SpanBuilder) -> Self::Span
fn build(&self, builder: SpanBuilder) -> Self::Span
Start a Span
from a SpanBuilder
.
Auto Trait Implementations
impl !RefUnwindSafe for BoxedTracer
impl Send for BoxedTracer
impl Sync for BoxedTracer
impl Unpin for BoxedTracer
impl !UnwindSafe for BoxedTracer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> FutureExt for T
impl<T> FutureExt for T
sourcefn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourcefn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<S, T> ObjectSafeTracer for Twhere
S: 'static + Span + Send + Sync,
T: Tracer<Span = S>,
impl<S, T> ObjectSafeTracer for Twhere
S: 'static + Span + Send + Sync,
T: Tracer<Span = S>,
sourcefn build_with_context_boxed(
&self,
builder: SpanBuilder,
parent_cx: &Context
) -> Box<dyn ObjectSafeSpan + Sync + Send + 'static, Global>
fn build_with_context_boxed(
&self,
builder: SpanBuilder,
parent_cx: &Context
) -> Box<dyn ObjectSafeSpan + Sync + Send + 'static, Global>
Returns a trait object so the underlying implementation can be swapped out at runtime.