Distinguishing Logging, Monitoring and Observability
This lesson explains the difference between logging, monitoring and observability, related but distinct ideas that the exam guide expects you to tell apart.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish logging, monitoring and observability.
- Explain what logs, metrics and traces each contribute to observability.
- Describe how CloudWatch Application Signals and OpenTelemetry bring the three signals together.
Three different ideas
Logging, monitoring and observability are related, but each describes a different activity. Logging is recording what happened: each log entry describes one event, such as a request received or an error raised, with its details. Logs are the raw material for the other two.
Monitoring is watching for problems that are known in advance. The team chooses metrics, such as error rate and latency, sets thresholds and is alerted when a threshold is crossed. Monitoring answers the question "is something wrong?" for failure modes that someone anticipated.
Observability is a property of a system: how well its internal state can be understood from the data it emits. An observable system produces logs, metrics and traces that are detailed and connected enough to explain a problem that nobody predicted, such as why only some customers in one Region see slow checkouts, without adding new code first. The following table summarises the three terms.
| Term | Meaning |
|---|---|
| Logging | Recording individual events with their details |
| Monitoring | Tracking known metrics against thresholds and alerting when something expected goes wrong |
| Observability | Understanding a system's internal state from its outputs, including problems nobody anticipated |
Logs, metrics and traces
Observability rests on three kinds of telemetry, often called the three pillars. Logs record individual events in detail. Metrics are numeric measurements over time, such as request count or latency, which are cheap to store and ideal for dashboards and alarms but carry no detail about individual requests. Traces follow a single request across every service it passes through, showing where time is spent and where errors occur.
Each pillar answers a different question, and their value comes from being linked. A metric shows that latency rose at 10:05; a trace shows that the slow requests spend their time in a call to the payments service; the logs of that service show the error that caused it. Linking works when every log line includes the X-Ray trace ID and a correlation ID for the business transaction, so the developer can move from a slow trace to its logs, and from an error in the logs to the full trace. On AWS, the pillars map to services as the following table shows.
| Pillar | AWS service |
|---|---|
| Logs | CloudWatch Logs |
| Metrics and alarms | CloudWatch metrics |
| Traces | AWS X-Ray |
Application Signals and OpenTelemetry
Amazon CloudWatch Application Signals brings the three pillars together for applications. It instruments supported applications automatically, draws a map of services and their dependencies, and shows each service's request rate, errors and latency. It also lets a team define service level objectives (SLOs), targets such as "99.9% of requests complete in under 300 milliseconds". The shortfall the target allows, here 0.1% of requests, is the error budget. Alerting on how fast the error budget is being consumed, its burn rate, rather than on each individual error, keeps attention on what users actually experience.
OpenTelemetry is an open-source standard for producing logs, metrics and traces, supported by many monitoring tools. The AWS Distro for OpenTelemetry (ADOT) is AWS's supported distribution of it. Instrumenting an application with OpenTelemetry once lets it send the same data to CloudWatch, X-Ray or another tool without changing the code, and it is the approach AWS recommends for new applications.
Three signals for one problem
Customers report slow checkouts. Each signal answers a different part of the question:
| Signal | Answers | What it shows here |
|---|---|---|
| Metrics | Is something wrong, and since when? | p99 latency rose from 300 ms to 2.5 s at 10:15 |
| Traces (X-Ray) | Where is the time spent? | 90% of each request is spent calling the payment service |
| Logs | Why? | The payment service logs connection retries to its database |
Monitoring tells the team that something is wrong; observability, the combination of metrics, logs and traces linked by a correlation ID, lets them find out why without deploying new code.
Which signal shows where time is spent across several services during one request?
Show answer
A trace. Logs record events in one component and metrics show totals and averages, but a trace follows a single request through every service it calls.
Exam Tips
Remember for the exam
- The three pillars of observability are logs, metrics and traces.
- Monitoring answers known questions; observability helps explain problems nobody anticipated.
- To link logs to traces, include the trace ID in every log entry.
- To alert on user impact, define SLOs and alert on error budget burn with Application Signals.