Skip to main content

AWS SDK extension for OpenTelemetry

Project description

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.

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


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.16b1.tar.gz.

File metadata

  • Download URL: opentelemetry-sdk-extension-aws-0.16b1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.9

File hashes

Hashes for opentelemetry-sdk-extension-aws-0.16b1.tar.gz
Algorithm Hash digest
SHA256 cfdf48e66186b8374623a9d13d0fc6287f5415f51f237b6ca107d28f19abf108
MD5 e9c35adccc034089c946ce0019a053c0
BLAKE2b-256 85b72d833541e81bf50835f22ada27fc219bf5dce0f2463b716b3ca54e203db5

See more details on using hashes here.

File details

Details for the file opentelemetry_sdk_extension_aws-0.16b1-py3-none-any.whl.

File metadata

  • Download URL: opentelemetry_sdk_extension_aws-0.16b1-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.9

File hashes

Hashes for opentelemetry_sdk_extension_aws-0.16b1-py3-none-any.whl
Algorithm Hash digest
SHA256 fc923fa885a667e3f976ad37b3ea71fb2474d00482ada35a8584ebc19c219f8e
MD5 d9319cf72946988d88269be204ceabbe
BLAKE2b-256 7098107b5f15e4b78d813457cc2c14af1a1c3a09d4652d61066744b41103422a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page