I'm exposing some custom metrics from my Quarkus application using microprofile MetricRegistry
class. Those metrics are consumed and exposed to Prometheus through the /metrics
endpoint.
For testing purposes I'd like to reset/clear all metrics during the tearDown()
part of the test. I don't mind creating a REST endpoint, that'll only be available under the test
profile, to clear these metrics via an API call.
I couldn't find how to achieve that on the internet so far, does anybody have any idea on how to do that?