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.17b0.tar.gz.

File metadata

  • Download URL: opentelemetry-sdk-extension-aws-0.17b0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for opentelemetry-sdk-extension-aws-0.17b0.tar.gz
Algorithm Hash digest
SHA256 c26dbaa1a11e8c84c77d41bbbf71b8e9ade16610f854688f73e68dfa95eebb9c
MD5 39922fc24c61e02ad4c9cf8a46a6ce85
BLAKE2b-256 780ee545d6a0885c7a94ecf39314079ddb013a62a6747e37ced197153dc1b624

See more details on using hashes here.

File details

Details for the file opentelemetry_sdk_extension_aws-0.17b0-py3-none-any.whl.

File metadata

  • Download URL: opentelemetry_sdk_extension_aws-0.17b0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for opentelemetry_sdk_extension_aws-0.17b0-py3-none-any.whl
Algorithm Hash digest
SHA256 a63d87042046218c0088eb08443e24f36c2d65d1916554b2a471141b34df7ae2
MD5 3761e3f78b72a1fdd1b9ef5301f7d63b
BLAKE2b-256 b845e75616b1f21130872233bb435a747baf5fb9533a59f752009c19d233cb08

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