Skip to main content

current_traceparent

Function current_traceparent 

Source
pub fn current_traceparent() -> Option<String>
Expand description

W3C traceparent header value extracted from the current tracing span, formatted as 00-<trace_id>-<span_id>-<flags>.

Returns None when no tracing-opentelemetry layer is installed (the current span has no associated SpanContext). Used by outbound HTTP request paths to propagate the trace across a process boundary — e.g., when a plugin invokes http-get-with-trace via the host-net WIT import.