Class NetworkMetrics
- java.lang.Object
-
- io.quarkus.micrometer.runtime.binder.vertx.NetworkMetrics
-
- All Implemented Interfaces:
io.vertx.core.spi.metrics.Metrics,io.vertx.core.spi.metrics.NetworkMetrics<io.micrometer.core.instrument.LongTaskTimer.Sample>,io.vertx.core.spi.metrics.TCPMetrics<io.micrometer.core.instrument.LongTaskTimer.Sample>
- Direct Known Subclasses:
VertxTcpClientMetrics,VertxTcpServerMetrics
public class NetworkMetrics extends Object implements io.vertx.core.spi.metrics.TCPMetrics<io.micrometer.core.instrument.LongTaskTimer.Sample>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Stringexception(package private) io.micrometer.core.instrument.DistributionSummaryreceived(package private) io.micrometer.core.instrument.MeterRegistryregistry(package private) io.micrometer.core.instrument.DistributionSummarysent(package private) io.micrometer.core.instrument.Tagstags
-
Constructor Summary
Constructors Constructor Description NetworkMetrics(io.micrometer.core.instrument.MeterRegistry registry, io.micrometer.core.instrument.Tags tags, String prefix, String receivedDesc, String sentDesc, String connDurationDesc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbytesRead(io.micrometer.core.instrument.LongTaskTimer.Sample sample, io.vertx.core.net.SocketAddress remoteAddress, long numberOfBytes)Called when bytes have been readvoidbytesWritten(io.micrometer.core.instrument.LongTaskTimer.Sample sample, io.vertx.core.net.SocketAddress remoteAddress, long numberOfBytes)Called when bytes have been writtenio.micrometer.core.instrument.LongTaskTimer.Sampleconnected(io.vertx.core.net.SocketAddress remoteAddress, String remoteName)Called when a client has connected, which is applicable for TCP connections.voiddisconnected(io.micrometer.core.instrument.LongTaskTimer.Sample sample, io.vertx.core.net.SocketAddress remoteAddress)Called when a client has disconnected, which is applicable for TCP connections.voidexceptionOccurred(io.micrometer.core.instrument.LongTaskTimer.Sample sample, io.vertx.core.net.SocketAddress remoteAddress, Throwable t)Called when exceptions occur for a specific connection.static StringtoString(io.vertx.core.net.SocketAddress remoteAddress)
-
-
-
Field Detail
-
registry
final io.micrometer.core.instrument.MeterRegistry registry
-
received
final io.micrometer.core.instrument.DistributionSummary received
-
sent
final io.micrometer.core.instrument.DistributionSummary sent
-
exception
final String exception
-
tags
final io.micrometer.core.instrument.Tags tags
-
-
Method Detail
-
connected
public io.micrometer.core.instrument.LongTaskTimer.Sample connected(io.vertx.core.net.SocketAddress remoteAddress, String remoteName)Called when a client has connected, which is applicable for TCP connections.The remote name of the client is a best effort to provide the name of the remote host, i.e. if the name is specified at creation time, this name will be used otherwise it will be the remote address.
- Specified by:
connectedin interfaceio.vertx.core.spi.metrics.TCPMetrics<io.micrometer.core.instrument.LongTaskTimer.Sample>- Parameters:
remoteAddress- the remote address of the clientremoteName- the remote name of the client- Returns:
- the sample
-
disconnected
public void disconnected(io.micrometer.core.instrument.LongTaskTimer.Sample sample, io.vertx.core.net.SocketAddress remoteAddress)Called when a client has disconnected, which is applicable for TCP connections.- Specified by:
disconnectedin interfaceio.vertx.core.spi.metrics.TCPMetrics<io.micrometer.core.instrument.LongTaskTimer.Sample>- Parameters:
sample- the sampleremoteAddress- the remote address of the client
-
bytesRead
public void bytesRead(io.micrometer.core.instrument.LongTaskTimer.Sample sample, io.vertx.core.net.SocketAddress remoteAddress, long numberOfBytes)Called when bytes have been read- Specified by:
bytesReadin interfaceio.vertx.core.spi.metrics.NetworkMetrics<io.micrometer.core.instrument.LongTaskTimer.Sample>- Parameters:
sample- the sample, null for UDPremoteAddress- the remote address which this socket received bytes fromnumberOfBytes- the number of bytes read
-
bytesWritten
public void bytesWritten(io.micrometer.core.instrument.LongTaskTimer.Sample sample, io.vertx.core.net.SocketAddress remoteAddress, long numberOfBytes)Called when bytes have been written- Specified by:
bytesWrittenin interfaceio.vertx.core.spi.metrics.NetworkMetrics<io.micrometer.core.instrument.LongTaskTimer.Sample>- Parameters:
sample- the sampleremoteAddress- the remote address which bytes are being written tonumberOfBytes- the number of bytes written
-
exceptionOccurred
public void exceptionOccurred(io.micrometer.core.instrument.LongTaskTimer.Sample sample, io.vertx.core.net.SocketAddress remoteAddress, Throwable t)Called when exceptions occur for a specific connection.- Specified by:
exceptionOccurredin interfaceio.vertx.core.spi.metrics.NetworkMetrics<io.micrometer.core.instrument.LongTaskTimer.Sample>- Parameters:
sample- the sampleremoteAddress- the remote address of the connection or null if it's datagram/udpt- the exception that occurred
-
toString
public static String toString(io.vertx.core.net.SocketAddress remoteAddress)
-
-