All services

Monitoring & Observability

AWS X-Ray

Distributed tracing for microservices.

Official docs

Overview

X-Ray collects traces across Lambda, ECS, EC2, API Gateway and your SDK-instrumented services so you can see latency, errors and dependencies on a service map.

When to use it

  • Diagnose latency in distributed systems
  • Find the slow downstream call in a chain
  • Correlate failures across services

Setup

  1. Enable Active Tracing on Lambda, API Gateway stages, and App Runner.
  2. Install the X-Ray SDK or use ADOT for OpenTelemetry.
  3. Ensure the IAM role grants xray:PutTraceSegments.

How to use

Sampling rule

Default = 1 request/sec + 5% of additional. Tighten per high-volume route.

QA use cases

  • During performance tests, attach a custom annotation (qa.runId=…) to filter traces for one test run.
  • Identify the exact downstream service responsible for a p95 spike under load.