Skip to main content

current_traceparent

Function current_traceparent 

Source
pub fn current_traceparent() -> Option<String>
Available on crate features transport-trace and transport only.
Expand description

Format a W3C traceparent header value from the current OTel span context.

Returns Some("00-{trace_id}-{span_id}-{flags}") if there is a valid span context active, None otherwise.