Module lettuce.core

Class MicrometerCommandLatencyRecorder

java.lang.Object
io.lettuce.core.metrics.MicrometerCommandLatencyRecorder
All Implemented Interfaces:
CommandLatencyRecorder

public class MicrometerCommandLatencyRecorder
extends Object
implements CommandLatencyRecorder
Micrometer implementation of CommandLatencyRecorder
Since:
6.1
Author:
Steven Sheehy
  • Constructor Details

  • Method Details

    • recordCommandLatency

      public void recordCommandLatency​(SocketAddress local, SocketAddress remote, ProtocolKeyword protocolKeyword, long firstResponseLatency, long completionLatency)
      Description copied from interface: CommandLatencyRecorder
      Record the command latency per connectionPoint and commandType.
      Specified by:
      recordCommandLatency in interface CommandLatencyRecorder
      Parameters:
      local - the local address
      remote - the remote address
      protocolKeyword - the command type
      firstResponseLatency - latency value in TimeUnit.NANOSECONDS from send to the first response
      completionLatency - latency value in TimeUnit.NANOSECONDS from send to the command completion
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: CommandLatencyRecorder
      Returns true if the metric collector is enabled.
      Specified by:
      isEnabled in interface CommandLatencyRecorder
      Returns:
      true if the metric collector is enabled
    • completionTimer

      protected io.micrometer.core.instrument.Timer completionTimer​(CommandLatencyId commandLatencyId)
    • firstResponseTimer

      protected io.micrometer.core.instrument.Timer firstResponseTimer​(CommandLatencyId commandLatencyId)