Open tibbe opened 10 years ago
Somewhat playing devils advocate should counters always be increasing or is that just for RRD support? I'm using something similar for an inflight request count, incrementing at the start and decrementing on completion, otherwise something like that would have to be a gauge and somewhat manual.
The main reason is that if you're guaranteed that a counter is non-decreasing, you can detect when a process you're monitoring crashes (because the counter would go backwards) and correct for it.
To partly address #2 we should raise an exception if someone passes a negative argument to
Counter.add
.