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
FieldsModifier and TypeFieldDescription(package private) final io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.Counter> (package private) final io.micrometer.core.instrument.DistributionSummary(package private) final io.micrometer.core.instrument.MeterRegistry(package private) final io.micrometer.core.instrument.DistributionSummary(package private) final io.micrometer.core.instrument.TagsFields inherited from interface io.vertx.core.spi.metrics.Metrics
DISABLE_METRICS_PROPERTY_NAME, METRICS_ENABLED -
Constructor Summary
ConstructorsConstructorDescriptionNetworkMetrics(io.micrometer.core.instrument.MeterRegistry registry, io.micrometer.core.instrument.Tags tags, String prefix, String receivedDesc, String sentDesc, String connDurationDesc) -
Method Summary
Modifier and TypeMethodDescriptionvoidbytesRead(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.SampleCalled 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) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.vertx.core.spi.metrics.Metrics
close
-
Field Details
-
registry
final io.micrometer.core.instrument.MeterRegistry registry -
received
final io.micrometer.core.instrument.DistributionSummary received -
sent
final io.micrometer.core.instrument.DistributionSummary sent -
exceptionCounter
final io.micrometer.core.instrument.Meter.MeterProvider<io.micrometer.core.instrument.Counter> exceptionCounter -
tags
final io.micrometer.core.instrument.Tags tags
-
-
Constructor Details
-
NetworkMetrics
-
-
Method Details
-
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
-