Metrics & the three-pillars model

P37.metrics-traces.01 · Audience: guest, it-ml, language-pro · Prerequisites: Structured logging

Real LLM grading for this pageLLM grading (this page):

Logs tell you about individual events; metrics tell you about aggregates over time — how many requests, how full the queue, how slow the p99. 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.

Step 1 / 3Three instruments
ⓘ Concept: Counter, gauge, histogram
A counter only goes up (requests, errors) — you read a rate off it. A gauge goes up and down — the latest level (in-flight requests, queue depth). A histogram records a distribution of observations (latencies), so you get counts, sums and percentiles (p99) — which a mean would hide.

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.

Ctrl/Cmd + Enter to send

🎓 Practice ladder

2 graded rungs · ~20 min

Build 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.