Metrics & the three-pillars model
P37.metrics-traces.01 · Audience: guest, it-ml, language-pro · Prerequisites: Structured logging
Logs tell you about individual events; metrics tell you about aggregates over time — how many requests, how full the queue, how slow the p99 — the time the slowest one percent of requests take. Metrics are the cheap, always-on numbers you dashboard and alert on. This module builds a metrics registry and places it in the "three pillars" model: logs, metrics, traces.
ⓘ Concept: Counter, gauge, histogram
Why it matters — Each instrument answers a different shape of question; using the wrong one gives you a number that misleads.
Ask the mentor about this module
Ask a question about this content. The mentor explains and grounds its answer in what you are studying; asking is recorded as a learning signal, not a grade.
Keeping your files on this device
Off by default. The mentor always gets your file; this only decides whether your own copy stays here. Copies live in this browser only - they do not follow you to another device, and clearing site data removes them.
🎓 Practice ladder
2 graded rungs · ~20 minBuild a metrics registry (counters, gauges, histograms) with a scrape snapshot, then reason about the three pillars in an interview-style prompt.
Rung 1 — a metrics registry (counters, gauges, histograms)
Loading exercise…
Rung 2 — metrics, traces & the three pillars (interview)
Loading exercise…
Metrics tell you that a request was slow. The last module adds the third pillar — tracing — which tells you which stage was slow.
My notes on this module
Loading your notes...
Where next?
Later in Metrics & Traces
This module unlocks