Struct opentelemetry::sdk::propagation::TraceContextPropagator
source · pub struct TraceContextPropagator { /* private fields */ }
Available on crate feature
trace
only.Expand description
Propagates SpanContext
s in W3C TraceContext format.
Implementations§
source§impl TraceContextPropagator
impl TraceContextPropagator
sourcepub fn new() -> TraceContextPropagator
pub fn new() -> TraceContextPropagator
Create a new TraceContextPropagator
.
Trait Implementations§
source§impl Clone for TraceContextPropagator
impl Clone for TraceContextPropagator
source§fn clone(&self) -> TraceContextPropagator
fn clone(&self) -> TraceContextPropagator
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TraceContextPropagator
impl Debug for TraceContextPropagator
source§impl Default for TraceContextPropagator
impl Default for TraceContextPropagator
source§fn default() -> TraceContextPropagator
fn default() -> TraceContextPropagator
Returns the “default value” for a type. Read more
source§impl TextMapPropagator for TraceContextPropagator
impl TextMapPropagator for TraceContextPropagator
source§fn inject_context(&self, cx: &Context, injector: &mut dyn Injector)
fn inject_context(&self, cx: &Context, injector: &mut dyn Injector)
Properly encodes the values of the SpanContext
and injects them
into the Injector
.
source§fn extract_with_context(
&self,
cx: &Context,
extractor: &dyn Extractor
) -> Context
fn extract_with_context( &self, cx: &Context, extractor: &dyn Extractor ) -> Context
Retrieves encoded SpanContext
s using the Extractor
. It decodes
the SpanContext
and returns it. If no SpanContext
was retrieved
OR if the retrieved SpanContext is invalid then an empty SpanContext
is returned.