Refactor CircuitBreaker to rely on external metrics for failure count