-
Brian Clozel authored
Prior to this commit, some exceptions handled at the controller or handler function level would: * not bubble up to the Spring Boot error handling support * not be tagged as part of the request metrics This situation is inconsistent because in general, exceptions handled at the controller level can be considered as expected behavior. Also, depending on how the exception is handled, the request metrics might not be tagged with the exception. This will be reconsidered in gh-23795. This commit prepares a transition to the new situation. Developers can now opt-in and set the handled exception as a request attribute. This well-known attribute will be later read by the metrics support and used for tagging the request metrics with the exception provided. This mechanism is automatically used by the error handling support in Spring Boot. Closes gh-24028
72a1eb63