Working with Python
Note
X-Ray SDK/Daemon Maintenance Notice – On February 25th, 2026, the AWS X-Ray SDKs/Daemon will enter maintenance mode, where AWS will limit X-Ray SDK and Daemon releases to address security issues only. For more information on the support timeline, see X-Ray SDK and Daemon Support timeline. We recommend to migrate to OpenTelemetry. For more information on migrating to OpenTelemetry, see Migrating from X-Ray instrumentation to OpenTelemetry instrumentation .
There are two ways to instrument your Python application to send traces to X-Ray:
-
AWS Distro for OpenTelemetry Python – An AWS distribution that provides a set of open source libraries for sending correlated metrics and traces to multiple AWS monitoring solutions, including Amazon CloudWatch, AWS X-Ray, and Amazon OpenSearch Service, via the AWS Distro for OpenTelemetry Collector
. -
AWS X-Ray SDK for Python – A set of libraries for generating and sending traces to X-Ray via the X-Ray daemon.
For more information, see Choosing between the AWS Distro for OpenTelemetry and X-Ray SDKs.