Amazon Web Services

Observability — CloudWatch & X-Ray

Collect metrics, logs, and traces to monitor health, alert on problems, and debug distributed systems.

Amazon CloudWatch is the central observability service. It collects metrics (CPU, latency, custom application metrics), aggregates logs from services and applications via CloudWatch Logs, and lets you build dashboards and alarms. Alarms watch a metric against a threshold and trigger actions — notify via SNS, scale an Auto Scaling Group, or run automation — turning telemetry into response.

A hospital monitoring station. Vital-sign monitors (metrics) beep an alarm when a reading crosses a threshold, the patient chart (logs) records the detail, and tracking a patient through admission, surgery, and recovery (traces) shows exactly where a delay occurred.

Key Concepts

1
For distributed systems, AWS X-Ray adds tracing: it follows a request across services (API Gateway -> Lambda -> DynamoDB) and produces a service map showing where latency and errors occur, which is essential for diagnosing microservice problems. Together, the three pillars — metrics (what is happening), logs (the detail), and traces (the request's journey) — give you the ability to detect, alert on, and root-cause issues. EventBridge and CloudWatch Logs Insights help query and react to this data.