-
- All Implemented Interfaces:
public final class CounterMetric extends Metric<Long>
A long metric wrapper for Prometheus Counters, which are monotonically increasing. Provides atomic operations such as incAndGet.
-
-
Constructor Summary
Constructors Constructor Description CounterMetric(String name, String help, String namespace, Long initialValue)CounterMetric(String name, String help, String namespace)
-
Method Summary
Modifier and Type Method Description StringgetName()the name of this metric Longget()Supplies the current value of this metric. final LongaddAndGet(Long delta)Atomically adds the given value to this counter, returning the updated value. final LongincAndGet()Atomically increments the value of this counter by one, returning the updated value. final Unitinc()Atomically increments the value of this counter by one.
-