[][src]Trait opentelemetry::api::propagation::text_map_propagator::TextMapPropagator

pub trait TextMapPropagator: Debug {
    fn inject_context(&self, cx: &Context, injector: &mut dyn Injector);
fn extract_with_context(
        &self,
        cx: &Context,
        extractor: &dyn Extractor
    ) -> Context;
fn fields(&self) -> FieldIter<'_>

Notable traits for FieldIter<'a>

impl<'a> Iterator for FieldIter<'a> type Item = &'a str;
; fn inject(&self, injector: &mut dyn Injector) { ... }
fn extract(&self, extractor: &dyn Extractor) -> Context { ... } }

Methods to inject and extract a value as text into injectors and extractors that travel in-band across process boundaries.

Required methods

fn inject_context(&self, cx: &Context, injector: &mut dyn Injector)

Properly encodes the values of the Context and injects them into the Injector.

fn extract_with_context(
    &self,
    cx: &Context,
    extractor: &dyn Extractor
) -> Context

Retrieves encoded data using the provided Extractor. If no data for this format was retrieved OR if the retrieved data is invalid, then the given Context is returned.

fn fields(&self) -> FieldIter<'_>

Notable traits for FieldIter<'a>

impl<'a> Iterator for FieldIter<'a> type Item = &'a str;

Returns iter of fields used by TextMapPropagator

Loading content...

Provided methods

fn inject(&self, injector: &mut dyn Injector)

Properly encodes the values of the current Context and injects them into the Injector.

fn extract(&self, extractor: &dyn Extractor) -> Context

Retrieves encoded data using the provided Extractor. If no data for this format was retrieved OR if the retrieved data is invalid, then the current Context is returned.

Loading content...

Implementors

impl TextMapPropagator for B3Propagator[src]

fn inject_context(&self, context: &Context, injector: &mut dyn Injector)[src]

Properly encodes the values of the Context's SpanReference and injects them into the Injector.

fn extract_with_context(
    &self,
    cx: &Context,
    extractor: &dyn Extractor
) -> Context
[src]

Retrieves encoded data using the provided Extractor. If no data for this format was retrieved OR if the retrieved data is invalid, then the current Context is returned.

impl TextMapPropagator for BaggagePropagator[src]

fn inject_context(&self, cx: &Context, injector: &mut dyn Injector)[src]

Encodes the values of the Context and injects them into the provided Injector.

fn extract_with_context(
    &self,
    cx: &Context,
    extractor: &dyn Extractor
) -> Context
[src]

Extracts a Context with baggage values from a Extractor.

impl TextMapPropagator for JaegerPropagator[src]

impl TextMapPropagator for TextMapCompositePropagator[src]

fn inject_context(&self, context: &Context, injector: &mut dyn Injector)[src]

Encodes the values of the Context and injects them into the Injector.

fn extract_with_context(
    &self,
    cx: &Context,
    extractor: &dyn Extractor
) -> Context
[src]

Retrieves encoded Context information using the Extractor. If no data was retrieved OR if the retrieved data is invalid, then the current Context is returned.

impl TextMapPropagator for TraceContextPropagator[src]

fn inject_context(&self, cx: &Context, injector: &mut dyn Injector)[src]

Properly encodes the values of the SpanReference and injects them into the Injector.

fn extract_with_context(
    &self,
    cx: &Context,
    extractor: &dyn Extractor
) -> Context
[src]

Retrieves encoded SpanReferences using the Extractor. It decodes the SpanReference and returns it. If no SpanReference was retrieved OR if the retrieved SpanReference is invalid then an empty SpanReference is returned.

impl TextMapPropagator for XrayPropagator[src]

Loading content...