Interface CallStatisticsCollector


  • public interface CallStatisticsCollector
    If you use ServiceInstanceWithStatGathering, use an implementation of this class interface for actually collecting information about calls made
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void recordEnd​(long serviceInstanceId, Throwable error)
      Records the completion of an operation.
      default void recordReply​(long serviceInstanceId, long timeInNanos)
      Records the response from an operation.
      default void recordStart​(long serviceInstanceId, boolean measureTime)
      Records the start of an operation.
    • Method Detail

      • recordStart

        default void recordStart​(long serviceInstanceId,
                                 boolean measureTime)
        Records the start of an operation.
        Parameters:
        serviceInstanceId - the service instance id
        measureTime - whether the time must be measured
      • recordReply

        default void recordReply​(long serviceInstanceId,
                                 long timeInNanos)
        Records the response from an operation.
        Parameters:
        serviceInstanceId - the service instance id
        timeInNanos - the duration of the operation in nanoseconds
      • recordEnd

        default void recordEnd​(long serviceInstanceId,
                               Throwable error)
        Records the completion of an operation.
        Parameters:
        serviceInstanceId - the service instance id
        error - the error thrown by the operation if the operation failed