Filters
How to search
  • Plain words find names, texts and examples.
  • "two words" finds the exact phrase.
  • --name or -x finds an option.
  • #word looks only inside commands.
  • @grep finds lessons and labs that use grep.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Put ! before a word to leave it out. OR between words means one of them.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search

Observability & SREMixed 23 series

Telemetry that answers questions: metrics, logs, traces

An alert fires at 02:14 and you have three tools open. The metric says the error rate is up, the trace shows where the request spent its time, and the log line says what the service decided. None of them answers the question alone.

Quick reference

Metrics, logs and traces, each with one job.

The Question: Is it down? (UP), Where is the time? (LAT), What happened? (EVT)

The Signal: Metrics: rate and errors (MTS), Traces: one request (TRC), Logs: one event (LOG)

The Store: Prometheus (PRM), Tempo (TPM), Loki (LKI)

Flow: Is it down? → Metrics: rate and errors; Where is the time? → Traces: one request; What happened? → Logs: one event; Metrics: rate and errors → Prometheus; Traces: one request → Tempo; Logs: one event → Loki

Across all layers: OTel collector (OTLP), Grafana (QRY), Alertmanager (PAGE), SLO budget (SLO)

In one line: Three signals, three questions. A question with no signal is a guess; a signal with no question is noise.

Start with the question:

up{job="api"} == 0

Explained

Metrics are cheap and aggregate. They tell you what changed and how much, at one number per label set, which is why they are the first thing to look at and the last thing that explains one request.

Traces keep the path. One trace is a tree of spans with durations and attributes, so a slow checkout becomes a slow database call inside a slow payment span. Sampling decides how many of those trees you keep, and head or tail is a separate argument.

Logs keep the detail. A structured line with a trace id is the join between the three: filter by field, group by value, then open the trace it belongs to. Keep the ids and the level, drop the payload.

The practical order is question first. Is it down, where is the time, what happened. Then pick the signal that answers it and the store that holds it.

The honest caveat: three signals cost three budgets. A team that instruments all three badly is worse off than one that owns metrics and logs and samples traces at one per cent.

Your turn: Which signal do you open first when the page arrives?

More notes: Observability & SRE

Open in the notes app: search, filters, copy This note on GitHub