View Source opentelemetry_xray_propagator (opentelemetry_xray v0.1.1)

Propagator that injects and extracts context from the AWS X-Ray tracing header.

When the current app is downstream from another app or the AWS load balancer, the upstream app creates the trace for the current request and sends it in the "X-Amzn-Trace-Id" HTTP header. The header includes the trace id and optional information about the parent span and sampling.

Similarly, when the current app makes calls to downstream services, it sets the header to pass the current trace context.

NOTE: Amazon assumes that spans are not sampled by default. If you want your traces to be sampled, make sure that you turn it on.

https://docs.aws.amazon.com/xray/latest/devguide/xray-concepts.html#xray-concepts-tracingheader

Link to this section Summary

Functions

Return list of the keys the propagator sets with inject.

Link to this section Functions

Link to this function

extract(Context, Carrier, CarrierKeysFun, CarrierGetFun, Options)

View Source
-spec extract(Context, Carrier, CarrierKeysFun, CarrierGetFun, Options) -> Context
           when
               Context :: otel_ctx:t(),
               Carrier :: otel_propagator:carrier(),
               CarrierKeysFun :: otel_propagator_text_map:carrier_keys(),
               CarrierGetFun :: otel_propagator_text_map:carrier_get(),
               Options :: otel_propagator_text_map:propagator_options().
Extract context from carrier.
Return list of the keys the propagator sets with inject.
Link to this function

inject(Context, Carrier, CarrierSetFun, Options)

View Source
-spec inject(Context, Carrier, CarrierSetFun, Options) -> Carrier
          when
              Context :: otel_ctx:t(),
              Carrier :: otel_propagator:carrier(),
              CarrierSetFun :: otel_propagator_text_map:carrier_set(),
              Options :: otel_propagator_text_map:propagator_options().
Inject context into carrier.