Skip to main content

Module peak

Module peak 

Source
Expand description

Gauges that keep the exact maximum over a sliding window.

PeakGauge keeps the exact maximum over a window of the same length as that of the quantile gauges, for values that move faster than the scrape interval and would otherwise only ever be sampled at one arbitrary instant. PeakGaugeVec keeps one such peak for each value of a label. IntGaugeWithPeakGauge pairs an IntGauge with such a peak.

Structsยง

IntGaugeWithPeakGauge
An IntGauge and its peak over the window, as a PeakGauge. The peak is observed at each increment, and a scrape reports at least the current value of the gauge. A decrement that runs between an increment and the observation that follows it can make the peak miss the value the increment gave.
PeakGauge
The highest value observed over the window, exposed as <name>. The value is exact. It is a scalar from PeakGauge::register, or the gauge of one label value from PeakGaugeVec::with_label_values.
PeakGaugeVec
The highest value observed over the window per value of one label, exposed as <name>{<label>="..."}. A series stays after its window empties and then reports zero, so the label values must be a small fixed set.