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

File metadata

  • Download URL: opentelemetry-sdk-extension-aws-0.16b0.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.16b0.tar.gz
Algorithm Hash digest
SHA256 87c65548ce1934c3bcffff830f9062e315d4e85c897a0bda8c7016d26bc5a681
MD5 50a6f87c87b3be8df306e3e7e587605b
BLAKE2b-256 ce75fdc6bf992ee4e54f98d193e911deac5e8929f905bb9c982cedcd9bc5c60d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: opentelemetry_sdk_extension_aws-0.16b0-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.16b0-py3-none-any.whl
Algorithm Hash digest
SHA256 11549f8defa0897082e64f8bd42faa10e369205a8a4d642298be174c091f321f
MD5 5783fb732f535b82cda5900b9d128014
BLAKE2b-256 8e0cbc16a53dedd8357ae98891e15c13e1a5e0bc19c1b45df30a676693e3f21c

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