AWS SDK extension for OpenTelemetry
Project description
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 AwsXRayIdsGenerator to initialize the TracerProvider.
import opentelemetry.trace as trace
from opentelemetry.sdk.extension.aws.trace import AwsXRayIdsGenerator
from opentelemetry.sdk.trace import TracerProvider
trace.set_tracer_provider(
TracerProvider(ids_generator=AwsXRayIdsGenerator())
)
Usage (AWS X-Ray Propagator)
Use the provided AWS X-Ray Propagator to inject the necessary context into traces sent to external systems.
This can be done by either setting this environment variable:
export OTEL_PROPAGATORS = aws_xray
Or by setting this propagator in your instrumented application:
from opentelemetry import propagators
from opentelemetry.sdk.extension.aws.trace.propagation.aws_xray_format import AwsXRayFormat
propagators.set_global_textmap(AwsXRayFormat())
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file opentelemetry-sdk-extension-aws-0.18b0.tar.gz
.
File metadata
- Download URL: opentelemetry-sdk-extension-aws-0.18b0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4a4af9f06142619a8e53dfb095dfea11ad5cb8f41c9123e777e5bcadddb777f |
|
MD5 | 8b26eff6231079da2231875588f1ad91 |
|
BLAKE2b-256 | fa8472f2046342e56ecc07943d8594fde1f6542313e5af5574e47dd4ef60eef1 |
File details
Details for the file opentelemetry_sdk_extension_aws-0.18b0-py3-none-any.whl
.
File metadata
- Download URL: opentelemetry_sdk_extension_aws-0.18b0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a48f9c3316027b39c04d8f594a09db6c5b6406cb931d385f5454ec7ab07cb1cb |
|
MD5 | 38336bd62351db7cb5095389ac3423ae |
|
BLAKE2b-256 | 9cc07e714dc3d934a51faa06562cce3fbd8cee98e926c5d3472fc7b61a01185d |