Class ContextAwareWebSocketServerMetricsRecorder

All Implemented Interfaces:
ChannelMetricsRecorder, HttpMetricsRecorder, HttpServerMetricsRecorder, WebSocketServerMetricsRecorder

public abstract class ContextAwareWebSocketServerMetricsRecorder extends ContextAwareHttpServerMetricsRecorder implements WebSocketServerMetricsRecorder
ContextView aware class for collecting metrics on WebSocket server level.
Since:
1.3.8
Author:
LivingLikeKrillin
  • Constructor Details

    • ContextAwareWebSocketServerMetricsRecorder

      public ContextAwareWebSocketServerMetricsRecorder()
  • Method Details

    • recordWebSocketHandshakeTime

      public abstract void recordWebSocketHandshakeTime(ContextView contextView, SocketAddress remoteAddress, String uri, String status, Duration time)
      Records the time that is spent for the WebSocket handshake.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux
      remoteAddress - The remote peer
      uri - the requested URI
      status - the WebSocket handshake status
      time - the time in nanoseconds that is spent for the handshake
    • recordWebSocketHandshakeTime

      public void recordWebSocketHandshakeTime(SocketAddress remoteAddress, String uri, String status, Duration time)
      Description copied from interface: WebSocketServerMetricsRecorder
      Records the time that is spent for the WebSocket handshake.
      Specified by:
      recordWebSocketHandshakeTime in interface WebSocketServerMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      uri - the requested URI
      status - the WebSocket handshake status
      time - the time that is spent for the handshake
    • recordWebSocketConnectionDuration

      public abstract void recordWebSocketConnectionDuration(ContextView contextView, SocketAddress remoteAddress, String uri, Duration time)
      Records the duration of the WebSocket connection.
      Parameters:
      contextView - The current ContextView associated with the Mono/Flux
      remoteAddress - The remote peer
      uri - the requested URI
      time - the duration of the connection
    • recordWebSocketConnectionDuration

      public void recordWebSocketConnectionDuration(SocketAddress remoteAddress, String uri, Duration time)
      Description copied from interface: WebSocketServerMetricsRecorder
      Records the duration of the WebSocket connection.
      Specified by:
      recordWebSocketConnectionDuration in interface WebSocketServerMetricsRecorder
      Parameters:
      remoteAddress - The remote peer
      uri - the requested URI
      time - the duration of the connection