pub struct BoxedTracer(/* private fields */);
trace
only.Expand description
Wraps the GlobalTracerProvider
’s Tracer
so it can be used generically by
applications without knowing the underlying type.
Trait Implementations§
Source§impl Debug for BoxedTracer
impl Debug for BoxedTracer
Source§impl Tracer for BoxedTracer
impl Tracer for BoxedTracer
Source§type Span = BoxedSpan
Available on crate feature trace
only.
type Span = BoxedSpan
trace
only.Global tracer uses BoxedSpan
s so that it can be a global singleton,
which is not possible if it takes generic type parameters.
Source§fn start_with_context<T>(&self, name: T, parent_cx: &Context) -> Self::Span
Available on crate feature trace
only.
fn start_with_context<T>(&self, name: T, parent_cx: &Context) -> Self::Span
trace
only.Starts a new Span
.
Each span has zero or one parent spans and zero or more child spans, which represent causally related operations. A tree of related spans comprises a trace. A span is said to be a root span if it does not have a parent. Each trace includes a single root span, which is the shared ancestor of all other spans in the trace.
Source§fn span_builder<T>(&self, name: T) -> SpanBuilder
Available on crate feature trace
only.
fn span_builder<T>(&self, name: T) -> SpanBuilder
trace
only.Creates a span builder
An ergonomic way for attributes to be configured before the Span
is started.
Source§fn build_with_context(
&self,
builder: SpanBuilder,
parent_cx: &Context,
) -> Self::Span
Available on crate feature trace
only.
fn build_with_context( &self, builder: SpanBuilder, parent_cx: &Context, ) -> Self::Span
trace
only.Create a span from a SpanBuilder
Source§fn start<T>(&self, name: T) -> Self::Span
fn start<T>(&self, name: T) -> Self::Span
trace
only.Span
. Read moreSource§fn build(&self, builder: SpanBuilder) -> Self::Span
fn build(&self, builder: SpanBuilder) -> Self::Span
trace
only.Auto Trait Implementations§
impl Freeze for BoxedTracer
impl !RefUnwindSafe for BoxedTracer
impl Send for BoxedTracer
impl Sync for BoxedTracer
impl Unpin for BoxedTracer
impl !UnwindSafe for BoxedTracer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
trace
only.Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
trace
only.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<S, T> ObjectSafeTracer for T
impl<S, T> ObjectSafeTracer for T
Source§fn start_with_context_boxed(
&self,
name: Cow<'static, str>,
parent_cx: &Context,
) -> Box<dyn ObjectSafeSpan + Sync + Send>
fn start_with_context_boxed( &self, name: Cow<'static, str>, parent_cx: &Context, ) -> Box<dyn ObjectSafeSpan + Sync + Send>
Returns a trait object so the underlying implementation can be swapped out at runtime.
Source§fn build_with_context_boxed(
&self,
builder: SpanBuilder,
parent_cx: &Context,
) -> Box<dyn ObjectSafeSpan + Sync + Send>
fn build_with_context_boxed( &self, builder: SpanBuilder, parent_cx: &Context, ) -> Box<dyn ObjectSafeSpan + Sync + Send>
Returns a trait object so the underlying implementation can be swapped out at runtime.