Domain focus for the exam: prioritize Amazon CloudWatch (Metrics, Logs, Alarms, Dashboards, Logs Insights, Container/Lambda Insights, Synthetics, ServiceLens) and AWS X‑Ray for tracing. The AWS Distro for OpenTelemetry (ADOT) is relevant for instrumentation, but the exam emphasizes native CloudWatch/X‑Ray features.

Why observability matters — a realistic nightmare
Imagine you are on-call for a large e‑commerce platform with hundreds of microservices. At 03:00 you receive a page: checkout is failing. Traffic recently spiked from 5,000 requests/sec to 50,000 requests/sec (10×). It could be a flash sale, a bot attack, or a bad release. Revenue is dropping. Without observability you lack fast answers: Did autoscaling fail? Is a dependency timing out? Is there a code regression? Poor observability forces ad-hoc troubleshooting: SSH’ing random instances, grep’ing logs, restarting services, and paging the whole team — all of which increase mean time to resolution (MTTR). With good observability you locate the failing service quickly, examine logs for context, use traces to see the request path, and restore service in minutes — saving revenue and customer trust.

The three pillars — concise definition
- Metrics: what is happening (numerical, time-series).
- Logs: why it happened (event-level context).
- Traces: where it happened (distributed request path and latency).

Deep dive — Metrics
Metrics are numerical time-series data collected at regular intervals. Sampling frequency and dimensionality must match your operational and business needs — high-frequency financial systems differ from a typical SaaS API. Key characteristics and uses:- Aggregated values (sum, min, max, count).
- Lightweight metrics that tolerate high-cardinality (design carefully).
- Real-time alerting when thresholds are breached.
- Long-term trend analysis for capacity planning and regression detection.
- Infrastructure: CPU, memory, disk I/O, network throughput.
- Application: request count, error rate, response latency.
- Business: orders/minute, conversion rate, revenue.



- CloudWatch supports up to 10 dimensions per metric — choose dimensions that provide meaningful context without exploding cost and cardinality.
Deep dive — Logs
Logs record event-level details and system state. Two main approaches:- Unstructured text logs (free-form human-readable): flexible, but harder to query at scale.
- Structured logs (JSON or agreed schema): easier to parse, query, and correlate.

- Organize logs into Log Groups (service/application) and Log Streams (individual instances or tasks).
- Use CloudWatch Logs Insights for querying and ad-hoc analytics.
- Apply retention policies to control cost and comply with regulations.
- Consider sampling or dynamic log levels for high-volume services.
- Use structured JSON logs and a consistent schema.
- Include correlation IDs and contextual metadata (e.g., request_id, user_id, region).
- Sample high-volume logs (or filter) to reduce storage and ingestion costs.
- Implement lifecycle rules: keep hot logs in CloudWatch, archive older logs to S3/Glacier for compliance.

Deep dive — Traces
Tracing captures the path of a request as it flows through multiple services, revealing latency hotspots and failed components. Distributed tracing is essential when a single request touches many microservices. AWS tracing options:- AWS X‑Ray: sampling, service maps, trace visualization, annotations, metadata.
- AWS Distro for OpenTelemetry (ADOT): OpenTelemetry instrumentation that can emit to AWS backends.
- Third-party systems: Jaeger, Zipkin (useful but exam focus is X‑Ray/ADOT).



How metrics, logs, and traces work together (investigation workflow)
A typical troubleshooting workflow:- Metric alert fires (CloudWatch Alarm) — indicates an error or capacity breach.
- Inspect logs (CloudWatch Logs + Logs Insights) — find patterns, timestamps, and stack traces.
- If deeper context is needed, analyze traces (X‑Ray) — identify slow services and dependency latencies.
- Determine root cause and remediate (code fix, configuration change, scaling, RDS Proxy, etc.).
- Metrics: elevated DB timeout rate triggers an alarm.
- Logs: repeated 30s connection timeouts appear in application logs.
- Traces: X‑Ray shows spike in DB connection pool waits and unreleased connections.
- Fix: code to ensure connections are released; alternatively use RDS Proxy or connection pooling.

AWS services mapping (quick reference)
Most monitoring and observability features are within the CloudWatch family; tracing is handled by X‑Ray and integrates into CloudWatch ServiceLens.
Real-world scenarios and exam-relevant examples
- Compliance / audit retention: retain audit logs for compliance (for example, SOX often requires multi‑year retention). Typical pattern: forward CloudWatch Logs to S3 (and Glacier) for long-term retention, while keeping recent data (e.g., 90 days) readily available in CloudWatch.

- Cost optimization at scale: when logs exceed terabytes/day, apply sampling and filtering. Send only high-priority logs (ERROR/WARN) to CloudWatch for real-time alerts; route lower-priority or debug logs to S3 for batch analysis.

- Multi-account aggregation: use CloudWatch cross-account observability patterns and centralized logging (aggregator accounts). AWS Control Tower and well‑architected landing zones help standardize accounts, but you still need centralization architecture for observability.
- Real-time vs batch processing: for real-time detection (fraud, alerts) stream logs to Lambda or Amazon Kinesis Data Streams/Data Firehose for continuous processing, while simultaneously writing full logs to S3 for batch analytics (Amazon Athena, EMR, or AWS Glue).

Common exam traps and anti-patterns
- Multiple subscription filters per log group: CloudWatch Logs cannot natively attach multiple subscription destinations directly to the same log group for fan-out. Use Kinesis Data Firehose or a streaming layer to fan out to multiple sinks.
- Storing everything forever: avoid infinite retention in CloudWatch Logs. Use lifecycle policies to tier logs (hot/warm/cold) and archive older logs to S3/Glacier.
- No structured logging: plain-text logs are hard to query and correlate; standardized JSON logs improve searchability and automation.
- Tracing everything indiscriminately: full sampling at 100% can be expensive and noisy. Use intelligent sampling strategies and enable higher fidelity only where it helps diagnosis.
Exam warning: do not rely on unlimited retention or unlimited tracing. Cost and cardinality constraints are common exam topics — design telemetry with retention policies, sampling, and cost-control in mind.

Troubleshooting advice
When troubleshooting distributed systems, narrow the scope gradually: metrics → logs → traces. Increase fidelity only for the affected area; avoid turning up global verbosity, which creates noise and additional cost.Looking ahead — Domain 4 learning path
This domain includes:- Foundations of observability
- Collecting, aggregating, and processing logs at scale
- Metrics and dashboards
- Alarms and notifications
- Tracing and Application Insights (ServiceLens / X‑Ray)
- Auditing, real-time analysis, and alerting

Key takeaways
- Metrics tell you what is happening — numerical trends and alerts for capacity and performance.
- Logs explain why it happened — event context and state, best if structured and correlated.
- Traces show where it happened — end-to-end request visibility and dependency analysis.

Links and references
- AWS CloudWatch: https://aws.amazon.com/cloudwatch/
- CloudWatch Logs Insights: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html
- AWS X‑Ray: https://aws.amazon.com/xray/
- AWS Distro for OpenTelemetry (ADOT): https://aws.amazon.com/otel/
- OpenTelemetry: https://opentelemetry.io/
- AWS Control Tower: https://aws.amazon.com/controltower/
- Amazon S3: https://aws.amazon.com/s3/
- Amazon S3 Glacier: https://aws.amazon.com/glacier/
- Amazon Kinesis Data Firehose: https://aws.amazon.com/kinesis/data-firehose/
- Amazon Athena: https://aws.amazon.com/athena/
- AWS Lambda: https://aws.amazon.com/lambda/
- RDS Proxy: https://aws.amazon.com/rds/rds-proxy/