Package reactor.netty.channel
Class MicrometerChannelMetricsRecorder
java.lang.Object
reactor.netty.channel.MicrometerChannelMetricsRecorder
- All Implemented Interfaces:
ChannelMetricsRecorder
- Direct Known Subclasses:
MicrometerHttpMetricsRecorder
A
ChannelMetricsRecorder implementation for integration with Micrometer.- Since:
- 0.9
- Author:
- Violeta Georgieva
-
Constructor Summary
ConstructorsConstructorDescriptionMicrometerChannelMetricsRecorder(String name, String protocol) MicrometerChannelMetricsRecorder(String name, String protocol, boolean onServer) -
Method Summary
Modifier and TypeMethodDescriptionprotected static <M extends io.micrometer.core.instrument.Meter>
@Nullable Mfilter(M meter) final @Nullable io.micrometer.core.instrument.TimergetResolveAddressTimer(String name, String address, String status) final @Nullable io.micrometer.core.instrument.TimergetTlsHandshakeTimer(String name, @Nullable String address, String status) Deprecated.as of 1.1.19.final @Nullable io.micrometer.core.instrument.TimergetTlsHandshakeTimer(String name, String remoteAddress, String proxyAddress, String status) Returns TLS handshake timer.voidincrementErrorsCount(SocketAddress remoteAddress) Increments the number of the errors that have occurred.voidincrementErrorsCount(SocketAddress remoteAddress, SocketAddress proxyAddress) Increments the number of the errors that have occurred.name()protocol()voidrecordConnectTime(SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status) Records the time that is spent for connecting to the remote address.voidrecordConnectTime(SocketAddress remoteAddress, Duration time, String status) Records the time that is spent for connecting to the remote address.voidrecordDataReceived(SocketAddress remoteAddress, long bytes) Records the amount of the data that is received, in bytes.voidrecordDataReceived(SocketAddress remoteAddress, SocketAddress proxyAddress, long bytes) Records the amount of the data that is received, in bytes.voidrecordDataSent(SocketAddress remoteAddress, long bytes) Records the amount of the data that is sent, in bytes.voidrecordDataSent(SocketAddress remoteAddress, SocketAddress proxyAddress, long bytes) Records the amount of the data that is sent, in bytes.voidrecordResolveAddressTime(SocketAddress remoteAddress, Duration time, String status) Records the time that is spent for resolving the remote address.voidrecordServerConnectionClosed(SocketAddress serverAddress) Records a just disconnected server connection.voidrecordServerConnectionOpened(SocketAddress serverAddress) Records a just accepted server connection.voidrecordTlsHandshakeTime(SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status) Records the time that is spent for TLS handshake.voidrecordTlsHandshakeTime(SocketAddress remoteAddress, Duration time, String status) Records the time that is spent for TLS handshake.
-
Constructor Details
-
MicrometerChannelMetricsRecorder
-
MicrometerChannelMetricsRecorder
-
-
Method Details
-
recordDataReceived
Description copied from interface:ChannelMetricsRecorderRecords the amount of the data that is received, in bytes.- Specified by:
recordDataReceivedin interfaceChannelMetricsRecorder- Parameters:
remoteAddress- The remote peerbytes- The amount of the data that is received, in bytes
-
recordDataReceived
Description copied from interface:ChannelMetricsRecorderRecords the amount of the data that is received, in bytes.- Specified by:
recordDataReceivedin interfaceChannelMetricsRecorder- Parameters:
remoteAddress- The remote peerproxyAddress- The proxy addressbytes- The amount of the data that is received, in bytes
-
recordDataSent
Description copied from interface:ChannelMetricsRecorderRecords the amount of the data that is sent, in bytes.- Specified by:
recordDataSentin interfaceChannelMetricsRecorder- Parameters:
remoteAddress- The remote peerbytes- The amount of the data that is sent, in bytes
-
recordDataSent
Description copied from interface:ChannelMetricsRecorderRecords the amount of the data that is sent, in bytes.- Specified by:
recordDataSentin interfaceChannelMetricsRecorder- Parameters:
remoteAddress- The remote peerproxyAddress- The proxy addressbytes- The amount of the data that is sent, in bytes
-
incrementErrorsCount
Description copied from interface:ChannelMetricsRecorderIncrements the number of the errors that have occurred.- Specified by:
incrementErrorsCountin interfaceChannelMetricsRecorder- Parameters:
remoteAddress- The remote peer
-
incrementErrorsCount
Description copied from interface:ChannelMetricsRecorderIncrements the number of the errors that have occurred.- Specified by:
incrementErrorsCountin interfaceChannelMetricsRecorder- Parameters:
remoteAddress- The remote peerproxyAddress- The proxy address
-
recordTlsHandshakeTime
Description copied from interface:ChannelMetricsRecorderRecords the time that is spent for TLS handshake.- Specified by:
recordTlsHandshakeTimein interfaceChannelMetricsRecorder- Parameters:
remoteAddress- The remote peertime- the time in nanoseconds that is spent for TLS handshakestatus- the status of the operation
-
getTlsHandshakeTimer
@Deprecated public final @Nullable io.micrometer.core.instrument.Timer getTlsHandshakeTimer(String name, @Nullable String address, String status) Deprecated.as of 1.1.19. Prefer thegetTlsHandshakeTimer(String, String, String, String). This method will be removed in version 1.3.0.Returns TLS handshake timer.- Parameters:
name- the timer nameaddress- the remote addressstatus- the status of the TLS handshake operation- Returns:
- TLS handshake timer
-
recordTlsHandshakeTime
public void recordTlsHandshakeTime(SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status) Description copied from interface:ChannelMetricsRecorderRecords the time that is spent for TLS handshake.- Specified by:
recordTlsHandshakeTimein interfaceChannelMetricsRecorder- Parameters:
remoteAddress- The remote peerproxyAddress- The proxy addresstime- the time in nanoseconds that is spent for TLS handshakestatus- the status of the operation
-
getTlsHandshakeTimer
public final @Nullable io.micrometer.core.instrument.Timer getTlsHandshakeTimer(String name, String remoteAddress, String proxyAddress, String status) Returns TLS handshake timer.- Parameters:
name- the timer nameremoteAddress- the remote addressproxyAddress- the proxy addressstatus- the status of the TLS handshake operation- Returns:
- TLS handshake timer
-
recordConnectTime
Description copied from interface:ChannelMetricsRecorderRecords the time that is spent for connecting to the remote address. Relevant only when on the client- Specified by:
recordConnectTimein interfaceChannelMetricsRecorder- Parameters:
remoteAddress- The remote peertime- the time in nanoseconds that is spent for connecting to the remote addressstatus- the status of the operation
-
recordConnectTime
public void recordConnectTime(SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status) Description copied from interface:ChannelMetricsRecorderRecords the time that is spent for connecting to the remote address. Relevant only when on the client- Specified by:
recordConnectTimein interfaceChannelMetricsRecorder- Parameters:
remoteAddress- The remote peerproxyAddress- The proxy addresstime- the time in nanoseconds that is spent for connecting to the remote addressstatus- the status of the operation
-
recordResolveAddressTime
Description copied from interface:ChannelMetricsRecorderRecords the time that is spent for resolving the remote address. Relevant only when on the client.- Specified by:
recordResolveAddressTimein interfaceChannelMetricsRecorder- Parameters:
remoteAddress- The remote peertime- the time in nanoseconds that is spent for resolving to the remote addressstatus- the status of the operation
-
getResolveAddressTimer
-
recordServerConnectionOpened
Description copied from interface:ChannelMetricsRecorderRecords a just accepted server connection.- Specified by:
recordServerConnectionOpenedin interfaceChannelMetricsRecorder- Parameters:
serverAddress- the server local address
-
recordServerConnectionClosed
Description copied from interface:ChannelMetricsRecorderRecords a just disconnected server connection.- Specified by:
recordServerConnectionClosedin interfaceChannelMetricsRecorder- Parameters:
serverAddress- the server local address
-
filter
protected static <M extends io.micrometer.core.instrument.Meter> @Nullable M filter(M meter) -
name
-
protocol
-