Enum tracing_tunnel::TracingEvent
source · #[non_exhaustive]pub enum TracingEvent {
NewCallSite {
id: MetadataId,
data: CallSiteData,
},
NewSpan {
id: RawSpanId,
parent_id: Option<RawSpanId>,
metadata_id: MetadataId,
values: TracedValues<String>,
},
FollowsFrom {
id: RawSpanId,
follows_from: RawSpanId,
},
SpanEntered {
id: RawSpanId,
},
SpanExited {
id: RawSpanId,
},
SpanCloned {
id: RawSpanId,
},
SpanDropped {
id: RawSpanId,
},
ValuesRecorded {
id: RawSpanId,
values: TracedValues<String>,
},
NewEvent {
metadata_id: MetadataId,
parent: Option<RawSpanId>,
values: TracedValues<String>,
},
}
Expand description
Event produced during tracing.
These events are emitted by a TracingEventSender
and then consumed
by a TracingEventReceiver
to pass tracing info across an API boundary.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NewCallSite
New call site.
Fields
id: MetadataId
Unique ID of the call site that will be used to refer to it in the following events.
data: CallSiteData
Information about the call site.
NewSpan
New tracing span.
Fields
parent_id: Option<RawSpanId>
Parent span ID. None
means using the contextual parent (i.e., the current span).
metadata_id: MetadataId
ID of the span metadata.
values: TracedValues<String>
Values associated with the span.
FollowsFrom
New “follows from” relation between spans.
SpanEntered
Span was entered.
SpanExited
Span was exited.
SpanCloned
Span was cloned.
SpanDropped
Span was dropped (aka closed).
ValuesRecorded
New values recorded for a span.
NewEvent
New event.
Fields
metadata_id: MetadataId
ID of the event metadata.
parent: Option<RawSpanId>
Parent span ID. None
means using the contextual parent (i.e., the current span).
values: TracedValues<String>
Values associated with the event.
Implementations§
source§impl TracingEvent
impl TracingEvent
sourcepub fn normalize(events: &mut [Self])
pub fn normalize(events: &mut [Self])
Normalizes a captured sequence of events so that it does not contain information that changes between program runs (e.g., metadata IDs) or due to minor refactoring (source code lines). Normalized events can be used for snapshot testing and other purposes when reproducibility is important.
Trait Implementations§
source§impl Clone for TracingEvent
impl Clone for TracingEvent
source§fn clone(&self) -> TracingEvent
fn clone(&self) -> TracingEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more