build_dataplane_span_from_traceparent

Function build_dataplane_span_from_traceparent 

Source
pub fn build_dataplane_span_from_traceparent(
    traceparent: Option<&str>,
    kind: DataplaneSpanKind,
    operation: &str,
    outcome: &str,
    resource_kind: ResourceKind,
    lease_id: Option<u128>,
    start_time_unix_us: u64,
    end_time_unix_us: u64,
) -> Result<Option<ResourceSpan>, TraceContextError>
Expand description

Build a data-plane span from an optional W3C traceparent.

Absent trace context returns Ok(None); invalid trace context returns a typed error. The helper intentionally does not synthesize root contexts — data-plane ops without an inbound trace are surfaced as “no span” so callers can decide between linking and root-creation explicitly (v1.1 §3.3 invariant 2 / no silent best-effort loss).