Skip to content

Controller level exceptions not getting populated in HTTP server requests metrics #33731

@bunty-raghani

Description

@bunty-raghani

Exceptions handled at the controller level are not populated in the http.server.requests metrics.

As per the official docs, we need to set the request attribute in @ExceptionHandler method before returning a response. I tried this approach but exceptions are not included in "availableTags -> exception array".

Observed this issue only for exceptions that are handled at the controller level. For other exceptions, that are internally handled by the spring framework, such exceptions are visible in metrics.

Endpoint: /actuator/metrics/http.server.requests
Spring Boot Version: 3.0.1 (also, tried 3.0.2-SNAPSHOT)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions