Working with Node.js
Note
End-of-support notice – On February 25th, 2027, AWS X-Ray will discontinue support for AWS X-Ray SDKs and daemon. After February 25th, 2027, you will no longer receive updates or releases. For more information on the support timeline, see X-Ray SDK and daemon end of 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 Node.js application to send traces to X-Ray:
-
AWS Distro for OpenTelemetry JavaScript – 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 Node.js – 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.