pub struct SpanInfo {Show 14 fields
pub id: String,
pub name: String,
pub cpu_duration: u64,
pub corrected_duration: u64,
pub start_relative_to_parent: i64,
pub end_relative_to_parent: i64,
pub args: Vec<(String, String)>,
pub is_aggregated: bool,
pub count: Option<u64>,
pub total_cpu_duration: Option<u64>,
pub avg_cpu_duration: Option<u64>,
pub total_corrected_duration: Option<u64>,
pub avg_corrected_duration: Option<u64>,
pub first_span_id: Option<String>,
}Expand description
Information about a single span (or aggregated group of spans).
Fields§
§id: StringSpan ID string.
The format encodes both the type and the navigation path:
- A raw span leaf is its decimal index:
"123". - An aggregated span leaf is
"a"+ the first-span index:"a123". - When the span is a child of another span, the parent’s ID is prepended with a dash
separator, e.g.
"a5-a34"or"1-a5-a34-20".
Pass the full ID as the parent option of the next query_spans call
to enumerate the children of that span.
name: StringDisplay name: "category title" or just "title".
cpu_duration: u64Raw CPU total time in internal ticks (100 ticks = 1 µs).
For aggregated spans, this is the first (example) span’s value, not the group total.
See total_cpu_duration for the group total.
corrected_duration: u64Concurrency-corrected total time in internal ticks.
For aggregated spans, this is the first (example) span’s value, not the group total.
See total_corrected_duration for the group total.
start_relative_to_parent: i64Start of span relative to parent start, in internal ticks.
end_relative_to_parent: i64End of span relative to parent start, in internal ticks.
args: Vec<(String, String)>Key-value attributes from the span.
is_aggregated: boolTrue if this entry represents an aggregated group of spans.
count: Option<u64>Number of spans in the group (only set for aggregated spans).
total_cpu_duration: Option<u64>Sum of cpu_duration across all spans in the group.
avg_cpu_duration: Option<u64>Average cpu_duration across all spans in the group.
total_corrected_duration: Option<u64>Sum of corrected_duration across all spans in the group.
avg_corrected_duration: Option<u64>Average corrected_duration across all spans in the group.
first_span_id: Option<String>Raw span ID for aggregated groups (the index of the first span).
Auto Trait Implementations§
impl Freeze for SpanInfo
impl RefUnwindSafe for SpanInfo
impl Send for SpanInfo
impl Sync for SpanInfo
impl Unpin for SpanInfo
impl UnsafeUnpin for SpanInfo
impl UnwindSafe for SpanInfo
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more