Struct opentelemetry::trace::SpanRef [−][src]
pub struct SpanRef<'a>(_);
trace
only.Expand description
A reference to the currently active span in this context.
Implementations
An API to record events in the context of a given Span
.
Convenience method to record an exception/error as an Event
Convenience method to record a exception/error as an Event
with custom stacktrace
pub fn add_event_with_timestamp(
&self,
name: String,
timestamp: SystemTime,
attributes: Vec<KeyValue>
)
pub fn add_event_with_timestamp(
&self,
name: String,
timestamp: SystemTime,
attributes: Vec<KeyValue>
)
An API to record events at a specific time in the context of a given Span
.
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.
An API to set a single Attribute
where the attribute properties are passed
as arguments. To avoid extra allocations some implementations may offer a separate API for
each of the possible value types.
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. After this update, any sampling behavior based on the
name will depend on the implementation.
Finishes the Span
with given timestamp