pub struct TraceDetail {
pub trace_id: String,
pub span_count: usize,
pub service_count: usize,
pub duration_us: i64,
pub services: Vec<String>,
pub spans: Vec<Span>,
}Expand description
Trace detail with pre-computed summary, returned by trace get.
Contains all spans for a single trace plus computed summary fields so AI Agents can assess the trace without iterating over all spans.
Fields§
§trace_id: StringThe queried trace ID.
span_count: usizeTotal number of spans in this trace.
service_count: usizeNumber of distinct services involved.
duration_us: i64End-to-end duration in microseconds.
services: Vec<String>List of distinct service names (sorted alphabetically).
spans: Vec<Span>All spans in the trace, sorted by start_time ascending.
Implementations§
Source§impl TraceDetail
impl TraceDetail
Sourcepub fn from_spans(trace_id: String, spans: Vec<Span>) -> Self
pub fn from_spans(trace_id: String, spans: Vec<Span>) -> Self
Compute a trace detail summary from a list of spans.
Spans are sorted by start_time ascending (ties broken by
duration_us descending for readability). Summary fields
are computed from the spans — the root span’s duration is used
if available, otherwise the time range from earliest start to
latest end is used.
Trait Implementations§
Source§impl Clone for TraceDetail
impl Clone for TraceDetail
Source§fn clone(&self) -> TraceDetail
fn clone(&self) -> TraceDetail
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TraceDetail
impl Debug for TraceDetail
Source§impl<'de> Deserialize<'de> for TraceDetail
impl<'de> Deserialize<'de> for TraceDetail
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TraceDetail
impl PartialEq for TraceDetail
Source§impl Serialize for TraceDetail
impl Serialize for TraceDetail
impl StructuralPartialEq for TraceDetail
Auto Trait Implementations§
impl Freeze for TraceDetail
impl RefUnwindSafe for TraceDetail
impl Send for TraceDetail
impl Sync for TraceDetail
impl Unpin for TraceDetail
impl UnsafeUnpin for TraceDetail
impl UnwindSafe for TraceDetail
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
Mutably borrows from an owned value. Read more