AWS X Ray
Distributed request tracing
Collects traces of requests as they pass through many services (API Gateway, Lambda, ECS, DynamoDB…), draws a service map, and pinpoints where things are slow or failing; today it is usually instrumented with OpenTelemetry (ADOT) and viewed in CloudWatch.
- Cost$ Low
- Difficulty●●●●●
- Costs money when idle?No
- Serverless
- In examsDVA · SOA · SAA
Think of it asLike attaching a GPS tracker to a package to find out which warehouse it sits in the longest.
When to use it
✓ Use it when
Debugging latency or errors in multi-tier microservices/serverless applications.
✗ Avoid it when
You only need simple metrics and logs → CloudWatch; want a per-service SLO view → CloudWatch Application Signals.
Common uses
- Find the slow service in a chain of Lambdas calling each other
- View each downstream's error rate on the service map
- Sample traces to analyze abnormal requests
What does it cost?
- Pricing model: Charged by the number of traces recorded, traces retrieved, and traces scanned during analysis.
⚠️ Cost traps
Setting a 100% sampling rate on high-traffic systems sharply increases the number of traces (and the cost).
Related services
SAA-C03 study guide
X-Ray is covered in these study modules: