opentelemetry-sdk-extension-aws
AWS SDK extension for OpenTelemetry
What it is and what it does
This package extends OpenTelemetry's SDK with AWS-specific components that bridge the gap between OpenTelemetry's distributed tracing model and AWS X-Ray's backend service. It provides an AwsXRayIdGenerator that formats span IDs and trace IDs in the format X-Ray expects, ensuring compatibility when exporting traces to X-Ray. It also includes resource detectors that automatically populate span resource attributes with AWS environment metadata—such as EC2 instance information—without requiring manual configuration.
The package is designed for developers instrumenting applications running on AWS infrastructure who want to use OpenTelemetry for observability while sending traces to X-Ray. It handles the translation layer between OpenTelemetry's semantic conventions and X-Ray's requirements, reducing boilerplate and configuration errors.
Use it for:
- Configure OpenTelemetry tracing on an EC2 instance to automatically detect and attach instance metadata to spans sent to AWS X-Ray.
- Instrument a microservice deployed on AWS with OpenTelemetry while ensuring trace IDs remain compatible with X-Ray's trace format.
- Populate resource attributes (region, instance ID, availability zone) automatically when creating a TracerProvider for AWS workloads.
- Integrate OpenTelemetry into an existing AWS X-Ray observability pipeline without manual ID translation or resource mapping.
- Build a multi-service tracing setup on AWS where OpenTelemetry agents export traces to X-Ray with proper AWS resource context.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides OpenTelemetry SDK components to make distributed traces compatible with AWS X-Ray, including a custom ID generator and resource detectors for AWS services.
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and is essential if you are using OpenTelemetry with AWS X-Ray. The permissive license and broad Python version support (3.8–3.12) make adoption straightforward. Install it if you need X-Ray compatibility; skip it if you are not using X-Ray or are not instrumenting AWS workloads.
Install
opentelemetry-sdk-extension-aws on PyPI
pip
pip install opentelemetry-sdk-extension-awsuv
uv add opentelemetry-sdk-extension-awspoetry
poetry add opentelemetry-sdk-extension-awsInstalling opentelemetry-sdk-extension-aws
Before you install
Low install friction with a single runtime dependency on opentelemetry-sdk. Actively maintained as of 2026-08-14 with no known vulnerabilities.
License in practice
Licensed under permissive terms (Apache Software License), imposing no restrictions on use or redistribution in proprietary or open-source projects.
Quickstart
pip install opentelemetry-sdk-extension-aws
import opentelemetry.trace as trace
from opentelemetry.sdk.extension.aws.trace import AwsXRayIdGenerator
from opentelemetry.sdk.trace import TracerProvider
trace.set_tracer_provider(
TracerProvider(id_generator=AwsXRayIdGenerator())
)
Requires opentelemetry-sdk to be installed separately; Python 3.8 or later.
Verify before relying
- Whether resource detectors (e.g., AwsEc2ResourceDetector) require AWS credentials or IAM permissions to function.
- Performance overhead of resource detection on non-AWS environments or when detectors fail to retrieve metadata.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — opentelemetry-sdk |
| Maintenance | actively maintained — 598 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,219,298/month — #1,956 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opentelemetry_sdk_extension_aws-2.1.0-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
opentelemetry-propagator-aws-xrayInjects and extracts AWS X-Ray tracing context…
permissive · top 5,000 on PyPI
opentelemetry-resource-detector-containeridDetects and registers container runtime…
permissive · top 15,000 on PyPI
aws-xray-sdkRecords and sends trace data from Python…
permissive · top 1,000 on PyPI
azure-core-tracing-opentelemetryIntegrates Azure SDK clients with OpenTelemetry…
unclear · top 5,000 on PyPI
opentelemetry-instrumentation-botoAdds distributed tracing to AWS SDK (Boto)…
permissive · top 5,000 on PyPI
opentelemetry-resource-detector-azureProvides OpenTelemetry resource detectors that…
permissive · top 5,000 on PyPI
aiobotocore-otelAdds distributed tracing to aiobotocore AWS API…
permissive · top 15,000 on PyPI
opentelemetry-resourcedetector-dockerExtracts Docker container metadata and…
permissive · top 5,000 on PyPI
opentelemetry-resourcedetector-kubernetesDetects and populates OpenTelemetry Resource…
permissive · top 5,000 on PyPI
opentelemetry-exporter-gcp-traceExports OpenTelemetry traces to Google Cloud…
permissive · top 5,000 on PyPI