private <T> void logHC(HystrixInvokable<T> command, T response) { if (command instanceof HystrixInvokableInfo) { HystrixInvokableInfo<T> commandInfo = (HystrixInvokableInfo<T>) command; HystrixCommandMetrics metrics = commandInfo.getMetrics(); System.out.println( "cb/error-count/%/total: " + commandInfo.isCircuitBreakerOpen() + " " + metrics.getHealthCounts().getErrorCount() + " " + metrics.getHealthCounts().getErrorPercentage() + " " + metrics.getHealthCounts().getTotalRequests() + " => " + response + " " + commandInfo.getExecutionEvents()); } }