Skip to main content

Module frames

Module frames 

Source
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, whose telemetry.v1 declaration 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, known by no change or within its 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 Fold reads one key’s frames through a crate::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), and crate::telemetry::pair reads a narrow one in a serial window (v2 §2.20). Its rate is timed by its records (RecordTime, v2 §2.21).

Structs§

FieldSeries
One field’s series (v2 §2.16, §2.17): which field, and the kind, unit and semantic its entry gives it.
FieldValue
A series field’s value: the metric’s, and §7.6’s JSON reading, which keeps a fixed gauge’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: None for the annotation whole.
RecordSeries
One record of a frame, folded.
SeriesRead
One series field of one record, folded.

Enums§

FieldReading
One series field of one record, as a reader reads it (v2 §2.18).
Reason
Why a frame resource’s telemetry.series is 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 a counter, a gauge an int or a fixed, a boolean a bool, a text an enum. Nothing carries a histogram or bytes, and a time carries no kind.
mirror_in
What a mirror names in c (v2 §2.16): the telemetry.v1 declaration of the one resource whose template is name, when it is no frame resource and has no parameter; None otherwise.
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::Reader read 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 fields and its resolved annotations (core §9.3, v2 §2.16). mirror answers what a mirror names: None when it names no single resource of the interface, a frame resource or a template with a parameter, else that resource’s telemetry.v1 declaration (super::declaration_of).
series_of
series of a contract’s frame resource, its mirrors read in the contract (mirror_in). None for a resource that is no frame resource, or whose record type does not resolve (a contract that does not load).