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
Would it make sense to implement also the info endpoint? (in fact I would probably move most of the output to the info endpoint instead of the health endpoint, but it is just an opinion)
Just in case anyone bumps into this issue, my workaround implementing the info actuator so far is:
@Component
public class Web3jInfoContributor implements InfoContributor {
@Autowired
HealthContributorRegistry registry;
@Override
public void contribute(Builder builder) {
Map<String, Object> web3jhealthinfo = registry.stream().
// Work only on the web3j HealthContributor
filter(x -> (x.getName().equals("web3j") && x.getContributor() instanceof HealthIndicator)).
// Get the HealthIndicator from the HealthContributor
map(x -> ((HealthIndicator) x.getContributor()).
// Get Health->Details->Map<String,Object>
health().getDetails())
.findFirst().orElse(null);
builder.withDetail("web3j", web3jhealthinfo);
}
}
The text was updated successfully, but these errors were encountered:
I was greatly surprised to see that /actuator/health is implemented ;-)
Would it make sense to implement also the info endpoint? (in fact I would probably move most of the output to the info endpoint instead of the health endpoint, but it is just an opinion)
https://github.com/web3j/web3j-spring-boot-starter/blob/master/src/main/java/org/web3j/spring/actuate/Web3jHealthIndicator.java
Just in case anyone bumps into this issue, my workaround implementing the info actuator so far is:
The text was updated successfully, but these errors were encountered: