Skip to main content

current_with_span_context

Function current_with_span_context 

Source
pub fn current_with_span_context(span_context: SpanContext) -> Context
Available on crate feature otel only.
Expand description

Capture the current OTel context and replace the active span.

This is used after starting a span that should become the parent for work performed inside an async sub-future while preserving any existing baggage from the caller context.