pub struct Span {Show 13 fields
pub trace_id: String,
pub span_id: String,
pub parent_span_id: Option<String>,
pub name: String,
pub service: String,
pub kind: Option<SpanKind>,
pub status: SpanStatus,
pub start_time: i64,
pub duration_us: i64,
pub attributes: Option<BTreeMap<String, String>>,
pub events: Option<Vec<SpanEvent>>,
pub resource: Option<BTreeMap<String, String>>,
pub extensions: Option<BTreeMap<String, Value>>,
}Expand description
A single span in a distributed trace.
All IDs are lowercase hex strings. parent_span_id is None for
root spans. Attributes are flattened to string values.
Fields§
§trace_id: StringTrace ID in lowercase hex (16 or 32 chars).
span_id: StringSpan ID in lowercase hex (16 chars).
parent_span_id: Option<String>Parent span ID. None for root spans.
name: StringOperation name.
service: StringService name.
kind: Option<SpanKind>Span kind, normalized to OTel SpanKind.
status: SpanStatusSpan status: ok, error, or unset.
start_time: i64Start time as Unix seconds.
duration_us: i64Duration in microseconds (integer, no floating point precision loss).
attributes: Option<BTreeMap<String, String>>Span attributes, flattened to string values.
events: Option<Vec<SpanEvent>>Span events (Full View only). Not all providers populate this field.
resource: Option<BTreeMap<String, String>>Resource attributes (Full View only).
extensions: Option<BTreeMap<String, Value>>Provider-specific metadata (Full View only).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Span
impl<'de> Deserialize<'de> for Span
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
impl StructuralPartialEq for Span
Auto Trait Implementations§
impl Freeze for Span
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnsafeUnpin for Span
impl UnwindSafe for Span
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