Open
Description
Describe the bug
Java enabler and spring enabler renew state in DS always as UP, although the real state is different.
Steps to Reproduce
- create a service
- define your own health indicator
@component
@requiredargsconstructor
public class MyHealthIndicator extends AbstractHealthIndicator {
@OverRide
protected void doHealthCheck(Health.Builder builder) {
builder.down();
}
}
/actuator/health returns status DOWN
APIML has status UP
Expected behavior
The service has status down in the APIML
Additional context
Java enabler can implement HealtCheck based on local REST call because configuration should contain property statusPageRelativeUrl
.
Spring enabler can fetch all beans to calculate state, like:
private final ApplicationContext applicationContext;
@Override
public void register(ApiMediationServiceConfig config, Ssl ssl) {
super.register(config, ssl);
ApiMediationClient apiMediationClient = super.getApiMediationClient();
if (apiMediationClient.getEurekaClient() != null) {
registerHealthIndicators(apiMediationClient.getEurekaClient());
}
}
... or use the same mechanism via REST call, fetching of beans can be more useful (independent of network)
Metadata
Metadata
Assignees
Type
Projects
Status
Unplanned Bugs