# opentelemetry-sdk-extension-aws

> AWS SDK extension for OpenTelemetry

- **URL**: https://www.freshcrate.ai/projects/opentelemetry-sdk-extension-aws
- **Author**: pypi
- **Category**: Developer Tools
- **Latest version**: `v0.63b1` (2026-05-21)
- **License**: Unknown
- **Source**: https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/sdk-extension/opentelemetry-sdk-extension-aws
- **Homepage**: https://pypi.org/project/opentelemetry-sdk-extension-aws/
- **Language**: Python
- **GitHub**: 1,031 stars, 932 forks
- **Registry**: pypi (`opentelemetry-sdk-extension-aws`)
- **Tags**: `pypi`

## Description

OpenTelemetry SDK Extension for AWS X-Ray Compatibility
=======================================================

|pypi|

.. |pypi| image:: https://badge.fury.io/py/opentelemetry-sdk-extension-aws.svg
   :target: https://pypi.org/project/opentelemetry-sdk-extension-aws/


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`.

.. code-block:: python

    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 Resource Detectors)
------------------------------

Use the provided `Resource Detectors` to automatically populate attributes under the `resource`
namespace of each generated span.

For example, if tracing with OpenTelemetry on an AWS EC2 instance, you can automatically
populate `resource` attributes by creating a `TraceProvider` using the `AwsEc2ResourceDetector`:

.. code-block:: python

    import opentelemetry.trace as trace
    from opentelemetry.sdk.trace import TracerProvider
    from opentelemetry.sdk.extension.aws.resource.ec2 import (
        AwsEc2ResourceDetector,
    )
    from opentelemetry.sdk.resources import get_aggregated_resources

    trace.set_tracer_provider(
        TracerProvider(
            resource=get_aggregated_resources(
                [
                    AwsEc2ResourceDetector(),
                ]
            ),
        )
    )

Refer to each detectors' docstring to determine any possible requirements for that
detector.

References
----------

* `OpenTelemetry Project <https://opentelemetry.io/>`_
* `AWS X-Ray Trace IDs Format <https://docs.aws.amazon.com/xray/latest/devguide/xray-api-sendingdata.html#xray-api-traceids>`_
* `OpenTelemetry Specification for Resource Attributes <https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/resource/semantic_conventions>`_

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v0.63b1` | 2026-05-21 | High | This is a patch release on the previous 1.42.0/0.63b0 release, fixing the issue(s) below. |
| `opentelemetry-instrumentation-google-genai==0.7b1` | 2026-05-19 | High | This is a patch release on the previous 0.7b0 release, fixing the issue(s) below. |
| `opentelemetry-instrumentation-openai-v2==2.4b0` | 2026-05-01 | High | - Migrate experimental path from deprecated `LLMInvocation` to `InferenceInvocation`, using `handler.start_inference()` and `invocation.stop()`/`invocation.fail()` directly ([#4502](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4502)) - Use `create_duration_histogram` and `create_token_histogram` from `opentelemetry-util-genai` instead of defining bucket boundaries locally ([#4501](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4501)) - Import `OTEL_I |
| `v0.62b1` | 2026-04-24 | High | This is a patch release on the previous 1.41.0/0.62b0 release, fixing the issue(s) below.   ### Fixed  - `opentelemetry-instrumentation-pika` Use `ObjectProxy` instead of `BaseObjectProxy` for `ReadyMessagesDequeProxy` to restore iterability with wrapt 2.x ([#4461](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4461)) - `opentelemetry-instrumentation-dbapi` Use `ObjectProxy` instead of `BaseObjectProxy` for `TracedCursorProxy` to restore iterability with wrapt 2.x ([#4427](h |
| `2.1.0` | 2026-04-21 | Low | Imported from PyPI (2.1.0) |
| `v0.62b0` | 2026-04-09 | Medium | ### Added  - `opentelemetry-instrumentation-asgi`: Respect `suppress_http_instrumentation` context in ASGI middleware to skip server span creation when HTTP instrumentation is suppressed ([#4375](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4375)) - `opentelemetry-instrumentation-confluent-kafka`: Loosen confluent-kafka upper bound to <3.0.0 ([#4289](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4289)) - `opentelemetry-instrumentation`: Add support |
| `opentelemetry-opamp-client==0.2b0` | 2026-04-01 | Medium | - Breaking change: callback class `Callbacks` renamed to `OpAMPCallbacks` ([#4355](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4355)) |
| `opentelemetry-opamp-client==0.1b0` | 2026-03-23 | Medium | - Initial implementation ([#3635](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3635)) - Update client to have additional callback methods ([#4322](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4322)) |
| `v0.61b0` | 2026-03-04 | Low | ### Added  - Add Python 3.14 support ([#4193](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4193)) - `opentelemetry-instrumentation-asgi`: Add exemplars for `http.server.request.duration` and `http.server.duration` metrics ([#3739](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3739)) - `opentelemetry-instrumentation-wsgi`: Add exemplars for `http.server.request.duration` and `http.server.duration` metrics ([#3739](https://github.com/open-telemetry/ope |
| `opentelemetry-instrumentation-google-genai==0.7b0` | 2026-02-20 | Low | - Fix bug in how tokens are counted when using the streaming `generateContent` method.  ([#4152](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4152)). - Add `gen_ai.tool.definitions` attribute to `gen_ai.client.inference.operation.details` log event ([#4142](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4142)). - Add `gen_ai.tool_definitions` to completion hook ([#4181](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4181)) |

## Citation

- HTML: https://www.freshcrate.ai/projects/opentelemetry-sdk-extension-aws
- Markdown: https://www.freshcrate.ai/projects/opentelemetry-sdk-extension-aws.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/opentelemetry-sdk-extension-aws/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
