- 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:
| Question | Branch | In short |
|---|---|---|
| What do we collect? | Telemetry | the data: signals, where they come from, and the rules that keep them useful |
| How do we use it? | The chain | monitor, alert, investigate, act, learn |
| Who acts? | People | owners, on-call, runbooks |
| What for? | Goals | the user journeys that matter and the six pillars, each with a measurable target |
| Does it work? | Proof | pass/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:
| Signal | Answers | Example |
|---|---|---|
| Metrics | what is wrong? (numbers over time) | 1,200 requests a minute, 2% errors, 95% of requests under 180 ms |
| Traces | where is it wrong? (one request's path through every service) | function 40 ms → SQL database 800 ms |
| Logs | why is it wrong? (one line per event) | payment failed: connection limit reached |
| Profiles | which code? (where CPU and memory go, line by line) | 700 of the 800 ms were in parseJSON() |
| Changes | what 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#
| Rule | What it means | Without it |
|---|---|---|
| Correlation | signals share keys: the time always, the service and version wherever they are known; a request's logs and traces also carry its trace id | you see the metric rise but cannot find the request or the change behind it |
| Cardinality | metric labels only from short, fixed lists (status, service, region); ids and paths go in logs and traces | a label such as user id turns one metric into millions of series: slow, costly, and it can stop the store |
| Sampling | count every request and every failed request first, then keep all errors and slow requests and a share of the rest | an 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 |
| Retention | each signal is kept for as long as it is useful, no longer | you pay to keep data nobody reads, or the data is gone when you need it |
| Privacy | no passwords, keys or personal data in telemetry | the observability store becomes the easiest place to steal secrets from |
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#
- Monitor: compare the signals against the targets, all the time.
- 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.
- 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.
- Act: fix it, then check that the problem is actually gone for users, not only that the server looks fine.
- 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:
| Pillar | Avoids | Kind of target | Example |
|---|---|---|---|
| Security | a breach | a rule | every security event logged; a breach pages at once |
| Reliability | an outage | a service level objective with an error budget | 99.9% of requests succeed over 30 days; when the budget runs out, releases stop until it recovers |
| Performance | slowness | a service level objective | 95% of requests under 300 ms over a rolling 30 days |
| Cost | waste | a budget | a ceiling on the cost per thousand requests, and a monthly budget for the telemetry itself |
| Operations | manual work | a check | every alert has an owner and a runbook |
| Sustainability | load for nothing | a check | an 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#
| Branch | Parts |
|---|---|
| What: telemetry | signals: 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 chain | monitor → alert → investigate → act → learn |
| Who: people | owner, on-call, runbook |
| What for: goals | critical user journeys; six pillars, each with its kind of target |
| Does it work: proof | pass/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.