Expand description
telemetry.v2’s frames (spec/profiles/telemetry/v2.md §2.16–§2.21,
#983 T1): a frame resource’s fields bound to metric series.
series(fields, annotations, mirror) ─▶ declared [FieldSeries…] │ invalid [problems] │ ignored │ not this profile's
reading_of(series, field, slot, state) ─▶ sample │ held │ absent │ owner_error │ beyond_range │ unnamed │ unknown
Fold::apply(layout, series, stamp, frame, arrival) ─▶ each record's readings, each counter sample's pair- The declaration is the frame resource’s
telemetry.series(series,series_of): each entry binds one field to a series, inline ({kind, unit, semantic}) or by a mirror, a non-frame metric resource of the interface with no parameter, whosetelemetry.v1declaration lends its kind, unit and semantic (v2 §2.16). A field’s packed type carries the kind (carries). - The series is (frame key, field), never the mirrored key (v2 §2.17): the mirror is a label.
- A sample is a record that includes the field with a value
(
reading_of, v2 §2.18). An omitted field holds a value,knownby no change orwithinits deadband (core §7.7), and is no sample. A reserved code, an absent field, the escape and an unknown field are no value, never 0. - The epoch is the run (v2 §2.19): a
Foldreads one key’s frames through acrate::frame::Reader, and two samples are of one epoch when no frame between them was read as a rewind or another run’s. - A counter carries its field’s width (
Measure::Counter), andcrate::telemetry::pairreads a narrow one in a serial window (v2 §2.20). Its rate is timed by its records (RecordTime, v2 §2.21).
Structs§
- Field
Series - One field’s series (v2 §2.16, §2.17): which field, and the kind, unit and semantic its entry gives it.
- Field
Value - A series field’s value: the metric’s, and §7.6’s JSON reading, which
keeps a
fixedgauge’s decimal exact. - Fold
- One frame key’s series, as a reader folds its frames (v2 §2.18–§2.21):
the key’s
crate::frame::Reader, the epoch it reads its samples under, and each counter series’ last sample. - Folded
- A frame, folded.
- Position
- Where a sample lies among a
Fold’s frames: the frame, counted from 0 as the fold applied them, and the record’s index in it. - Problem
- One reason, and the entry it is of:
Nonefor the annotation whole. - Record
Series - One record of a frame, folded.
- Series
Read - One series field of one record, folded.
Enums§
- Field
Reading - One series field of one record, as a reader reads it (v2 §2.18).
- Reason
- Why a frame resource’s
telemetry.seriesis invalid (v2 §2.16), in the order a reader checks each entry. - Series
- What a reader reads of a frame resource (v2 §2.16).
Constants§
- INLINE
- The members an inline series may hold (v2 §2.16).
Functions§
- carries
- Whether a field’s packed type carries
kind(v2 §2.16): a counter acounter, a gauge anintor afixed, a boolean abool, a text anenum. Nothing carries a histogram or bytes, and atimecarries no kind. - mirror_
in - What a mirror names in
c(v2 §2.16): thetelemetry.v1declaration of the one resource whose template isname, when it is no frame resource and has no parameter;Noneotherwise. - reading_
of - Reads one series field of one record (v2 §2.18): its slot in the
record (core §7.7’s body) and its state as the key’s
crate::frame::Readerread it. A sample is a slot that included the field with a code that is a value; an omitted field holding a value is held, no sample; a reserved code, an absent field, an escape and an unknown state are no value, included or held. - series
- Reads a frame resource’s series from its record type’s
fieldsand its resolved annotations (core §9.3, v2 §2.16).mirroranswers what a mirror names:Nonewhen it names no single resource of the interface, a frame resource or a template with a parameter, else that resource’stelemetry.v1declaration (super::declaration_of). - series_
of seriesof a contract’s frame resource, its mirrors read in the contract (mirror_in).Nonefor a resource that is no frame resource, or whose record type does not resolve (a contract that does not load).