Code Observability
Unlock the complete study guide + 1,040 practice questions across 16 full exams.
Bundled into the existing AWS Certified Developer - Associate premium course — no separate purchase.
Included in this chapter:
- Instrumentation is emitting telemetry, not reading it: the three-pillar model
- Logs and metrics: structured logging, EMF, and PutMetricData
- Traces: X-Ray SDK instrumentation, annotations vs. metadata
- Alarms, and exam-pattern recognition: stem cue to signal
The three observability pillars on AWS: what to instrument when
| Pillar | Question it answers | AWS service | How code emits it | Reach for it when |
|---|---|---|---|---|
| Logs | What exactly happened, in detail? | Amazon CloudWatch Logs (+ Logs Insights) | Structured JSON lines with a correlation ID; EMF for metric extraction | You need per-event detail to reconstruct a single request or failure |
| Metrics | How much / how often, over time? | Amazon CloudWatch metrics | PutMetricData API, or EMF from structured logs; dimensions slice the data | You need aggregated trends, dashboards, and alarm thresholds |
| Traces | Where in the request path is the time going? | AWS X-Ray | X-Ray SDK subsegments; annotations (indexed) vs metadata (context) | You must follow one request end-to-end across multiple services |
Decision tree
Cheat sheet
Unlock with Premium — includes all practice exams and the complete study guide.
Also tested in
References
- Analyze log data with CloudWatch Logs Insights
- PutMetricData: Amazon CloudWatch API Reference
- Amazon CloudWatch concepts (metrics, dimensions, resolution)
- Embedding metrics within logs (CloudWatch embedded metric format)
- Using the embedded metric format client libraries
- Working with log groups and log streams
- Change log data retention in CloudWatch Logs
- AWS X-Ray SDK for Node.js
- AWS X-Ray concepts (segments, traces, annotations, tracing header)
- Use ServiceLens to monitor the health of your applications
- Application monitoring with CloudWatch Application Signals
- Using Amazon CloudWatch alarms