Class ContextAwareChannelMetricsRecorder

java.lang.Object
reactor.netty.channel.ContextAwareChannelMetricsRecorder
All Implemented Interfaces:
ChannelMetricsRecorder
Direct Known Subclasses:
ContextAwareHttpMetricsRecorder

public abstract class ContextAwareChannelMetricsRecorder extends Object implements ChannelMetricsRecorder
ContextView aware class for recording metrics on protocol level.
Since:
1.0.8
Author:
Violeta Georgieva
  • Constructor Details

    • ContextAwareChannelMetricsRecorder

      public ContextAwareChannelMetricsRecorder()
  • Method Details

    • incrementErrorsCount

      public abstract void incrementErrorsCount(ContextView contextView, SocketAddress remoteAddress)
      Increments the number of the errors that have occurred.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux pipeline
      remoteAddress - The remote peer
    • incrementErrorsCount

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

      public abstract void recordConnectTime(ContextView contextView, SocketAddress remoteAddress, Duration time, String status)
      Records the time that is spent for connecting to the remote address. Relevant only when on the client.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux pipeline
      remoteAddress - The remote peer
      time - The time in nanoseconds that is spent for connecting to the remote address
      status - The status of the operation
    • recordConnectTime

      public void recordConnectTime(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status)
      Records the time that is spent for connecting to the remote address. Relevant only when on the client.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux pipeline
      remoteAddress - The remote peer
      proxyAddress - The proxy address
      time - The time in nanoseconds that is spent for connecting to the remote address
      status - The status of the operation
      Since:
      1.1.17
    • recordDataReceived

      public abstract void recordDataReceived(ContextView contextView, SocketAddress remoteAddress, long bytes)
      Records the amount of the data that is received, in bytes.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux pipeline
      remoteAddress - The remote peer
      bytes - The amount of the data that is received, in bytes
    • recordDataReceived

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

      public abstract void recordDataSent(ContextView contextView, SocketAddress remoteAddress, long bytes)
      Records the amount of the data that is sent, in bytes.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux pipeline
      remoteAddress - The remote peer
      bytes - The amount of the data that is sent, in bytes
    • recordDataSent

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

      public abstract void recordTlsHandshakeTime(ContextView contextView, SocketAddress remoteAddress, Duration time, String status)
      Records the time that is spent for TLS handshake.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux pipeline
      remoteAddress - The remote peer
      time - The time in nanoseconds that is spent for TLS handshake
      status - The status of the operation
    • recordTlsHandshakeTime

      public void recordTlsHandshakeTime(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status)
      Records the time that is spent for TLS handshake.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux pipeline
      remoteAddress - The remote peer
      proxyAddress - The proxy address
      time - The time in nanoseconds that is spent for TLS handshake
      status - The status of the operation
      Since:
      1.1.17
    • incrementErrorsCount

      public void incrementErrorsCount(SocketAddress remoteAddress)
      Description copied from interface: ChannelMetricsRecorder
      Increments the number of the errors that have occurred.
      Specified by:
      incrementErrorsCount in interface ChannelMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
    • incrementErrorsCount

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

      public void recordConnectTime(SocketAddress remoteAddress, Duration time, String status)
      Description copied from interface: ChannelMetricsRecorder
      Records the time that is spent for connecting to the remote address. Relevant only when on the client
      Specified by:
      recordConnectTime in interface ChannelMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      time - the time in nanoseconds that is spent for connecting to the remote address
      status - the status of the operation
    • recordConnectTime

      public void recordConnectTime(SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status)
      Description copied from interface: ChannelMetricsRecorder
      Records the time that is spent for connecting to the remote address. Relevant only when on the client
      Specified by:
      recordConnectTime in interface ChannelMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      proxyAddress - The proxy address
      time - the time in nanoseconds that is spent for connecting to the remote address
      status - the status of the operation
    • recordDataReceived

      public void recordDataReceived(SocketAddress remoteAddress, long bytes)
      Description copied from interface: ChannelMetricsRecorder
      Records the amount of the data that is received, in bytes.
      Specified by:
      recordDataReceived in interface ChannelMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      bytes - The amount of the data that is received, in bytes
    • recordDataReceived

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

      public void recordDataSent(SocketAddress remoteAddress, long bytes)
      Description copied from interface: ChannelMetricsRecorder
      Records the amount of the data that is sent, in bytes.
      Specified by:
      recordDataSent in interface ChannelMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      bytes - The amount of the data that is sent, in bytes
    • recordDataSent

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

      public void recordTlsHandshakeTime(SocketAddress remoteAddress, Duration time, String status)
      Description copied from interface: ChannelMetricsRecorder
      Records the time that is spent for TLS handshake.
      Specified by:
      recordTlsHandshakeTime in interface ChannelMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      time - the time in nanoseconds that is spent for TLS handshake
      status - the status of the operation
    • recordTlsHandshakeTime

      public void recordTlsHandshakeTime(SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status)
      Description copied from interface: ChannelMetricsRecorder
      Records the time that is spent for TLS handshake.
      Specified by:
      recordTlsHandshakeTime in interface ChannelMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      proxyAddress - The proxy address
      time - the time in nanoseconds that is spent for TLS handshake
      status - the status of the operation