AWS X-Ray Propagator for OpenTelemetry
Project Links
Meta
Author: OpenTelemetry Authors
Requires Python: >=3.8
Classifiers
Development Status
- 5 - Production/Stable
Intended Audience
- Developers
License
- OSI Approved :: Apache Software License
Programming Language
- Python
- Python :: 3
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
This library provides the propagator necessary to inject or extract a tracing context across AWS services.
Installation
pip install opentelemetry-propagator-aws-xray
Usage (AWS X-Ray Propagator)
NOTE: Because the parent context extracted from the X-Amzn-Trace-Id header assumes the context is _not_ sampled by default, users should make sure to add Sampled=1 to their X-Amzn-Trace-Id headers so that the child spans are sampled.
Use the provided AWS X-Ray Propagator to inject the necessary context into traces sent to external systems.
This can be done by either setting this environment variable:
export OTEL_PROPAGATORS = xray
Or by setting this propagator in your instrumented application:
from opentelemetry.propagate import set_global_textmap
from opentelemetry.propagators.aws import AwsXRayPropagator
set_global_textmap(AwsXRayPropagator())
References
Wheel compatibility matrix
Files in release
Extras:
None
Dependencies:
opentelemetry-api
(~=1.12)