When querying metrics, I would like to be able to query metrics related to endpoints (http.server.requests) such that I can filter out non-user facing endpoints like the Actuator endpoints. When monitoring, I want to look at things like request rate, error rate, and latency on user-facing endpoints, without access to the Actuator endpoints affecting those metrics.
If such filtering were possible, it could be used in excluding Actuator endpoints from alerts and graphs and ad hoc queries, when desired.
Some metrics backends may allow querying with wildcards/regex to approximate this. For example, in PromQL, the 5m request rate excluding Actuator endpoints might be written like this:
rate(http_server_requests_seconds_count{uri !~ "/actuator.*"}[5m])
But for a query like above to work, it would require all applications use the same management context-path. Having a simpler, more robust way to filter via a tag would be helpful.
/CC @jkschneider
Comment From: wilkinsona
This feels to me like something that could build on #13064 with something that's aware of all the actuator endpoint paths contributing a tag for requests made to those paths. We should consider the performance impact of any such contribution as it will have to perform matching against every request.
Comment From: wilkinsona
https://github.com/spring-projects/spring-framework/issues/29210 may help with this.