[−][src]Module opentelemetry::api::metrics::gauge
Metrics Gauge Interface
Gauges support set(value, label_set). Gauge metrics express
a pre-calculated value that is either set by explicit instrumentation
or observed through a callback. Generally, this kind of metric should
be used when the metric cannot be expressed as a sum or because the
measurement interval is arbitrary. Use this kind of metric when the
measurement is not a quantity, and the sum and event count are not of
interest.
Gauges are defined as monotonic = false by default, meaning that new
values are permitted to make positive or negative changes to the
gauge. There is no restriction on the sign of the input for gauges.
As an option, gauges can be declared as with_monotonic(true), in which case
successive values are expected to rise monotonically. monotonic = true
gauges are useful in reporting computed cumulative sums, allowing an
application to compute a current value and report it, without
remembering the last-reported value in order to report an increment.
Traits
| Gauge | An interface for recording values where the metric cannot be expressed as a sum or because the measurement interval is arbitrary. |
| GaugeHandle |
|