Struct opentelemetry::trace::noop::NoopSpan
source · pub struct NoopSpan { /* private fields */ }
Available on crate feature
trace
only.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, Global>)where
T: Into<Cow<'static, str>>,
fn add_event<T>(&mut self, _name: T, _attributes: Vec<KeyValue, Global>)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, Global>
)where
T: Into<Cow<'static, str>>,
fn add_event_with_timestamp<T>( &mut self, _name: T, _timestamp: SystemTime, _attributes: Vec<KeyValue, Global> )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, _status: Status)
fn set_status(&mut self, _status: Status)
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_error(&mut self, err: &dyn Error)
fn record_error(&mut self, err: &dyn Error)
Record an error as an event for this span. Read more
source§fn set_attributes(&mut self, attributes: impl IntoIterator<Item = KeyValue>)
fn set_attributes(&mut self, attributes: impl IntoIterator<Item = KeyValue>)
Set multiple attributes of this span. Read more