Skip to main content

capture_context

Function capture_context 

Source
pub fn capture_context() -> Context
Available on crate feature otel only.
Expand description

Capture the current OTel context for propagation into a spawned task.

Call this at the public API boundary (before tokio::spawn) and pass the returned Context via FutureExt::with_context().