This library provides components necessary to configure the OpenTelemetry SDK for tracing with AWS X-Ray.
pip install opentelemetry-sdk-extension-aws
Configure the OTel SDK TracerProvider with the provided custom IDs Generator to make spans compatible with the AWS X-Ray backend tracing service.
from opentelemetry.sdk.extension.aws.trace import AwsXRayIdsGenerator
trace.set_tracer_provider(
TracerProvider(ids_generator=AwsXRayIdsGenerator())
)
Set this environment variable to have the OTel SDK use the provided AWS X-Ray Propagator:
export OTEL_PROPAGATORS = aws_xray