Interface CircuitBreakerTelemetry

  • All Known Implementing Classes:
    CircuitBreakerNoopTelemetry$

    public interface CircuitBreakerTelemetry
    Service Provider Interface (SPI) for collecting metrics from Circuit Breaker.

    Implementations must include a single constructor with two arguments: Circuit Breaker id and ExtendedActorSystem. To setup your implementation, add a setting in your application.conf:

    
     akka.circuit-breaker.telemetry.implementations += com.example.MyMetrics
     
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onCallBreakerOpenFailure()
      Invoked for each call when the future is completed with akka.pattern.CircuitBreakerOpenException
      void onCallFailure​(long elapsedNanos)
      Invoked for each call when the future is completed with exception, except for scala.concurrent.TimeoutException and CircuitBreakerOpenException that are handled by separate methods.
      void onCallSuccess​(long elapsedNanos)
      Invoked for each successful call.
      void onCallTimeoutFailure​(long elapsedNanos)
      Invoked for each call when the future is completed with java.util.concurrent.TimeoutException
      void onClose()
      Invoked when the circuit breaker transitions to the close state.
      void onHalfOpen()
      Invoked when the circuit breaker transitions to the half-open state after reset timeout.
      void onOpen()
      Invoked when the circuit breaker transitions to the open state.
      void stopped()
      Called when the circuit breaker is removed, e.g.
    • Method Detail

      • onCallBreakerOpenFailure

        void onCallBreakerOpenFailure()
        Invoked for each call when the future is completed with akka.pattern.CircuitBreakerOpenException
      • onCallFailure

        void onCallFailure​(long elapsedNanos)
        Invoked for each call when the future is completed with exception, except for scala.concurrent.TimeoutException and CircuitBreakerOpenException that are handled by separate methods.

        Parameters:
        elapsedNanos - the elapsed duration of the call in nanoseconds
      • onCallSuccess

        void onCallSuccess​(long elapsedNanos)
        Invoked for each successful call.

        Parameters:
        elapsedNanos - the elapsed duration of the call in nanoseconds
      • onCallTimeoutFailure

        void onCallTimeoutFailure​(long elapsedNanos)
        Invoked for each call when the future is completed with java.util.concurrent.TimeoutException

        Parameters:
        elapsedNanos - the elapsed duration of the call in nanoseconds
      • onClose

        void onClose()
        Invoked when the circuit breaker transitions to the close state.
      • onHalfOpen

        void onHalfOpen()
        Invoked when the circuit breaker transitions to the half-open state after reset timeout.
      • onOpen

        void onOpen()
        Invoked when the circuit breaker transitions to the open state.