Spring / Resilience4j Interview questions
How do you monitor Resilience4j metrics with Micrometer?
The resilience4j-micrometer module exposes each registry's metrics by binding it directly to a Micrometer MeterRegistry, after which Micrometer's usual exporters (Prometheus, Datadog, CloudWatch, etc.) pick the data up like any other application metric.
TaggedCircuitBreakerMetrics .ofCircuitBreakerRegistry(circuitBreakerRegistry) .bindTo(meterRegistry);
This produces metrics such as resilience4j_circuitbreaker_calls (tagged by outcome - successful, failed, not_permitted), resilience4j_circuitbreaker_state (a gauge per state), and resilience4j_circuitbreaker_failure_rate, each automatically tagged with the instance name so multiple named breakers show up distinctly on the same dashboard.
In a Spring Boot app with the actuator and Micrometer starters already on the classpath, this binding is largely automatic once resilience4j-spring-boot3 detects a MeterRegistry bean, so most teams only need to add the dependency and expose the relevant Prometheus/actuator endpoint rather than wire the binding by hand.
More Related questions...