pub fn set_text_map_propagator<P: TextMapPropagator + Send + Sync + 'static>(
    propagator: P
)
Expand description

Sets the given TextMapPropagator propagator as the current global propagator.

Examples

use opentelemetry::{global, sdk::propagation::TraceContextPropagator};

// create your text map propagator
let propagator = TraceContextPropagator::new();

// assign it as the global propagator
global::set_text_map_propagator(propagator);