Class ContextAwareHttpClientMetricsRecorder

All Implemented Interfaces:
ChannelMetricsRecorder, HttpClientMetricsRecorder, HttpMetricsRecorder

public abstract class ContextAwareHttpClientMetricsRecorder extends ContextAwareHttpMetricsRecorder implements HttpClientMetricsRecorder
ContextView aware class for collecting metrics on HTTP client level.
Since:
1.0.8
Author:
Violeta Georgieva
  • Constructor Details

    • ContextAwareHttpClientMetricsRecorder

      public ContextAwareHttpClientMetricsRecorder()
  • Method Details

    • recordDataReceivedTime

      public abstract void recordDataReceivedTime(ContextView contextView, SocketAddress remoteAddress, String uri, String method, String status, Duration time)
      Records the time that is spent in consuming incoming data.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux
      remoteAddress - The remote peer
      uri - The requested URI
      method - The HTTP method
      status - The HTTP status
      time - The time in nanoseconds that is spent in consuming incoming data
    • recordDataReceivedTime

      public void recordDataReceivedTime(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, String uri, String method, String status, Duration time)
      Records the time that is spent in consuming incoming data.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux
      remoteAddress - The remote peer
      proxyAddress - the proxy address
      uri - The requested URI
      method - The HTTP method
      status - The HTTP status
      time - The time in nanoseconds that is spent in consuming incoming data
      Since:
      1.1.17
    • recordDataSentTime

      public abstract void recordDataSentTime(ContextView contextView, SocketAddress remoteAddress, String uri, String method, Duration time)
      Records the time that is spent in sending outgoing data.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux
      remoteAddress - The remote peer
      uri - The requested URI
      method - The HTTP method
      time - The time in nanoseconds that is spent in sending outgoing data
    • recordDataSentTime

      public void recordDataSentTime(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, String uri, String method, Duration time)
      Records the time that is spent in sending outgoing data.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux
      remoteAddress - The remote peer
      proxyAddress - the proxy address
      uri - The requested URI
      method - The HTTP method
      time - The time in nanoseconds that is spent in sending outgoing data
      Since:
      1.1.17
    • recordResponseTime

      public abstract void recordResponseTime(ContextView contextView, SocketAddress remoteAddress, String uri, String method, String status, Duration time)
      Records the total time for the request/response.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux
      remoteAddress - The remote peer
      uri - The requested URI
      method - The HTTP method
      status - The HTTP status
      time - The total time in nanoseconds for the request/response
    • recordResponseTime

      public void recordResponseTime(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, String uri, String method, String status, Duration time)
      Records the total time for the request/response.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux
      remoteAddress - The remote peer
      proxyAddress - the proxy address
      uri - The requested URI
      method - The HTTP method
      status - The HTTP status
      time - The total time in nanoseconds for the request/response
      Since:
      1.1.17
    • incrementErrorsCount

      public void incrementErrorsCount(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, String uri)
      Increments the number of the errors that have occurred.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux
      remoteAddress - The remote peer
      proxyAddress - the proxy address
      uri - The requested URI
      Since:
      1.1.17
    • recordDataReceived

      public void recordDataReceived(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, String uri, long bytes)
      Records the amount of the data that is received, in bytes.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux
      remoteAddress - The remote peer
      proxyAddress - the proxy address
      uri - The requested URI
      bytes - The amount of the data that is received, in bytes
      Since:
      1.1.17
    • recordDataSent

      public void recordDataSent(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, String uri, long bytes)
      Records the amount of the data that is sent, in bytes.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux
      remoteAddress - The remote peer
      proxyAddress - the proxy address
      uri - The requested URI
      bytes - The amount of the data that is sent, in bytes
      Since:
      1.1.17
    • recordDataReceivedTime

      public void recordDataReceivedTime(SocketAddress remoteAddress, String uri, String method, String status, Duration time)
      Description copied from interface: HttpClientMetricsRecorder
      Records the time that is spent in consuming incoming data.
      Specified by:
      recordDataReceivedTime in interface HttpClientMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      uri - the requested URI
      method - the HTTP method
      status - the HTTP status
      time - the time in nanoseconds that is spent in consuming incoming data
    • recordDataReceivedTime

      public void recordDataReceivedTime(SocketAddress remoteAddress, SocketAddress proxyAddress, String uri, String method, String status, Duration time)
      Description copied from interface: HttpClientMetricsRecorder
      Records the time that is spent in consuming incoming data.
      Specified by:
      recordDataReceivedTime in interface HttpClientMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      proxyAddress - the proxy address
      uri - the requested URI
      method - the HTTP method
      status - the HTTP status
      time - the time in nanoseconds that is spent in consuming incoming data
    • recordDataSentTime

      public void recordDataSentTime(SocketAddress remoteAddress, String uri, String method, Duration time)
      Description copied from interface: HttpClientMetricsRecorder
      Records the time that is spent in sending outgoing data.
      Specified by:
      recordDataSentTime in interface HttpClientMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      uri - the requested URI
      method - the HTTP method
      time - the time in nanoseconds that is spent in sending outgoing data
    • recordDataSentTime

      public void recordDataSentTime(SocketAddress remoteAddress, SocketAddress proxyAddress, String uri, String method, Duration time)
      Description copied from interface: HttpClientMetricsRecorder
      Records the time that is spent in sending outgoing data.
      Specified by:
      recordDataSentTime in interface HttpClientMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      proxyAddress - the proxy address
      uri - the requested URI
      method - the HTTP method
      time - the time in nanoseconds that is spent in sending outgoing data
    • recordResponseTime

      public void recordResponseTime(SocketAddress remoteAddress, String uri, String method, String status, Duration time)
      Description copied from interface: HttpClientMetricsRecorder
      Records the total time for the request/response.
      Specified by:
      recordResponseTime in interface HttpClientMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      uri - the requested URI
      method - the HTTP method
      status - the HTTP status
      time - the total time in nanoseconds for the request/response
    • recordResponseTime

      public void recordResponseTime(SocketAddress remoteAddress, SocketAddress proxyAddress, String uri, String method, String status, Duration time)
      Description copied from interface: HttpClientMetricsRecorder
      Records the total time for the request/response.
      Specified by:
      recordResponseTime in interface HttpClientMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      proxyAddress - the proxy address
      uri - the requested URI
      method - the HTTP method
      status - the HTTP status
      time - the total time in nanoseconds for the request/response
    • recordDataReceived

      public void recordDataReceived(SocketAddress remoteAddress, SocketAddress proxyAddress, String uri, long bytes)
      Description copied from interface: HttpClientMetricsRecorder
      Records the amount of the data that is received, in bytes.
      Specified by:
      recordDataReceived in interface HttpClientMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      proxyAddress - the proxy address
      uri - the requested URI
      bytes - The amount of the data that is received, in bytes
    • recordDataSent

      public void recordDataSent(SocketAddress remoteAddress, SocketAddress proxyAddress, String uri, long bytes)
      Description copied from interface: HttpClientMetricsRecorder
      Records the amount of the data that is sent, in bytes.
      Specified by:
      recordDataSent in interface HttpClientMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      proxyAddress - the proxy address
      uri - the requested URI
      bytes - The amount of the data that is sent, in bytes
    • incrementErrorsCount

      public void incrementErrorsCount(SocketAddress remoteAddress, SocketAddress proxyAddress, String uri)
      Description copied from interface: HttpClientMetricsRecorder
      Increments the number of the errors that have occurred.
      Specified by:
      incrementErrorsCount in interface HttpClientMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      proxyAddress - the proxy address
      uri - the requested URI