Back to Lessons

AWS X-Ray Distributed Tracing

April 5, 2026

Application Performance Monitoring

End-to-end tracing for distributed serverless applications.

X-Ray Integration

Automatic tracing enabled for:
- API Gateway requests
- Lambda function invocations  
- DynamoDB/SQS operations
- HTTP client calls

Service Map shows:
- Latency distribution (p50/p95/p99)
- Error rates per service
- Throughput visualization

Sampling rules configured:
- Reservoir sampling (1 request per second)
- Rule-based sampling for errors

Key Features

  • CloudWatch Logs integration
  • Custom annotations and metadata
  • Trace context propagation
  • Sampling adapters available