Class MicrometerHttpMetricsRecorder

java.lang.Object
reactor.netty.channel.MicrometerChannelMetricsRecorder
reactor.netty.http.MicrometerHttpMetricsRecorder
All Implemented Interfaces:
ChannelMetricsRecorder, HttpMetricsRecorder

public class MicrometerHttpMetricsRecorder extends MicrometerChannelMetricsRecorder implements HttpMetricsRecorder
An HttpMetricsRecorder implementation for integration with Micrometer.
Since:
0.9
Author:
Violeta Georgieva
  • Field Details

    • dataReceivedTimeCache

      protected final ConcurrentMap<MeterKey,io.micrometer.core.instrument.Timer> dataReceivedTimeCache
    • dataSentTimeCache

      protected final ConcurrentMap<MeterKey,io.micrometer.core.instrument.Timer> dataSentTimeCache
    • responseTimeCache

      protected final ConcurrentMap<MeterKey,io.micrometer.core.instrument.Timer> responseTimeCache
  • Constructor Details

    • MicrometerHttpMetricsRecorder

      protected MicrometerHttpMetricsRecorder(String name, String protocol)
    • MicrometerHttpMetricsRecorder

      protected MicrometerHttpMetricsRecorder(String name, String protocol, boolean onServer)
  • Method Details

    • recordDataReceived

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

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

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