Chapter 11: Observability (Metrics, Logs, Traces)
Interactive Explainer
Video is being produced. Check back soon.
Learning Objectives
By the end of this chapter, you will be able to:
- Explain what makes an alert worth sending - an action, an urgency, an owner - and remove the ones that are not
- Measure a service by what its users get, per environment, and alert on how fast the error budget burns instead of on every spike
- Route alerts so that one incident reaches the right people once, and prove the routing without waiting for a real outage
- Follow one request across the frontend, the backend and the database with a trace, and from the trace to its log line
Recall Check
Before continuing, quickly recall:
- A container is
OOMKilled. Where is the reason, and why not in the events? (Chapter 08) - What does the HPA use as 100% when it computes CPU utilization? (Chapter 09)
- A release went out at 16:05. How do you prove which image production runs? (Chapter 10)
If you can’t answer these, revisit the corresponding chapter before proceeding.
Context
Chapter 10 put a tested image into production. This chapter is about knowing - quickly, and without guessing - whether it is working for the people who use it.
The platform collects plenty: Prometheus scrapes every pod and every node, the default rule set brings dozens of alerts, the backend exports traces and logs. None of that helps if the alert that matters reaches nobody, or reaches people who learned to ignore the channel because it fires all day about things that need no action.
So the chapter starts from the other end: an alert is a request for a human to act. It must say what is wrong for users, in which environment, how urgent it is, and what to look at first - and when nothing is wrong, it must be silent. Metrics answer whether users are failing; traces answer where a request spent its time and failed; logs answer what happened, joined to the trace by the same trace_id.
Work through each lesson section; the chapter video, once it is published, gives the concept overview.
From a Failing Request to a Person
From Chapter 14 on, Alertmanager also hands every alert except Watchdog and InfoInhibitor to the Guardian, which adds context; these receivers keep delivering as before.