skillfed

aws-xray-sdk

The AWS X-Ray SDK for Python (the SDK) enables Python developers to record and emit information from within their applications to the AWS X-Ray service.

aws-xray-sdk Permissive license Apache License 2.0 Active 338 v2.15.0 released

Install

aws-xray-sdk on PyPI

pip

pip install aws-xray-sdk

uv

uv add aws-xray-sdk

poetry

poetry add aws-xray-sdk

Package facts

License Apache License 2.0 (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 288 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: aws_xray_sdk-2.15.0-py2.py3-none-any.whl

Keywords: aws, xray, sdk

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

About aws-xray-sdk

from the package's own PyPI description — quoted content, verbatim

Build Status (image) codecov (image)

AWS X-Ray SDK for Python

:mega: Upcoming Maintenance Mode on February 25, 2026

[The AWS X-Ray SDKs will enter maintenance mode on February 25, 2026][xray-sdk-daemon-timeline]. During maintenance mode, the X-Ray SDKs and Daemon will only receive critical bug fixes and security updates, and will not be updated to support new features.

We recommend that you migrate to [AWS Distro for OpenTelemetry (ADOT) or OpenTelemetry Instrumentation][xray-otel-migration-docs] to generate traces (through manual or zero-code instrumentation) from your application and send them to AWS X-Ray. OpenTelemetry is the industry-wide standard for tracing instrumentation and observability. It has a large open-source community for support and provides more instrumentations and updates. By adopting an OpenTelemetry solution, developers can leverage the latest services and innovations from AWS CloudWatch.

:mega: End-of-Support on February 25,...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Records and emits trace data from Python applications to AWS X-Ray for distributed tracing and service mapping. Provides context managers and manual instrumentation APIs to capture segments, subsegments, metadata, and annotations.

Installs cleanly with no runtime dependencies. Actively maintained with recent releases; however, the package enters maintenance mode on February 25, 2026 and reaches end-of-support on February 25, 2027, after which only critical fixes will be provided.

Licensed under Apache License 2.0 (permissive), allowing broad use, modification, and distribution with minimal restrictions.

Usage

pip install aws-xray-sdk

from aws_xray_sdk.core import xray_recorder

xray_recorder.configure(sampling=False, daemon_address='127.0.0.1:3000')
with xray_recorder.in_segment('my_segment') as segment:
    segment.put_metadata('key', {'data': 'value'}, 'namespace')

Requires Python 3.7 or later. X-Ray daemon must be running and accessible at the configured daemon_address (default 127.0.0.1:3000).

Verdict: Production-ready tracing SDK with zero runtime dependencies and clean installation. Active maintenance through early 2026, but AWS recommends migration to OpenTelemetry for new projects. No known security vulnerabilities. Suitable for teams already invested in AWS X-Ray; others should evaluate OpenTelemetry alternatives.

Needs verification

  • Whether the X-Ray daemon is typically pre-configured in AWS Lambda or ECS environments, or if manual setup is required
  • Performance overhead of tracing relative to application throughput in production workloads
  • Compatibility with async/await patterns beyond the async context managers shown in the excerpt
aws x-ray tracing pythondistributed tracing sdkapplication performance monitoringaws observability instrumentationsegment subsegment tracingservice map visualizationrequest tracing aws

Similar packages