Struct opentelemetry::trace::noop::NoopTracer
source · pub struct NoopTracer { /* private fields */ }
Expand description
A no-op instance of a Tracer
.
Implementations§
source§impl NoopTracer
impl NoopTracer
Trait Implementations§
source§impl Clone for NoopTracer
impl Clone for NoopTracer
source§fn clone(&self) -> NoopTracer
fn clone(&self) -> NoopTracer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NoopTracer
impl Debug for NoopTracer
source§impl Default for NoopTracer
impl Default for NoopTracer
source§fn default() -> NoopTracer
fn default() -> NoopTracer
Returns the “default value” for a type. Read more
source§impl Tracer for NoopTracer
impl Tracer for NoopTracer
source§fn 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>>,
Starts a new NoopSpan
with a given context.
If the context contains a valid span, it’s span context is propagated.
source§fn 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>>,
Starts a SpanBuilder
.
source§fn build_with_context(
&self,
_builder: SpanBuilder,
parent_cx: &Context
) -> Self::Span
fn build_with_context( &self, _builder: SpanBuilder, parent_cx: &Context ) -> Self::Span
Builds a NoopSpan
from a SpanBuilder
.
If the span builder or the context’s current span contains a valid span context, it is propagated.
source§fn start<T>(&self, name: T) -> Self::Spanwhere
T: Into<Cow<'static, str>>,
fn start<T>(&self, name: T) -> Self::Spanwhere T: Into<Cow<'static, str>>,
Starts a new
Span
. Read moresource§fn build(&self, builder: SpanBuilder) -> Self::Span
fn build(&self, builder: SpanBuilder) -> Self::Span
Create a span from a SpanBuilder
Auto Trait Implementations§
impl RefUnwindSafe for NoopTracer
impl Send for NoopTracer
impl Sync for NoopTracer
impl Unpin for NoopTracer
impl UnwindSafe for NoopTracer
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
Mutably borrows from an owned value. Read more
source§impl<S, T> ObjectSafeTracer for Twhere
S: Span + Send + Sync + 'static,
T: Tracer<Span = S>,
impl<S, T> ObjectSafeTracer for Twhere S: Span + Send + Sync + 'static, T: Tracer<Span = S>,
source§fn start_with_context_boxed(
&self,
name: Cow<'static, str>,
parent_cx: &Context
) -> Box<dyn ObjectSafeSpan + Send + Sync>
fn start_with_context_boxed( &self, name: Cow<'static, str>, parent_cx: &Context ) -> Box<dyn ObjectSafeSpan + Send + Sync>
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 + Send + Sync>
fn build_with_context_boxed( &self, builder: SpanBuilder, parent_cx: &Context ) -> Box<dyn ObjectSafeSpan + Send + Sync>
Returns a trait object so the underlying implementation can be swapped out at runtime.