You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HealthCheckResponse interface (and its record implementation HealthCheckResponseImpl) and the associated builder do not support a name.
The result is that developers cannot create a convenient lambda which returns a health check response that also has a name. Lambda-based responses appear, with details enabled in the output, like this:
Developers can, of course, write a class which implements HealthCheck and apply the name to the check (not the response) but that approach does not allow the convenience of using in-line lambdas.
Steps to reproduce
Add a health check response in-line something like this:
The name defaults to the simple name of the class. To get a nice name, you can implement the HealthCheck interface, where you can provide custom name, path, and type of the Health check.
To get a nice name, you can implement the HealthCheck interface, where you can provide custom name, path, and type of the Health check.
Yes, as noted in the issue description.
Maybe we could add another method to HealthObserver.builder()
Looks like a good solution, especially given that:
As you pointed out in a private DM, associating a name with a health response would potentially allow different responses to the same health check to have different names, which would be confusing at best.
This would be a backward-compatible change and we could add it later in an update to 4.0.
Environment Details
Problem Description
The
HealthCheckResponse
interface (and itsrecord
implementationHealthCheckResponseImpl
) and the associated builder do not support a name.The result is that developers cannot create a convenient lambda which returns a health check response that also has a name. Lambda-based responses appear, with details enabled in the output, like this:
Developers can, of course, write a class which implements
HealthCheck
and apply the name to the check (not the response) but that approach does not allow the convenience of using in-line lambdas.Steps to reproduce
Add a health check response in-line something like this:
You get a name like the example above.
The text was updated successfully, but these errors were encountered: