pub struct Span { /* private fields */ }
trace
only.Expand description
Single operation within a trace.
Implementations
Convert information in this span into exporter::trace::SpanData
.
This function copies all data from the current span, which will create a
overhead.
Trait Implementations
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>>,
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.
Returns the SpanContext
for the given Span
.
Returns true if this Span
is recording information like events with the add_event
operation, attributes using set_attributes
, status with set_status
, etc.
Always returns false after span end
.
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.
Sets the status of the Span
. If used, this will override the default Span
status, which is Unset
. message
MUST be ignored when the status is OK
or Unset
Updates the Span
’s name.
Finishes the span with given timestamp.
An API to record events in the context of a given Span
. Read more
Convenience method to record an exception/error as an Event
Read more
Convenience method to record a exception/error as an Event
with custom stacktrace Read more