Skip to content
cloudhost
All posts
  • Observability

Observability, one map: what to collect, how to use it, and what for

Observability answers five questions: what we collect, how we use it, who acts, what it is for, and how we know it works. This post puts them on one map, with an example for each part and the test that shows it works.

7 min readThe cloudhost team

What observability is for#

Observability has one purpose: find and fix problems before your users feel them. Everything else serves that purpose. The parts are easy to lose track of: logs, metrics, traces, alerts, dashboards, targets. This post puts them on one map.

The map answers five questions:

QuestionBranchIn short
What do we collect?Telemetrythe data: signals, where they come from, and the rules that keep them useful
How do we use it?The chainmonitor, alert, investigate, act, learn
Who acts?Peopleowners, on-call, runbooks
What for?Goalsthe user journeys that matter and the six pillars, each with a measurable target
Does it work?Proofpass/fail checks, drills and maturity levels

What: the signals#

Telemetry is the data a running system reports about itself. It comes as five signals, each answering its own question:

SignalAnswersExample
Metricswhat is wrong? (numbers over time)1,200 requests a minute, 2% errors, 95% of requests under 180 ms
Traceswhere is it wrong? (one request's path through every service)function 40 ms → SQL database 800 ms
Logswhy is it wrong? (one line per event)payment failed: connection limit reached
Profileswhich code? (where CPU and memory go, line by line)700 of the 800 ms were in parseJSON()
Changeswhat changed? (deploys, settings, flags)version 42 deployed at 12:01, errors started at 12:02

Metrics are cheap, so they are kept long and alerted on. Logs, traces and profiles are detailed and costly, so they are kept shorter and searched during an investigation. Changes matter more than they look: most problems start right after something changed.

What: where the data comes from#

  • The server: every service reports its own signals. This is the inside view.
  • Real users: what visitors actually experienced in their browser or app: load time, errors, slow pages. This is the view that counts.
  • Test requests: your own requests on a schedule, for example signing in every minute. They find a fault even when nobody is using the app, such as at night.

What: five rules that keep the data useful#

RuleWhat it meansWithout it
Correlationsignals share keys: the time always, the service and version wherever they are known; a request's logs and traces also carry its trace idyou see the metric rise but cannot find the request or the change behind it
Cardinalitymetric labels only from short, fixed lists (status, service, region); ids and paths go in logs and tracesa label such as user id turns one metric into millions of series: slow, costly, and it can stop the store
Samplingcount every request and every failed request first, then keep all errors and slow requests and a share of the restan error rate computed from the kept requests comes out wrong, because errors were kept more often; for the error rate, divide failed requests by all requests, both counted before sampling
Retentioneach signal is kept for as long as it is useful, no longeryou pay to keep data nobody reads, or the data is gone when you need it
Privacyno passwords, keys or personal data in telemetrythe observability store becomes the easiest place to steal secrets from
Correlation and cardinality pull in opposite directions. Correlation adds keys everywhere; cardinality keeps the keys with many values out of metrics. A request id belongs in logs and traces, never in a metric label.

What: watch the watcher#

If the monitoring itself stops, nothing alerts, and silence looks like health. So telemetry needs its own checks:

  • A heartbeat checked from outside: the monitoring sends a sign of life every minute to something outside it, which alerts when the sign stops.
  • Loss and delay: how many records were dropped, how many failed to send, how old the newest data is.
  • Spend: a budget for how much telemetry is stored, tested during an error spike, when volume jumps.

How: the chain from data to a fix#

  1. Monitor: compare the signals against the targets, all the time.
  2. Alert: wake a person only when a target is at risk, not for every bump. When errors use up the error budget fast enough to threaten the SLO, the on-call person is paged; a security breach pages at once, by its own rule.
  3. Investigate: the usual path is metric → trace → log → profile: what, where, why, which code. Any clue can start it: a recent deploy, a user's report or a single log line.
  4. Act: fix it, then check that the problem is actually gone for users, not only that the server looks fine.
  5. Learn: a short review after every incident, without blame, that ends in a better alert or a change that stops it happening again.

One example from start to end. The error metric rises at 12:02 (what). The traces of the failed requests all slow down at the SQL database step (where). Its logs say the connection limit was reached (why). The changes show version 42 at 12:01, which opens a new connection per request (what changed). Roll back, watch the error rate for users return to normal, then add a test that catches it before the next deploy (learn).

Who: people who act#

  • Owner: every service, user journey and alert has a named owner. An alert nobody owns is noise.
  • On-call: who is paged, and who is paged next if nobody answers in time.
  • Runbook: every alert links to its steps, so the person paged at 3 a.m. does not have to work them out.

What for: journeys and the six pillars#

Start with the critical user journeys: the few paths that matter most, such as signing in, deploying, a request to the app, or a background job finishing. The user-facing targets below are measured on those journeys.

Then judge the system on the six pillars of a well-built cloud system. Each pillar needs the right kind of target, not the same kind:

PillarAvoidsKind of targetExample
Securitya breacha ruleevery security event logged; a breach pages at once
Reliabilityan outagea service level objective with an error budget99.9% of requests succeed over 30 days; when the budget runs out, releases stop until it recovers
Performanceslownessa service level objective95% of requests under 300 ms over a rolling 30 days
Costwastea budgeta ceiling on the cost per thousand requests, and a monthly budget for the telemetry itself
Operationsmanual worka checkevery alert has an owner and a runbook
Sustainabilityload for nothinga checkan idle app makes no requests and no writes

The numbers are examples. Pick yours from what your users need, then measure them.

Does it work: proof#

A diagram does not prove anything. Three things do:

  • Pass/fail checks: every part of the map has a test that passes or fails. For example: plant a fake key in a log line and check it never reaches the store.
  • Drills: break something the on-call person has not seen before, on purpose, and measure the time to find it, fix it and confirm users have recovered.
  • Maturity levels: reactive (users report problems first), proactive (you find them first, including failures you have not seen before), autonomous (the system recovers on its own and tells you).

The whole map#

BranchParts
What: telemetrysignals: metrics (what), traces (where), logs (why), profiles (which code), changes (what changed); sources: server, real users, test requests; rules: correlation, cardinality, sampling, retention, privacy; health: heartbeat from outside, loss and delay, spend
How: the chainmonitor → alert → investigate → act → learn
Who: peopleowner, on-call, runbook
What for: goalscritical user journeys; six pillars, each with its kind of target
Does it work: proofpass/fail checks, drills, maturity levels

On cloudhost, every app and function has its logs, request metrics, traces and alerts in the dashboard, and every request has its own trace id. See observability.

Try it

Everything with one account.

Sign-up is by invite for now. If you have a code, create your account.

Sign up withEmail codeSMS code