Expand description
The exporter’s ledger (#228, RFC 13 §3 Exporter obligations): samples
in, an ExportSnapshot out, and every blind spot counted on the way.
Pure by the layer’s rule — nothing here takes a session. The frontend
(zenctl export) decodes a sample structurally, describes its key, and
hands both to ExportLedger::ingest; a scrape is one
ExportLedger::fold over the monitor’s counters, the statistics table,
the roster’s departures and the last doctor run. A .zrec replayed
through the same two calls would fold to the same series.
A series is the contract, not the wire. Its identity is (origin, producer, declared pattern, {var} bindings, field); its name and unit
are the registry’s; a key that does not refine is counted under
unregistered_keys and never exported. Everything the ledger refuses —
a population past its declared cardinality, a series past
max_series, a field past the per-subject cap, a text kind, a payload
with no number in it — is counted by reason, because to a scraper a
series that was never made and a series that stopped look the same, and
only a count tells them apart.
Coalescing is the third O6 kind. Between two folds only the newest value per series survives; the samples folded into it are counted, and the count rides the exposition beside the drops and the evictions.
Structs§
- Doctor
Run - A doctor report with the time it finished.
- Export
Ledger - The ledger.
- Fold
Inputs - What one fold reads besides the ledger.
- Observed
- One sample, as the frontend hands it over.
Enums§
- Payload
Verdict - A payload verdict as the ledger counts it — the three populations, with every reason a payload was not validated folded into the third (RFC 13 §3: never a ratio that hides it).
Constants§
- DEFAULT_
MAX_ SERIES - The default
--max-seriesbound. - FIELD_
CAP - How many top-level numeric fields one subject family may fan out into
when its payload is an object rather than one leaf value. Past it, the
overflow is counted under
suppressed["fields"]. - WILDCARD_
EXCLUDES - The planes a
*/**selector cannot reach, named verbatim (RFC 03 §4 D2/D4; RFC 13 §3 O5).
Functions§
- excluded_
by - What a wildcard scope leaves out: the verbatim planes when any scope carries a wildcard, nothing when every scope is concrete.