spring-boot icon indicating copy to clipboard operation
spring-boot copied to clipboard

Failing calls to reactive health indicators are not logged

Open jGleitz opened this issue 3 years ago • 1 comments

In https://github.com/spring-projects/spring-boot/issues/22632, it was decided to log WARN messages whenever a HealthIndicator reports a status of DOWN and adds an exception to the builder. This was implemented in AbstractHealthIndicator, but not in AbstractReactiveHealthIndicator. AbstractReactiveHealthIndicator still only logs if doHealthCheck throws or returns an error Mono.

For the same reasons as in https://github.com/spring-projects/spring-boot/issues/22632, and for reasons of consistency, AbstractReactiveHealthIndicator should also log a WARN message when doHealthCheck returns a Mono that resolves to a Health with status DOWN and an exception.

jGleitz avatar Sep 28 '22 13:09 jGleitz

@snicoll and I have discussed this and we think it should be treated as a bug of omission. The logging should have been added in 2.6 as part of #22632.

wilkinsona avatar Sep 29 '22 09:09 wilkinsona

I've created a PR #33774 for this.

mhalbritter avatar Jan 12 '23 10:01 mhalbritter

Superseded by https://github.com/spring-projects/spring-boot/pull/33774

mhalbritter avatar Jan 17 '23 13:01 mhalbritter