pub struct NoopSpan { /* private fields */ }
Expand description
A no-op instance of a Span
.
Implementations
Trait Implementations
sourceimpl Span for NoopSpan
impl Span for NoopSpan
sourcefn add_event_with_timestamp(
&mut self,
_name: String,
_timestamp: SystemTime,
_attributes: Vec<KeyValue>
)
fn add_event_with_timestamp(
&mut self,
_name: String,
_timestamp: SystemTime,
_attributes: Vec<KeyValue>
)
Ignores all events with timestamps
sourcefn span_context(&self) -> &SpanContext
fn span_context(&self) -> &SpanContext
Returns an invalid SpanContext
.
sourcefn is_recording(&self) -> bool
fn is_recording(&self) -> bool
Returns false, signifying that this span is never recording.
sourcefn set_attribute(&mut self, _attribute: KeyValue)
fn set_attribute(&mut self, _attribute: KeyValue)
Ignores all attributes
sourcefn set_status(&mut self, _code: StatusCode, _message: String)
fn set_status(&mut self, _code: StatusCode, _message: String)
Ignores status
sourcefn update_name(&mut self, _new_name: String)
fn update_name(&mut self, _new_name: String)
Ignores name updates
sourcefn end_with_timestamp(&mut self, _timestamp: SystemTime)
fn end_with_timestamp(&mut self, _timestamp: SystemTime)
Ignores Span
endings
sourcefn record_exception(&mut self, err: &dyn Error)
fn record_exception(&mut self, err: &dyn Error)
Convenience method to record an exception/error as an
Event
Read moresourcefn record_exception_with_stacktrace(
&mut self,
err: &dyn Error,
stacktrace: String
)
fn record_exception_with_stacktrace(
&mut self,
err: &dyn Error,
stacktrace: String
)
Convenience method to record a exception/error as an
Event
with custom stacktrace Read moreAuto Trait Implementations
impl RefUnwindSafe for NoopSpan
impl Send for NoopSpan
impl Sync for NoopSpan
impl Unpin for NoopSpan
impl UnwindSafe for NoopSpan
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