OpenTelemetry SDK Extension for AWS X-Ray Compatibility
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.
Install the OpenTelemetry SDK package.
pip install opentelemetry-sdk
Next, use the provided AwsXRayIdGenerator to initialize the TracerProvider.
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())
)
Usage (AWS Resource Detectors)
Use the provided Resource Detectors to automatically populate attributes under the resource namespace of each generated span.
For example, if tracing with OpenTelemetry on an AWS EC2 instance, you can automatically populate resource attributes by creating a TraceProvider using the AwsEc2ResourceDetector:
import opentelemetry.trace as trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.extension.aws.resource.ec2 import (
AwsEc2ResourceDetector,
)
from opentelemetry.sdk.resources import get_aggregated_resources
trace.set_tracer_provider(
TracerProvider(
resource=get_aggregated_resources(
[
AwsEc2ResourceDetector(),
]
),
)
)
Refer to each detectors’ docstring to determine any possible requirements for that detector.
References
Metadata
Release files for opentelemetry-sdk-extension-aws 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| opentelemetry_sdk_extension_aws-2.1.0.tar.gz | 16.3 kB | Without provenance | Details for opentelemetry_sdk_extension_aws-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opentelemetry_sdk_extension_aws-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for opentelemetry_sdk_extension_aws-2.1.0-py3-none-any.whl |
Total release size: 35.1 kB
Release files / opentelemetry_sdk_extension_aws-2.1.0.tar.gz
| Download URL | opentelemetry_sdk_extension_aws-2.1.0.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff68ddecc1910f62c019d22ec0f7461713ead7f662d6a2304d4089c1a0b20416
|
|
BLAKE2b-256 checksum How to use checksums |
f5b3825c93fe4c238845f1356297abea33d03b2adaafb5ae98fc257b394de124
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.8.18
|
Release files / opentelemetry_sdk_extension_aws-2.1.0-py3-none-any.whl
| Download URL | opentelemetry_sdk_extension_aws-2.1.0-py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7cf6efc275d2c24108a468d954287ce5aab9733bac816a080cfb3117374e63a
|
|
BLAKE2b-256 checksum How to use checksums |
026147a6a43b7935d54b5734fbf3fb0357dd5a7d0dfaa9677b7318518fe8d507
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.8.18
|
Security for opentelemetry-sdk-extension-aws 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.