Introduction to AWS X-Ray
Distributed tracing to analyse and debug applications.
- 1 lesson
- Module quiz
In an application built from several services, one user request may pass through API Gateway, a Lambda function, a DynamoDB table and an external API. When the request is slow or fails, metrics show that something is wrong but not where, and logs are spread across every component the request touched. Distributed tracing solves this by following each request through the whole application and recording the time spent and the errors in each part.
AWS X-Ray is AWS's distributed tracing service. Instrumented applications and supported AWS services send trace data to X-Ray, which assembles it into traces of individual requests and a service map showing how components connect, how quickly they respond and where errors occur. X-Ray is charged per million traces recorded and retrieved, with a free tier.
Where X-Ray fits
X-Ray complements Amazon CloudWatch: CloudWatch reports that a problem exists, and X-Ray shows which component causes it. Lambda and API Gateway can send traces with a single setting, called active tracing, while applications on EC2 and ECS run a collector that forwards trace data to X-Ray. The recommended way to instrument code is now the AWS Distro for OpenTelemetry (ADOT), because the X-Ray SDKs and the X-Ray daemon entered maintenance mode in February 2026 and reach end of support in February 2027. The X-Ray service itself continues, and the exam still tests its concepts, such as annotations and sampling.
How this module is organised
The module has a single lesson, Tracing Requests Through Distributed Applications with AWS X-Ray, which explains traces, segments, annotations and metadata, sampling, how each compute service sends traces, and the permissions required.