client_java icon indicating copy to clipboard operation
client_java copied to clipboard

How to remove all metrics in the defaultRegistry

Open michaelschuett-tomtom opened this issue 10 months ago • 6 comments

Hello I was trying to figure out a good way to test some metrics in our application but I can't find a good way to clean out the default registry since it's not recreated during tests with mvn. This causes some tests to fail if for instance you use the same "test_metric" name twice. Does anyone have any example to clear out the registry as I couldn't find anything when looking through the code.

It looks like this is not possible based on this. So i guess my general question is how does one test with this library in use?

michaelschuett-tomtom avatar Apr 08 '24 14:04 michaelschuett-tomtom