pub struct Span<T: TraceData> {Show 15 fields
pub service: T::Text,
pub name: T::Text,
pub resource: T::Text,
pub type: T::Text,
pub trace_id: u128,
pub span_id: u64,
pub parent_id: u64,
pub start: i64,
pub duration: i64,
pub error: i32,
pub meta: HashMap<T::Text, T::Text>,
pub metrics: HashMap<T::Text, f64>,
pub meta_struct: HashMap<T::Text, T::Bytes>,
pub span_links: Vec<SpanLink<T>>,
pub span_events: Vec<SpanEvent<T>>,
}Expand description
The generic representation of a V04 span.
T is the type used to represent strings in the span, it can be either owned (e.g. BytesString)
or borrowed (e.g. &str). To define a generic function taking any Span<T> you can use the
[SpanValue] trait:
use libdd_trace_utils::span::{v04::Span, TraceData};
fn foo<T: TraceData>(span: Span<T>) {
let _ = span.meta.get("foo");
}Fields§
§service: T::Text§name: T::Text§resource: T::Text§type: T::Text§trace_id: u128§span_id: u64§parent_id: u64§start: i64§duration: i64§error: i32§meta: HashMap<T::Text, T::Text>§metrics: HashMap<T::Text, f64>§meta_struct: HashMap<T::Text, T::Bytes>§span_links: Vec<SpanLink<T>>§span_events: Vec<SpanEvent<T>>Trait Implementations§
impl<T: TraceData> StructuralPartialEq for Span<T>
Auto Trait Implementations§
impl<T> Freeze for Span<T>
impl<T> RefUnwindSafe for Span<T>
impl<T> Send for Span<T>
impl<T> Sync for Span<T>
impl<T> Unpin for Span<T>
impl<T> UnsafeUnpin for Span<T>
impl<T> UnwindSafe for Span<T>
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