Skip to main content

active_correlation

Function active_correlation 

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

Read the active scope’s correlation pair as Some((trace_id, span_id)) when both have been pushed, otherwise None. Walks the stack innermost-first so the deepest set value wins — matches the auto-fill ordering in auto_fill_envelope.

This is the symmetrical read surface to ScopeFrameBuilder (D7-3, which writes frames). Spec 95 D8-2: outbound HTTP middleware, OTLP exporters, and any other generic code that needs to inherit the active trace context calls this function.