[−][src]Module opentelemetry::api::metrics::counter
Metrics Counter Interface
Counters support add(value, label_set)
. Choose this kind of metric when
the value is a quantity, the sum is of primary interest, and
the event count and value distribution are not of primary interest.
Counter
s are defined as monotonic = true
by default, meaning
that positive values are expected. monotonic = true
counters are
typically used because they can automatically be interpreted as a rate.
When passing MetricOptions
, counters can be declared as with_monotonic(false)
,
in which case they support positive and negative increments.
monotonic = false
counters are useful to report changes in an
accounting scheme, such as the number of bytes allocated and
deallocated.
Traits
Counter | An interface for recording values where the sum is of primary interest. |
CounterHandle |
|