Class MetricCollectingCircuitBreakerListener

java.lang.Object
com.linecorp.armeria.client.circuitbreaker.MetricCollectingCircuitBreakerListener
All Implemented Interfaces:
CircuitBreakerListener

public final class MetricCollectingCircuitBreakerListener
extends Object
implements CircuitBreakerListener
A CircuitBreakerListener which exports the status of CircuitBreakers to MeterRegistry.

This class will generate the following metrics:

metrics that will be generated by this class
metric namedescription
<name>.requests{name="<circuit breaker name>",result="success"} The number of successful requests in the counter time window.
<name>.requests{name="<circuit breaker name>",result="failure"} The number of failed requests in the counter time window.
<name>.transitions{name="<circuit breaker name>",state="CLOSED"} The number of circuit breaker state transitions to CircuitState.CLOSED.
<name>.transitions{name="<circuit breaker name>",state="OPEN"} The number of circuit breaker state transitions to CircuitState.OPEN.
<name>.transitions{name="<circuit breaker name>",state="HALF_OPEN"} The number of circuit breaker state transitions to CircuitState.HALF_OPEN.
<name>.rejectedRequests{name="<circuit breaker name>"} The number of requests rejected by the circuit breaker.