-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Description
This in relation to #13064 (comment), where Phil asked me to create a new issue.
In a Spring-MVC Boot app, http.server.requests
metrics are always reported with a root
uri if the request, which would be mapped to Spring-MVC controller under normal circumstances, is handled by a servlet Filter instead. This happens for example when using Spring Security.
The reason is that the WebMvcTags
uses the path info of the request in these situations, which is always null
because the DispatcherServlet
is mapped as a default servlet: the whole path is then present in the servlet path instead.
I would suggest to revisit the class to use the servlet path instead to have more reliable metrics. Per Phil's request I've attached a simple project to demonstrate the current behavior.
root-uri-demo.zip