I am trying to replace PrometheusMeterRegistry
with micormeter's LoggingMeterRegistry
in order to export metrics as log events in a specific format. When executing my unittests I have noticed that the Counter
meters are not showing the correct counts after retrieving the measurments with Meter#measure()
. Here you can find a minimal example reproducing the behaviour described. The test case work5
calls a methode 5
times, withing the method a counter is registered and incremented. The expected counter value is then 5
, with the PrometheusMeterRegistry
the actual value is also 5
, with LoggingMeterRegistry
the actual value is 0
.
- Is something wrong with my test setup or usage of the
LoggingMeterRegistry
and thus the expectation is wrong? - If not, then how to make
LoggingMeterRegistry
behave correctly?