A counter is a metrics type that:
This is the same as many counters in the world such as the mileage counter in a car.
Without rate aggregation over a time window, this metric is not really useful and represents only:
They are used to measure the rate (the throughput) at which some event is occurring over a given time interval.
Example:
A counter reports:
Counter counter = Counter
.builder("counter")
.baseUnit("beans") // optional
.description("a description of what this counter does") // optional
.tags("region", "test") // optional
.register(registry);