3.2. Monitoring & Debugging Applications
š” First Principle: If you can't observe it, you can't fix it. Every application needs metrics, logs, and traces ā the three pillars of observability.
What happens when a Lambda function starts timing out in production but worked fine in testing? Without CloudWatch metrics showing duration trends, CloudWatch Logs capturing the error, and X-Ray traces revealing which downstream call is slow, you're debugging blind. The DVA-C02 frequently presents troubleshooting scenarios where the correct answer depends on knowing which observability tool to use.
Think of monitoring like a car's dashboard: metrics are the gauges (speed, fuel, temperature), logs are the engine diagnostic codes, and traces are GPS breadcrumbs showing exactly which route each request took through your distributed system.
| Pillar | Tool | Answers |
|---|---|---|
| Metrics | CloudWatch Metrics | "Is it slow? Is it failing?" |
| Logs | CloudWatch Logs | "What error occurred? What was the input?" |
| Traces | AWS X-Ray | "Where in the call chain is the bottleneck?" |
