Skip to content

Latest commit

 

History

History
51 lines (30 loc) · 1.24 KB

File metadata and controls

51 lines (30 loc) · 1.24 KB

OpenTelemetry SDK Extension for AWS X-Ray Compatibility

pypi

This library provides components necessary to configure the OpenTelemetry SDK for tracing with AWS X-Ray.

Installation

pip install opentelemetry-sdk-extension-aws

Usage (AWS X-Ray IDs Generator)

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())
)

Usage (AWS X-Ray Propagator)

Set this environment variable to have the OTel SDK use the provided AWS X-Ray Propagator:

export OTEL_PROPAGATORS = aws_xray

References