#[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 moreSource§impl Debug for TracingEvent
impl Debug for TracingEvent
Source§impl<'de> Deserialize<'de> for TracingEvent
impl<'de> Deserialize<'de> for TracingEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for TracingEvent
impl RefUnwindSafe for TracingEvent
impl Send for TracingEvent
impl Sync for TracingEvent
impl Unpin for TracingEvent
impl UnwindSafe for TracingEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)