-
Notifications
You must be signed in to change notification settings - Fork 41.2k
HttpRequestMethodNotSupportedException prevents timing in WebMvcMetricsFilter #15204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the report, @izeye, but, ideally, I think this should be tackled in Spring MVC. The javadoc for Can you please open a Spring Framework JIRA ticket for this and comment here with a link to it? I'll close this one for now. We can re-open it if necessary depending on the outcome of the Framework issue. |
@wilkinsona Thanks for the quick feedback! I created https://jira.spring.io/browse/SPR-17518 |
SPR-17518 has resulted in the addition of a new request attribute that makes the handler available. We need to rework |
Great! This will avoid duplicate handler lookups and improve runtime performance when actuator is enabled. |
The new request attribute for the handler works nicely for standard request timings, but, unfortunately, does not work for long task timers. There is only a single long task timer per registry for each unique combination of name and tags. The name comes from the I wonder if we should move support for long task timers into a What do you think, @bclozel and @jkschneider? |
I agree - while in general we should measure response times as broadly as possible, moving the
|
This was originally reported in micrometer-metrics/micrometer#1011.
HttpRequestMethodNotSupportedException
prevents timing inWebMvcMetricsFilter
and a simple fix seems to be just ignoringHttpRequestMethodNotSupportedException
infilterAndRecordMetrics()
and usingnull
handler
but I'm opening an issue in case there's a better approach for it. If ignoringHttpRequestMethodNotSupportedException
is a right approach, I can create a PR for it.Here is a sample project to reproduce it: https://github.com/izeye/sample-micrometer-spring-boot/tree/micrometer-gh-1011-2.1.0
Reproduction steps as follows:
The text was updated successfully, but these errors were encountered: