Appendix F · The observability model, in full
What this holds
| Purpose | The book’s sizing exemplar, including what is not yet measured |
| Model | models/observability/model.yaml |
| Built from | observability-reference, observability-knobs_turned_down |
Metrics, logs and traces, for an estate stated in ch02’s terms. Vendor neutral: nothing on this page names a product, and the structure is what transfers.
This is the book’s second model, and it shows what Appendix E does not. Three multiplicative chains run through it: metrics, logs and traces. They share inputs at two points. The growth factor feeds all three, and the request rate feeds logs and traces, so they rise and fall together even where you declare no correlation between them. Label cardinality, a product of three uncertain counts of label values, drives the active series count and the query path. The logs chain does not use it.
The control knobs set how much telemetry you keep and for how long: the scrape interval, the retention period for each signal, the fraction of log lines retained and the trace sampling rate. None of them is money. Three tiers (ingest, store and query) carry four ceilings between them, and no single number summarises them.
It is a conditional model: it has measured constants and ceilings, and a model with either is
conditional (ch01). So scripts/verify-models.py holds it to stricter rules:
every ceiling must declare its headroom and say why. Two of its measured constants have not been
measured, on purpose: spans per request, which the traces chain needs, and collector throughput per
core as measured, which one of the two ingest ceilings needs. The next section says what each needs.
What is not yet measured
Not measured yet
observability declares 2 constant(s) that nobody has measured:
collector throughput per core, measured — needs
bench/results/collector-throughput-per-core.jsonspans per request — needs
bench/results/traces-spans-per-request.json
6 node(s) downstream of those cannot be computed. In the book’s tables they are shown as not yet measured; on the interactive model page their boxes show —. Nothing is estimated in their place: this book publishes measurements or it publishes nothing.
Source — observability-reference · the model to explore; each input with a range has a slider · 2 measured constants have no measurement yet, so figures that depend on them say not yet measured (why)
Spans per request belongs to one instrumented application at one version. No body of data in this
repository contains it, so a corpus measurement cannot derive it. No machine produces it, so a
rig measurement cannot take it either. It is an estate observation: taken on a system you run.
Nobody can repeat it, and nobody can check it, so its stamp must record the system, the window it
covers and the date.
Nobody has taken it. So the traces chain has no value, and every table below shows the traces chain’s rows as not yet measured. Why leave it empty rather than filling in a plausible figure? An invented figure would print in every table below exactly like a measured one, and nothing on the page would tell you which was which.
The model declares collector throughput per core twice, on purpose. Once it is the vendor’s quoted figure, a claim in the file. It gives the ceiling ingest utilisation, quoted a value. Once it is a measurement that has not been taken, which leaves the ceiling ingest utilisation, measured in the ceilings table, under The four ceilings, one of which cannot be computed, showing not yet measured.
This measurement is a different kind from spans per request. It is a rig measurement: a
throughput, taken on the book’s declared reference machine and refused on any other. Whoever has
that machine can take it again and check it.
ch03 · Where the numbers come from explains how the book records a
vendor’s figure as a claim and keeps it apart from a measurement.
The graph
The model, live: move an input and every node recomputes. A node with a dashed border and a dash (—) in place of its value cannot be computed yet.
Two nodes are drawn dashed because they are the unmeasured constants themselves: spans per request and collector throughput per core, measured. Every node that depends on either of them is drawn dashed too. Click on a dashed node and Details names the constant it is waiting for. The dashed nodes answer the question: “What would measuring this one thing give a value to?” The toolkit works that out from the graph; nobody wrote the list. The graph is wider than the page. Scroll it sideways, or press Expand to open it at full width.
Every formula
The graph above, as text: every derived quantity and every ceiling, with the formula the file gives it. The table is rendered from the file, so it cannot disagree with it.
| Quantity | Formula | Unit |
|---|---|---|
horizon periods (horizon_periods) | horizon / one_year | |
growth factor (growth_factor) | annual_growth ** horizon_periods | |
accidental label values (label_values_accidental) | 1 + label_values_accidental_extra | |
label cardinality (label_cardinality) | label_values_endpoint * label_values_status * label_values_accidental | |
active series (active_series) | hosts * base_metrics_per_host * label_cardinality * growth_factor | series |
sample rate (sample_rate) | one_sample_per_series / scrape_interval | sample/series/second |
metrics ingest (metrics_ingest) | active_series * sample_rate * metrics_sample_bytes | MB/s |
metrics stored (metrics_stored) | metrics_ingest * metrics_retention | TB |
log line rate (log_line_rate) | request_rate * lines_per_request * log_keep_rate * growth_factor | line/second |
logs ingest (logs_ingest) | log_line_rate * logs_line_bytes | MB/s |
logs stored (logs_stored) | logs_ingest * logs_retention | TB |
span rate (span_rate) | request_rate * spans_per_request * trace_keep_rate * growth_factor | span/second |
traces ingest (traces_ingest) | span_rate * traces_span_bytes | MB/s |
traces stored (traces_stored) | traces_ingest * traces_retention | TB |
ingest, metrics and logs only (known_ingest) | metrics_ingest + logs_ingest | MB/s |
total ingest (total_ingest) | metrics_ingest + logs_ingest + traces_ingest | MB/s |
quoted pipeline capacity (quoted_pipeline_capacity) | collector_cores * collector_throughput_quoted | MB/s |
measured pipeline capacity (measured_pipeline_capacity) | collector_cores * collector_throughput_measured | MB/s |
limit on ingest utilisation, quoted ( quoted_pipeline_utilisation) | known_ingest / quoted_pipeline_capacity against a limit of 1, keeping 0.4 below it | |
limit on ingest utilisation, measured (pipeline_utilisation) | total_ingest / measured_pipeline_capacity against a limit of 1, keeping 0.4 below it | |
installed usable (installed_usable) | store_nodes * usable_tb_per_node | TB |
stored, metrics and logs only (known_stored) | metrics_stored + logs_stored | TB |
limit on retention store fill (store_fill) | known_stored / installed_usable against a limit of 1, keeping 0.3 below it | |
series per query (series_per_query) | series_per_query_base * label_cardinality | series/query |
query series rate (query_series_rate) | queries_per_second * series_per_query | series/second |
query capacity (query_capacity) | query_nodes * query_scan_rate_quoted | series/second |
limit on query path utilisation (query_utilisation) | query_series_rate / query_capacity against a limit of 1, keeping 0.4 below it | |
retention cost, metrics and logs only (known_storage_cost) | known_stored * storage_price | USD/month |
Source — models/observability/model.yaml
The three chains
| Output | Point estimate | 90% interval | Unit |
|---|---|---|---|
| metrics ingest | 4.69 | 1.03 to 30.0 | MB/s |
| logs ingest | 44.7 | 9.66 to 164 | MB/s |
| traces ingest | not yet measured | not yet measured | MB/s |
| traces stored | not yet measured | not yet measured | TB |
| ingest, metrics and logs only | 49.4 | 12.8 to 183 | MB/s |
| stored, metrics and logs only | 278 | 86.0 to 1,330 | TB |
| active series | 15,017,758 | 3,291,520 to 96,141,601 | series |
| label cardinality | 76.3 | 25.3 to 309 | |
| retention cost, metrics and logs only | $4,084 | $1,094 to $22,248 | USD/month |
| retention store fill | 0.579 | 0.179 to 2.77 | |
| ingest utilisation, quoted | 0.514 | 0.133 to 1.91 | |
| query path utilisation | 0.569 | 0.0747 to 3.44 | |
| ingest utilisation, measured | not yet measured | not yet measured |
Source — observability-reference · the model to explore; each input with a range has a slider · 2 measured constants have no measurement yet, so figures that depend on them say not yet measured (why)
Metrics are cheap in bytes and expensive in series. Logs are the reverse. The traces rows read not yet measured because the traces chain needs spans per request, which has not been measured. The model does not say where traces would fall between the other two.
Look hardest at the active series count. It is driven by label cardinality, and label cardinality is the product of three counts of label values: the endpoint label, the status label and the accidental label. The table below gives each count’s range and the range of the product, with the top of each range divided by the bottom, so you can compare how wide they are.
| Quantity | 90% interval | Top ÷ bottom |
|---|---|---|
different endpoint label valueslabel_values_endpoint | 3.92 to 16.5 | 4.2x |
different status label valueslabel_values_status | 2.44 to 5.22 | 2.1x |
accidental label valueslabel_values_accidental | 1.30 to 8.18 | 6.3x |
label cardinalitylabel_cardinality | 25.3 to 309 | 12.2x |
Source — observability-reference · the model to explore; each input with a range has a slider · 2 measured constants have no measurement yet, so figures that depend on them say not yet measured (why)
The product’s range is wider than the widest of its three counts, which is the accidental label. It is much narrower than if you multiplied the three counts’ spreads together. The reason: the model draws the three counts independently. A high draw of one usually meets middling or low draws of the others, so they partly cancel. The chart below shows the product’s spread, with the point estimate marked on it.
The four ceilings, one of which cannot be computed
| Ceiling | At the plan | Headroom | Allowed | Limit | Verdict | Over allowed | Over limit |
|---|---|---|---|---|---|---|---|
| ingest utilisation, measured | not yet measured | ||||||
| query path utilisation | 0.57 | 40% | 0.60 | 1.00 | ok | 46% | 29% |
| ingest utilisation, quoted | 0.51 | 40% | 0.60 | 1.00 | ok | 44% | 22% |
| retention store fill | 0.58 | 30% | 0.70 | 1.00 | ok | 46% | 30% |
Source — observability-reference · the model to explore; each input with a range has a slider · 2 measured constants have no measurement yet, so figures that depend on them say not yet measured (why)
The four ceilings sit on three tiers: two on ingest, one on the query path, one on the retention store. Two mechanisms, not three, hold them up. Both ingest ceilings and the query ceiling rest on queueing, where response time climbs long before anything is fully busy (ch06). The store ceiling rests on rebuild: losing a node costs capacity you were using (ch11). The table’s Headroom column holds two margins: one for the three queueing ceilings and a smaller one for the store. The margins look alike only because both are percentages. That is the argument for declaring headroom per ceiling rather than one margin for the whole model.
Two of the three ceilings that can be computed divide a total with traces left out. The quoted
ingest ceiling divides the ingest of metrics and logs only. The store ceiling divides the data
stored for metrics and logs only. The query ceiling does not involve traces in its formula. Each
ceiling carries its reason in the model file, in a because key. Here are the two ingest ceilings
as the file writes them:
quoted_pipeline_utilisation:
kind: ceiling
unit: dimensionless
label: ingest utilisation, quoted
of: known_ingest / quoted_pipeline_capacity
limit: 1
headroom: 0.4
because: >-
A queueing ceiling, not a capacity one (ch06), so the margin is large: a pipeline at 80% of
quoted throughput has a queue in front of it, and a queue in front of an ingest pipeline is
dropped telemetry exactly when something is going wrong. Understated twice over — the
numerator excludes traces and the denominator is a vendor's claim.
pipeline_utilisation:
kind: ceiling
unit: dimensionless
label: ingest utilisation, measured
of: total_ingest / measured_pipeline_capacity
limit: 1
headroom: 0.4
because: >-
The honest version of the row above, and it cannot be computed. Both halves are missing a
measurement, which is the correct output of this model today.
The first because says the quoted ceiling is understated twice over: its numerator leaves out
traces, and its denominator is a vendor’s claim. The second ceiling divides the total with traces
by the measured capacity, and it cannot be computed because both halves wait on a measurement. Its
row reads not yet measured in the table above. The store ceiling’s because says the same of
stored data: a verdict of ok there means ok with traces ignored. ch20 is about
what it costs to forget.
What moves the answer
| Input | Kind | active series at its p10 | at its p90 | Swing |
|---|---|---|---|---|
| extra accidental label values | input | 8,707,235 | 36,791,133 | 28,083,898 |
| annual growth | input | 8,355,616 | 26,991,793 | 18,636,177 |
| different endpoint label values | input | 8,015,062 | 25,637,140 | 17,622,078 |
| different status label values | input | 11,134,620 | 20,745,024 | 9,610,404 |
| 8 more with a range, which do not reach it | 0 |
Source — observability-reference · the model to explore; each input with a range has a slider · 2 measured constants have no measurement yet, so figures that depend on them say not yet measured (why)
The accidental label is at the top of the tornado: the label nobody planned, added during an incident and never removed. ch08 sets this apart from a threshold: the accidental label makes label cardinality a wide product of counts, which a chain of multiplications can hold, and not a regime change.
Each bar swings one input from the low end of its band to the high end, with every other input
held at its point value. Only inputs the model draws at random get a bar: those given a
distribution in the file (a distribution key), and the measured constants, which carry a
standard error. An input given as one number has no bar, however much it matters. Two of those
multiply the active series count directly: hosts and metric names per host. Each is given as
one value (value:), with no distribution, so neither appears in the tornado. A slider range does
not make an input uncertain. The last row of the table counts the inputs that do have a spread but
do not reach the active series count at all. The chart gives the same count.
Turning the knobs
| Output | Reference scenario | The four knobs, turned down |
|---|---|---|
| metrics ingest | 4.69 1.03 to 30.0 | 2.35 0.514 to 15.0 |
| logs ingest | 44.7 9.66 to 164 | 4.47 0.966 to 16.4 |
| traces ingest | not yet measured | not yet measured |
| traces stored | not yet measured | not yet measured |
| ingest, metrics and logs only | 49.4 12.8 to 183 | 6.81 2.07 to 28.1 |
| stored, metrics and logs only | 278 86.0 to 1,330 | 29.8 9.19 to 146 |
| active series | 15,017,758 3,291,520 to 96,141,601 | 15,017,758 3,291,520 to 96,141,601 |
| label cardinality | 76.3 25.3 to 309 | 76.3 25.3 to 309 |
| retention cost, metrics and logs only | $4,084 $1,094 to $22,248 | $438.21 $116.76 to $2,430 |
| retention store fill | 0.579 0.179 to 2.77 | 0.0621 0.0192 to 0.304 |
| ingest utilisation, quoted | 0.514 0.133 to 1.91 | 0.0710 0.0216 to 0.292 |
| query path utilisation | 0.569 0.0747 to 3.44 | 0.569 0.0747 to 3.44 |
| ingest utilisation, measured | not yet measured | not yet measured |
| query path utilisation — over its limit | 29% | 29% |
| ingest utilisation, quoted — over its limit | 22% | 0% |
| retention store fill — over its limit | 30% | 0% |
Source — observability-reference and observability-knobs_turned_down · the model to explore; each input with a range has a slider · 2 measured constants have no measurement yet, so figures that depend on them say not yet measured (why)
The model has six knob inputs of four kinds: the scrape interval, a retention period for each of the three signals, the fraction of log lines kept and the trace sampling rate. The right-hand column is the same model with one knob of each kind turned down, the metrics retention being the one adjusted. Its interactive page has every slider already moved. The scenario file sets them like this:
overrides:
scrape_interval: 60
metrics_retention: 90
log_keep_rate: 0.1
trace_keep_rate: 0.01
Ingest and storage fall a long way when you compare the rows for ingest and for storage, metrics and logs only, across the two columns. Two ceilings went over their hard limit in a large share of the model’s futures, and in the right-hand column they almost never do: the quoted ingest ceiling and the store ceiling. Read the last two rows. So the knobs rescued two ceilings that were at risk.
The query ceiling does not move at all. Its row and its chance of going over the limit read the same in both columns. So do the active series count and label cardinality. The reason is in the formulas: none of the four knobs appears in the chain behind the query ceiling. The query path’s load is queries a second times series per query, and series per query is a base count times label cardinality. A query has to walk past every series that a label multiplied. Two things move the query ceiling: the size of the query tier, which is a decision you make, and fewer label values. Fewer label values means changing the application that emits the label, which is a conversation with whoever added it.
Where the inputs came from
| Input | Provenance | Source | |
|---|---|---|---|
| ○ | annual growthannual_growth | assumption | ch04 — telemetry grows faster than the traffic it describes, because teams add instrumentation as well as load. Lognormal like any growth rate — it compounds and cannot go negative — and wider than the web service’s for the same reason its median is higher |
| ○ | metric names per hostbase_metrics_per_host | assumption | distinct metric names exposed per host, before labels |
| ○ | collector corescollector_cores | assumption | the sizing decision for the ingest tier |
| ◐ | collector throughput, as quotedcollector_throughput_quoted | vendor claim | throughput per core as documented by the collector. Unverified here, and marked as a claim in every figure it appears in |
| ○ | horizonhorizon | assumption | the planning horizon for this platform |
| ○ | hostshosts | assumption | the estate’s host count as stated by its operators |
| ○ | extra accidental label valueslabel_values_accidental_extra | assumption | ch08 — the cardinality explosion, as a band rather than as a warning. Lognormal because this one has no ceiling: a label carrying a user id multiplies the series count by a number nobody chose, and a triangular would assert a maximum that does not exist. Counted from the second value, so the factor it feeds is never below one. |
| ○ | different endpoint label valueslabel_values_endpoint | assumption | distinct routes appearing as a label value. Triangular because the routes can be counted, so the range is known; the maximum is the routes that exist today, and a new service adds to it |
| ○ | different status label valueslabel_values_status | assumption | distinct status classes kept as a label. Triangular, and its bounds are firm unlike those of any other input in the model, because a request cannot carry a status the code does not emit |
| ○ | lines per requestlines_per_request | assumption | application log lines emitted per request served. Triangular, from reading a sample of the logs — and the maximum is the part to distrust, because a debug flag left on in production is outside it |
| ○ | fraction of log lines keptlog_keep_rate | assumption | a control knob: drop and aggregation rules |
| ○ | logs retentionlogs_retention | assumption | a control knob |
| ○ | metrics retentionmetrics_retention | assumption | a control knob |
| ● | one sample per seriesone_sample_per_series | fact | definition |
| ● | one yearone_year | fact | definition |
| ○ | queries per secondqueries_per_second | assumption | dashboards, alert rules and people, at the busy hour. Triangular because two of those three are countable and the third is not |
| ○ | query nodesquery_nodes | assumption | the sizing decision for the query tier |
| ◐ | query scan rate, as quotedquery_scan_rate_quoted | vendor claim | series scanned per second per query node, quoted |
| ○ | request raterequest_rate | assumption | ch04 — the busy hour across the estate, not the daily mean. Triangular, because a dashboard gives a lowest, a typical and a highest value and nothing more. The maximum is the busiest hour on record, not the busiest there will be |
| ○ | scrape intervalscrape_interval | assumption | a control knob: doubling it halves the metrics chain and loses resolution that cannot be recovered afterwards |
| ○ | series per query, before labelsseries_per_query_base | assumption | how many distinct metric-name-and-host combinations one dashboard panel or alert rule covers, before any label expansion. Triangular, and wide: dashboards differ from each other more than anything else in this model does |
| ○ | storage pricestorage_price | assumption | all-in cost of a usable TB-month on this tier. Lognormal because it is a price, and a price cannot go below zero. It was copied by hand from another model’s unit economics, as a range, rather than passed across with that model’s own spread. That seam between two models is ch18’s subject |
| ○ | store nodesstore_nodes | assumption | the sizing decision for the retention tier |
| ○ | trace sampling ratetrace_keep_rate | assumption | a control knob, and the one with the widest range: head sampling at 1% and at 100% are two different platforms |
| ○ | traces retentiontraces_retention | assumption | a control knob |
| ○ | usable TB per store nodeusable_tb_per_node | assumption | usable capacity per storage node after replication |
| 26 inputs | 2 facts, 2 vendor claims, 22 assumptions |
Source — observability-reference · the model to explore; each input with a range has a slider · 2 measured constants have no measurement yet, so figures that depend on them say not yet measured (why)
| Constant | Value | Standard error | Unit | Measured against |
|---|---|---|---|---|
collector throughput per core, measured collector_throughput_measured | not yet measured | — | MB/s/core | bench/results/collector-throughput-per-core.json does not exist |
bytes per log line, compressedlogs_line_bytes | 32.4 | ± 0.0044 | bytes / line | python zlib (DEFLATE level 6) |
bytes per sample, compressedmetrics_sample_bytes | 9.37 | ± 0.0009 | bytes / sample | this repository’s encoder, not any product’s |
spans per requestspans_per_request | not yet measured | — | span/request | bench/results/traces-spans-per-request.json does not exist |
bytes per span, compressedtraces_span_bytes | 73.6 | ± 0.0173 | bytes / span | python zlib (DEFLATE level 6) |
Source — observability-reference · the model to explore; each input with a range has a slider · 2 measured constants have no measurement yet, so figures that depend on them say not yet measured (why)
What this cannot tell you
The log store fills at the busy-hour rate. The log chain starts from the request rate, and the request rate in this model is the busy hour across the estate, not the daily mean. Logs stored is logs ingest times the retention period. So the model fills the log store as if every hour of the retention period were the busy hour. The model has no ratio between the busy hour and the mean, which the web service model carries (ch04). So it cannot say by how much the log store is oversized. The metrics chain does not have this fault: a scrape takes one value from each series on a timer, whatever the traffic.
The store holds nothing but compressed data. Every stored figure is ingest times retention, and nothing else. The model has no term for anything a store keeps beside the compressed data, such as indexes. The bytes per sample, per line and per span were measured with this repository’s own encoder and a general-purpose compressor, not with any store’s own format. The Measured against column of the table above says which for each.
The query path does not grow. Neither the host count nor the growth factor appears in it. So the query ceiling at the end of the horizon is the query ceiling today, while ingest and storage grow. The query path also counts series, not time: a query over a long stretch of history costs the model the same as a query over the last few minutes. No retention or time-range term feeds it.
Drawing more futures from the model will not find any of these. Each is a term the file does not contain, and ch20 is about that kind of error.
Running it yourself
python3 -m bench.run_models --model observability
python3 scripts/verify-models.py
python3 scripts/render-figures.py
python3 -m pytest tests/test_models.pyTwo measurements are missing, and they are of different kinds.
Spans per request: take it on a system you run, and stamp it as an estate observation that
records the system, the window it covers and the date. With it, span rate, traces ingest, traces
stored and total ingest get values.
Collector throughput per core: a rig measurement, taken on the reference machine. With it, the
measured pipeline capacity gets a value. The ceiling ingest utilisation, measured needs both measurements.
Once a result file exists, re-run the commands above. Nothing in the model file changes: the two nodes already name the files they read. The not yet measured rows in the tables then show values, and the dashed nodes in the graph fill in.