Skip to content
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

Web MVC metrics don't work if another FilterRegistrationBean is present in context #31268

Closed
yurybubnov opened this issue Jun 7, 2022 · 1 comment
Labels
status: duplicate A duplicate of another issue

Comments

@yurybubnov
Copy link

In WebMvcMetricsAutoConfiguration bean webMvcMetricsFilter has condition @ConditionalOnMissingBean.
The signature of the method as follows

public FilterRegistrationBean<WebMvcMetricsFilter> webMvcMetricsFilter

So Spring context is looking for the existing FilterRegistrationBean bean.

In our case we have FilterRegistrationBean from JerseyAutoConfiguration which is loaded first and thus webMvcMetricsFilter is not created and no Web MVC metrics are reported.
The webMvcMetricsFilter should have condition @ConditionalOnMissingFilterBean(WebMvcMetricsFilter.class) I think

@wilkinsona
Copy link
Member

Thanks for the report. This is a duplicate of #31150.

@wilkinsona wilkinsona added the status: duplicate A duplicate of another issue label Jun 7, 2022
@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants