The AWS OpenTelemetry Python Distro (`aws-opentelemetry-distro`) is a distribution of the OpenTelemetry Python SDK, pre-configured for AWS environments. It includes AWS-specific resource detectors, X-Ray compatible trace ID generation, and automatic instrumentation for AWS SDK (boto3/botocore) and popular frameworks. It aims to simplify the adoption of OpenTelemetry for applications running on AWS, providing a streamlined path to send traces, metrics, and logs to services like AWS X-Ray and Amazon CloudWatch. The current version is `0.17.0`, with releases typically aligning with upstream OpenTelemetry component updates and AWS-specific feature additions.
pip install aws-opentelemetry-distroVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the most basic usage: initializing the distro and creating a simple trace span. For traces to be actually collected and visible, you need to configure an OTLP exporter, typically via environment variables like `OTEL_EXPORTER_OTLP_ENDPOINT` pointing to an OpenTelemetry Collector or AWS X-Ray daemon.
Upgrade to `aws-opentelemetry-distro>=0.14.0` or revert to a stable older version.
Set appropriate OpenTelemetry environment variables according to your deployment target (e.g., `export OTEL_EXPORTER_OTLP_ENDPOINT='http://localhost:4317'`). Consult the official documentation for specific deployment scenarios (Lambda, EC2, ECS).
Ensure `DJANGO_SETTINGS_MODULE` is correctly defined in your environment when instrumenting Django applications.
Review the release notes for both `aws-opentelemetry-distro` and the bundled OpenTelemetry Python components when upgrading major or minor versions.