Struct opentelemetry::trace::noop::NoopSpan   
source · pub struct NoopSpan { /* private fields */ }Expand description
A no-op instance of a Span.
Implementations§
Trait Implementations§
source§impl Span for NoopSpan
 
impl Span for NoopSpan
source§fn add_event<T>(&mut self, _name: T, _attributes: Vec<KeyValue>)where
    T: Into<Cow<'static, str>>,
 
fn add_event<T>(&mut self, _name: T, _attributes: Vec<KeyValue>)where T: Into<Cow<'static, str>>,
Ignores all events
source§fn add_event_with_timestamp<T>(
    &mut self,
    _name: T,
    _timestamp: SystemTime,
    _attributes: Vec<KeyValue>
)where
    T: Into<Cow<'static, str>>,
 
fn add_event_with_timestamp<T>( &mut self, _name: T, _timestamp: SystemTime, _attributes: Vec<KeyValue> )where T: Into<Cow<'static, str>>,
Ignores all events with timestamps
source§fn span_context(&self) -> &SpanContext
 
fn span_context(&self) -> &SpanContext
Returns an invalid SpanContext.
source§fn is_recording(&self) -> bool
 
fn is_recording(&self) -> bool
Returns false, signifying that this span is never recording.
source§fn set_attribute(&mut self, _attribute: KeyValue)
 
fn set_attribute(&mut self, _attribute: KeyValue)
Ignores all attributes
source§fn set_status(&mut self, _code: StatusCode, _message: String)
 
fn set_status(&mut self, _code: StatusCode, _message: String)
Ignores status
source§fn update_name<T>(&mut self, _new_name: T)where
    T: Into<Cow<'static, str>>,
 
fn update_name<T>(&mut self, _new_name: T)where T: Into<Cow<'static, str>>,
Ignores name updates
source§fn end_with_timestamp(&mut self, _timestamp: SystemTime)
 
fn end_with_timestamp(&mut self, _timestamp: SystemTime)
Ignores Span endings
source§fn 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 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§
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