-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Document that Micrometer's "error" tag should be preferred vs. legacy "exception" tag #31514
Comments
Thread on micrometer slack on this issue: https://micrometer-metrics.slack.com/archives/C030GTHE4P6/p1672670045511959 |
I agree with @jonatan-ivanov 's assessment in this Slack thread. I see 3 solutions for this:
I think 3) is the best solution. We could revisit this in the future, but I can't think of a proper milestone for this change. Typically, metrics dashboards deal with multiple applications, built with various Spring Boot versions. Unless there's a strong driver for this removal, I don't think this is worth breaking people. I'm going to turn this into a documentation improvement and call out in our reference documentation that the |
@bclozel fair enough, sounds like a plan. just a heads up that |
@bclozel 👍🏼 Maybe it makes sense to provide the way in the docs to remove the exception tag if users want to:
A step forward could be (if users asks for it?) something similar that we have with common tags: if |
@chicobento As you mentioned neither Please let us know if you found any issues. |
On Spring Boot 3 besides
exception
,method
,outcome
,status
anduri
, theerror
tag is also being generated:http_server_requests_count{error="none" ... }
This tag is not on official docs neither ServerHttpObservationDocumentation class and overlaps with exception tag.
Looking at the code it seems that this behavior is added by micrometer's DefaultMeterObservationHandler which is configured by ObservationAutoConfiguration.
A possible quick-fix would be to override
DefaultMeterObservationHandler#createErrorTags
to returnTags.empty()
.On a side note, an additional undocumented behavior added by DefaultMeterObservationHandler is the
http.server.requests.active
metrics. Should this be documented ?The text was updated successfully, but these errors were encountered: