Struct opentelemetry::global::BoxedSpan [−][src]
pub struct BoxedSpan(_);
Wraps the BoxedTracer
’s Span
so it can be used generically by
applications without knowing the underlying type.
Trait Implementations
impl Span for BoxedSpan
[src]
impl Span for BoxedSpan
[src]fn add_event_with_timestamp(
&mut self,
name: String,
timestamp: SystemTime,
attributes: Vec<KeyValue>
)
[src]
This is supported on crate feature trace
only.
fn add_event_with_timestamp(
&mut self,
name: String,
timestamp: SystemTime,
attributes: Vec<KeyValue>
)
[src]trace
only.Records events at a specific time in the context of a given Span
.
Note that the OpenTelemetry project documents certain “standard event names and keys” which have prescribed semantic meanings.
fn span_context(&self) -> &SpanContext
[src]
This is supported on crate feature trace
only.
fn span_context(&self) -> &SpanContext
[src]trace
only.Returns the SpanContext
for the given Span
.
fn is_recording(&self) -> bool
[src]
This is supported on crate feature trace
only.
fn is_recording(&self) -> bool
[src]trace
only.Returns true if this Span
is recording information like events with the add_event
operation, attributes using set_attributes
, status with set_status
, etc.
fn set_attribute(&mut self, attribute: KeyValue)
[src]
This is supported on crate feature trace
only.
fn set_attribute(&mut self, attribute: KeyValue)
[src]trace
only.Sets a single Attribute
where the attribute properties are passed as arguments.
Note that the OpenTelemetry project documents certain “standard attributes” that have prescribed semantic meanings.
fn set_status(&mut self, code: StatusCode, message: String)
[src]
This is supported on crate feature trace
only.
fn set_status(&mut self, code: StatusCode, message: String)
[src]trace
only.Sets the status of the Span
. If used, this will override the default Span
status, which is Unset
.
fn update_name(&mut self, new_name: String)
[src]
This is supported on crate feature trace
only.
fn update_name(&mut self, new_name: String)
[src]trace
only.Updates the Span
’s name.
fn end_with_timestamp(&mut self, timestamp: SystemTime)
[src]
This is supported on crate feature trace
only.
fn end_with_timestamp(&mut self, timestamp: SystemTime)
[src]trace
only.Finishes the span with given timestamp.
fn add_event(&mut self, name: String, attributes: Vec<KeyValue>)
[src]
fn add_event(&mut self, name: String, attributes: Vec<KeyValue>)
[src]trace
only.An API to record events in the context of a given Span
. Read more
fn record_exception(&mut self, err: &dyn Error)
[src]
fn record_exception(&mut self, err: &dyn Error)
[src]trace
only.Convenience method to record an exception/error as an Event
Read more
fn record_exception_with_stacktrace(
&mut self,
err: &dyn Error,
stacktrace: String
)
[src]
fn record_exception_with_stacktrace(
&mut self,
err: &dyn Error,
stacktrace: String
)
[src]trace
only.Convenience method to record a exception/error as an Event
with custom stacktrace Read more
Auto Trait Implementations
impl !RefUnwindSafe for BoxedSpan
impl Send for BoxedSpan
impl Sync for BoxedSpan
impl Unpin for BoxedSpan
impl !UnwindSafe for BoxedSpan
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,