Infrastructure and Observability
Loading
Loading
Infrastructure and Observability
Logs, metrics and traces answer three different questions. Choosing the wrong one wastes an outage.
By the end of this chapter
| Signal | Shape | Answers | Costs |
|---|---|---|---|
| Metrics | Numbers over time | Is something wrong? Since when? | Cheap; no detail |
| Traces | One request across services | Where did the time go? | Sampled; needs propagation |
| Logs | Events with context | What exactly happened to this? | Expensive at volume |
The usual order in an incident runs metrics to traces to logs: a metric tells you latency tripled at 14:02, a trace shows the time is spent waiting on one downstream call, and that service's logs show why. Starting with logs means grepping without knowing what you are looking for.
The temptation is to alert on causes — CPU above eighty percent, disk filling, a pod restarting. Most of these fire when nothing is wrong, and miss outages with none of those signatures.
Sign in to keep a note here. It is free, and nobody else can see it.
Sign inWhat this chapter was for: