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 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 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.propagate import set_global_textmap
from opentelemetry.sdk.extension.aws.trace.propagation.aws_xray_format import AwsXRayFormat

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

File metadata

  • Download URL: opentelemetry-sdk-extension-aws-0.20b0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for opentelemetry-sdk-extension-aws-0.20b0.tar.gz
Algorithm Hash digest
SHA256 cdaab3fce3f3979194f084387784ed976a47ca53a64fdf346e1fe7bacf298512
MD5 27aa50dfed4fec65d31646dda03c8867
BLAKE2b-256 51c03a8673d77950752429aa75dfa8c5eaa09f94f5828c6c28bd06036390668f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: opentelemetry_sdk_extension_aws-0.20b0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10

File hashes

Hashes for opentelemetry_sdk_extension_aws-0.20b0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6d4d29db1e25c2d6b58de557fbf540317e59b9b74d871c3eab669a59729fcd9
MD5 82b41b81ab7871b46c2681ef1b31598c
BLAKE2b-256 3436a3061720f0e2310e4308ab99143653ff19d5cd3773aedfd461b30dcdd35d

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