Skip to main content

Module export

Module export 

Source
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§

DoctorRun
A doctor report with the time it finished.
ExportLedger
The ledger.
FoldInputs
What one fold reads besides the ledger.
Observed
One sample, as the frontend hands it over.

Enums§

PayloadVerdict
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-series bound.
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.