Class VertxNetworkMetrics

java.lang.Object
io.quarkus.micrometer.runtime.binder.vertx.VertxNetworkMetrics
All Implemented Interfaces:
io.vertx.core.spi.metrics.Metrics, io.vertx.core.spi.metrics.NetworkMetrics<Map<String,Object>>

public class VertxNetworkMetrics extends Object implements io.vertx.core.spi.metrics.NetworkMetrics<Map<String,Object>>
NetworkMetrics
  • S for Socket metric -- Vert.x Context
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final io.micrometer.core.instrument.DistributionSummary
     
    (package private) final io.micrometer.core.instrument.DistributionSummary
     
    (package private) final String
     
    (package private) final io.micrometer.core.instrument.MeterRegistry
     
    (package private) final io.micrometer.core.instrument.Tags
     

    Fields inherited from interface io.vertx.core.spi.metrics.Metrics

    DISABLE_METRICS_PROPERTY_NAME, METRICS_ENABLED
  • Constructor Summary

    Constructors
    Constructor
    Description
    VertxNetworkMetrics(io.micrometer.core.instrument.MeterRegistry registry, String prefix, io.micrometer.core.instrument.Tags tags)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bytesRead(Map<String,Object> socketMetric, io.vertx.core.net.SocketAddress remoteAddress, long numberOfBytes)
    Called when bytes have been read
    void
    bytesWritten(Map<String,Object> socketMetric, io.vertx.core.net.SocketAddress remoteAddress, long numberOfBytes)
    Called when bytes have been written
    void
     
    void
    exceptionOccurred(Map<String,Object> socketMetric, io.vertx.core.net.SocketAddress remoteAddress, Throwable t)
    Called when exceptions occur for a specific connection.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • registry

      final io.micrometer.core.instrument.MeterRegistry registry
    • nameBytesRead

      final io.micrometer.core.instrument.DistributionSummary nameBytesRead
    • nameBytesWritten

      final io.micrometer.core.instrument.DistributionSummary nameBytesWritten
    • nameExceptionOccurred

      final String nameExceptionOccurred
    • tags

      final io.micrometer.core.instrument.Tags tags
  • Constructor Details

    • VertxNetworkMetrics

      VertxNetworkMetrics(io.micrometer.core.instrument.MeterRegistry registry, String prefix, io.micrometer.core.instrument.Tags tags)
  • Method Details

    • bytesRead

      public void bytesRead(Map<String,Object> socketMetric, io.vertx.core.net.SocketAddress remoteAddress, long numberOfBytes)
      Called when bytes have been read
      Specified by:
      bytesRead in interface io.vertx.core.spi.metrics.NetworkMetrics<Map<String,Object>>
      Parameters:
      socketMetric - the socket metric, null for UDP
      remoteAddress - the remote address which this socket received bytes from
      numberOfBytes - the number of bytes read
    • bytesWritten

      public void bytesWritten(Map<String,Object> socketMetric, io.vertx.core.net.SocketAddress remoteAddress, long numberOfBytes)
      Called when bytes have been written
      Specified by:
      bytesWritten in interface io.vertx.core.spi.metrics.NetworkMetrics<Map<String,Object>>
      Parameters:
      socketMetric - the socket metric, null for UDP
      remoteAddress - the remote address which bytes are being written to
      numberOfBytes - the number of bytes written
    • exceptionOccurred

      public void exceptionOccurred(Map<String,Object> socketMetric, io.vertx.core.net.SocketAddress remoteAddress, Throwable t)
      Called when exceptions occur for a specific connection.
      Specified by:
      exceptionOccurred in interface io.vertx.core.spi.metrics.NetworkMetrics<Map<String,Object>>
      Parameters:
      socketMetric - the socket metric, null for UDP
      remoteAddress - the remote address of the connection or null if it's datagram/udp
      t - the exception that occurred
    • close

      public void close()
      Specified by:
      close in interface io.vertx.core.spi.metrics.Metrics