Integrating AWS X-Ray with other AWS services
Many AWS services provide varying levels of X-Ray integration, including sampling and adding headers to incoming requests, running the X-Ray daemon, and automatically sending trace data to X-Ray. Integration with X-Ray can include the following:
-
Active instrumentation – Samples and instruments incoming requests
-
Passive instrumentation – Instruments requests that have been sampled by another service
-
Request tracing – Adds a tracing header to all incoming requests and propagates it downstream
-
Tooling – Runs the X-Ray daemon to receive segments from the X-Ray SDK
Note
The X-Ray SDKs include plugins for additional integration with AWS services. For example, you can use the X-Ray SDK for Java Elastic Beanstalk plugin to add information about the Elastic Beanstalk environment that runs your application, including the environment name and ID.
Here are some examples of AWS services that are integrated with X-Ray:
-
AWS Distro for OpenTelemetry (ADOT) – With ADOT, engineers can instrument their applications once and send correlated metrics and traces to multiple AWS monitoring solutions including Amazon CloudWatch, AWS X-Ray, Amazon OpenSearch Service, and Amazon Managed Service for Prometheus.
-
AWS Lambda – Active and passive instrumentation of incoming requests on all runtimes. AWS Lambda adds two nodes to your trace map, one for the AWS Lambda service, and one for the function. When you enable instrumentation, AWS Lambda also runs the X-Ray daemon on Java and Node.js runtimes for use with the X-Ray SDK.
-
Amazon API Gateway – Active and passive instrumentation. API Gateway uses sampling rules to determine which requests to record, and adds a node for the gateway stage to your service map.
-
AWS Elastic Beanstalk – Tooling. Elastic Beanstalk includes the X-Ray daemon on the following platforms:
-
Java SE – 2.3.0 and later configurations
-
Tomcat – 2.4.0 and later configurations
-
Node.js – 3.2.0 and later configurations
-
Windows Server – All configurations other than Windows Server Core that have been released after December 9th, 2016
You can use the Elastic Beanstalk console to tell Elastic Beanstalk to run the daemon on these platforms, or use the
XRayEnabled
option in theaws:elasticbeanstalk:xray
namespace. -
-
Elastic Load Balancing – Request tracing on Application Load Balancers. The Application Load Balancer adds the trace ID to the request header before sending it to a target group.
-
Amazon EventBridge – Passive instrumentation. If a service that publishes events to EventBridge is instrumented with the X-Ray SDK, event targets will receive the tracing header and can continue to propagate the original trace ID.
-
Amazon Simple Notification Service – Passive instrumentation. If an Amazon SNS publisher traces its client with the X-Ray SDK, subscribers can retrieve the tracing header and continue to propagate the original trace from the publisher with the same trace ID.
-
Amazon Simple Queue Service – Passive instrumentation. If a service traces requests by using the X-Ray SDK, Amazon SQS can send the tracing header and continue to propagate the original trace from the sender to the consumer with a consistent trace ID.
Choose from the following topics to explore the full set of integrated AWS services.
Topics
- AWS Distro for OpenTelemetry and AWS X-Ray
- Amazon API Gateway active tracing support for AWS X-Ray
- Amazon EC2 and AWS App Mesh
- AWS App Runner and X-Ray
- AWS AppSync and AWS X-Ray
- Logging X-Ray API calls with AWS CloudTrail
- CloudWatch integration with X-Ray
- Tracking X-Ray encryption configuration changes with AWS Config
- Amazon Elastic Compute Cloud and AWS X-Ray
- AWS Elastic Beanstalk and AWS X-Ray
- Elastic Load Balancing and AWS X-Ray
- Amazon EventBridge and AWS X-Ray
- AWS Lambda and AWS X-Ray
- Amazon SNS and AWS X-Ray
- AWS Step Functions and AWS X-Ray
- Amazon SQS and AWS X-Ray
- Amazon S3 and AWS X-Ray