Skip to content

Document that Micrometer's "error" tag should be preferred vs. legacy "exception" tag #31514

Closed
@chicobento

Description

@chicobento

On Spring Boot 3 besides exception, method, outcome, status and uri, the error 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 return Tags.empty().

On a side note, an additional undocumented behavior added by DefaultMeterObservationHandler is the http.server.requests.active metrics. Should this be documented ?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions