Package reactor.netty.channel
Class ContextAwareChannelMetricsRecorder
java.lang.Object
reactor.netty.channel.ContextAwareChannelMetricsRecorder
- All Implemented Interfaces:
ChannelMetricsRecorder
- Direct Known Subclasses:
ContextAwareHttpMetricsRecorder
public abstract class ContextAwareChannelMetricsRecorder
extends Object
implements ChannelMetricsRecorder
ContextView aware class for recording metrics on protocol level.- Since:
- 1.0.8
- Author:
- Violeta Georgieva
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidincrementErrorsCount(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.abstract voidincrementErrorsCount(ContextView contextView, SocketAddress remoteAddress) Increments the number of the errors that have occurred.voidincrementErrorsCount(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress) Increments the number of the errors that have occurred.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.voidrecordConnectTime(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status) Records the time that is spent for connecting to the remote address.abstract voidrecordConnectTime(ContextView contextView, 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.abstract voidrecordDataReceived(ContextView contextView, SocketAddress remoteAddress, long bytes) Records the amount of the data that is received, in bytes.voidrecordDataReceived(ContextView contextView, 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.abstract voidrecordDataSent(ContextView contextView, SocketAddress remoteAddress, long bytes) Records the amount of the data that is sent, in bytes.voidrecordDataSent(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, long bytes) Records the amount of the data that is sent, in bytes.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.voidrecordTlsHandshakeTime(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status) Records the time that is spent for TLS handshake.abstract voidrecordTlsHandshakeTime(ContextView contextView, SocketAddress remoteAddress, Duration time, String status) Records the time that is spent for TLS handshake.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface reactor.netty.channel.ChannelMetricsRecorder
recordResolveAddressTime, recordServerConnectionClosed, recordServerConnectionOpened
-
Constructor Details
-
ContextAwareChannelMetricsRecorder
public ContextAwareChannelMetricsRecorder()
-
-
Method Details
-
incrementErrorsCount
Increments the number of the errors that have occurred.- Parameters:
contextView- The currentContextViewassociated with the Mono/Flux pipelineremoteAddress- The remote peer
-
incrementErrorsCount
public void incrementErrorsCount(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress) Increments the number of the errors that have occurred.- Parameters:
contextView- The currentContextViewassociated with the Mono/Flux pipelineremoteAddress- The remote peerproxyAddress- The proxy address- Since:
- 1.1.17
-
recordConnectTime
public abstract void recordConnectTime(ContextView contextView, SocketAddress remoteAddress, Duration time, String status) Records the time that is spent for connecting to the remote address. Relevant only when on the client.- Parameters:
contextView- The currentContextViewassociated with the Mono/Flux pipelineremoteAddress- 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(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status) Records the time that is spent for connecting to the remote address. Relevant only when on the client.- Parameters:
contextView- The currentContextViewassociated with the Mono/Flux pipelineremoteAddress- The remote peerproxyAddress- The proxy addresstime- The time in nanoseconds that is spent for connecting to the remote addressstatus- The status of the operation- Since:
- 1.1.17
-
recordDataReceived
public abstract void recordDataReceived(ContextView contextView, SocketAddress remoteAddress, long bytes) Records the amount of the data that is received, in bytes.- Parameters:
contextView- The currentContextViewassociated with the Mono/Flux pipelineremoteAddress- The remote peerbytes- The amount of the data that is received, in bytes
-
recordDataReceived
public void recordDataReceived(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, long bytes) Records the amount of the data that is received, in bytes.- Parameters:
contextView- The currentContextViewassociated with the Mono/Flux pipelineremoteAddress- The remote peerproxyAddress- The proxy addressbytes- The amount of the data that is received, in bytes- Since:
- 1.1.17
-
recordDataSent
public abstract void recordDataSent(ContextView contextView, SocketAddress remoteAddress, long bytes) Records the amount of the data that is sent, in bytes.- Parameters:
contextView- The currentContextViewassociated with the Mono/Flux pipelineremoteAddress- The remote peerbytes- The amount of the data that is sent, in bytes
-
recordDataSent
public void recordDataSent(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, long bytes) Records the amount of the data that is sent, in bytes.- Parameters:
contextView- The currentContextViewassociated with the Mono/Flux pipelineremoteAddress- The remote peerproxyAddress- The proxy addressbytes- The amount of the data that is sent, in bytes- Since:
- 1.1.17
-
recordTlsHandshakeTime
public abstract void recordTlsHandshakeTime(ContextView contextView, SocketAddress remoteAddress, Duration time, String status) Records the time that is spent for TLS handshake.- Parameters:
contextView- The currentContextViewassociated with the Mono/Flux pipelineremoteAddress- The remote peertime- The time in nanoseconds that is spent for TLS handshakestatus- The status of the operation
-
recordTlsHandshakeTime
public void recordTlsHandshakeTime(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status) Records the time that is spent for TLS handshake.- Parameters:
contextView- The currentContextViewassociated with the Mono/Flux pipelineremoteAddress- The remote peerproxyAddress- The proxy addresstime- The time in nanoseconds that is spent for TLS handshakestatus- The status of the operation- Since:
- 1.1.17
-
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
-
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
-
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
-
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
-
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
-