Is there a way to intercept HTTP requests to Actuator? I tried inheriting WebMvcEndpointHandlerMapping but the actuator endpoint is not visible. I need to reset the metric once the Prometheus server pulls the metrics. Couldn't find any solution on StackOverflow and other forums.
Comment From: bclozel
Thanks for getting in touch, but it feels like this is a question that would be better suited to StackOverflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.
As a principle, metrics should not be changed or reset because they have been read; only the behavior being measured should have an effect on the value. I don't think you should do that in the first place.