Interface RequestMetrics


public interface RequestMetrics
A type to report common metrics shared among all request types.

If a request retries, there will be multiple calls to all methods below. Ignore any endRequest after the first one. For example:

  1. constructor - request starts
  2. startNetwork / endNetwork - original request
  3. startNetwork / endNetwork - retried request
  4. endRequest - request finished (retry)
  5. endRequest - request finished (original)

The following metrics can be computed: Total queries, successful queries, total latency, network latency

  • Method Summary

    Modifier and Type Method Description
    void endNetwork()  
    void endRequest​(java.lang.Exception exception, int httpStatusCode, long retryCount)  
    void startNetwork()  
  • Method Details

    • startNetwork

      void startNetwork()
    • endNetwork

      void endNetwork()
    • endRequest

      void endRequest​(java.lang.Exception exception, int httpStatusCode, long retryCount)