Skip to content

Handle missing exceptions in WebMvcMetricsFilter #16014

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

Closed
wants to merge 1 commit into from

Conversation

izeye
Copy link
Contributor

@izeye izeye commented Feb 22, 2019

This PR changes to handle missing exceptions in WebMvcMetricsFilter.filterAndRecordMetrics(). This was originally reported in micrometer-metrics/micrometer#1190.

@kbalsam
Copy link

kbalsam commented Mar 12, 2019

@izeye I am having this issue as well I believe (metrics with status:200 and status:400 have the corresponding tags, but I can't see status:500 tags). Also, I think your build failed.
[INFO] Spring Boot Data REST Sample ....................... FAILURE [ 15.998 s]

@kbalsam
Copy link

kbalsam commented Mar 12, 2019

@izeye I am having this issue as well I believe (metrics with status:200 and status:400 have the corresponding tags, but I can't see status:500 tags). Also, I think your build failed.
[INFO] Spring Boot Data REST Sample ....................... FAILURE [ 15.998 s]

Correction, I was being foolish. I had created a WebMvcTagsProvider, but had not carried over WebMvcTags.status(response).

@bclozel bclozel added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 13, 2019
@bclozel bclozel added this to the 2.0.9 milestone Mar 13, 2019
@bclozel bclozel changed the title Handle missing exceptions in WebMvcMetricsFilter.filterAndRecordMetrics() Handle missing exceptions in WebMvcMetricsFilter Mar 13, 2019
bclozel pushed a commit that referenced this pull request Mar 13, 2019
Prior to this commit, exceptions nested in
`NestedServletExceptions` would not be recorded by the
`WebMvcMetricsFilter`. This commit ensures that exceptions
happening downstream (e.g. happening while writing the response
body itself) are properly recorded.

See micrometer-metrics/micrometer#1190
See gh-16014
@bclozel bclozel closed this in 6138041 Mar 13, 2019
@izeye izeye deleted the micrometer-gh-1190 branch March 13, 2019 11:58
@izeye
Copy link
Contributor Author

izeye commented Mar 13, 2019

@bclozel Thanks for merging this and adding tests 👍

I created micrometer-metrics/micrometer#1284 to backport the changes into the Spring Boot legacy module in Micrometer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants