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 TypeMethodDescriptionvoid
incrementErrorsCount
(SocketAddress remoteAddress) Increments the number of the errors that have occurred.void
incrementErrorsCount
(SocketAddress remoteAddress, SocketAddress proxyAddress) Increments the number of the errors that have occurred.abstract void
incrementErrorsCount
(ContextView contextView, SocketAddress remoteAddress) Increments the number of the errors that have occurred.void
incrementErrorsCount
(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress) Increments the number of the errors that have occurred.void
recordConnectTime
(SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status) Records the time that is spent for connecting to the remote address.void
recordConnectTime
(SocketAddress remoteAddress, Duration time, String status) Records the time that is spent for connecting to the remote address.void
recordConnectTime
(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status) Records the time that is spent for connecting to the remote address.abstract void
recordConnectTime
(ContextView contextView, SocketAddress remoteAddress, Duration time, String status) Records the time that is spent for connecting to the remote address.void
recordDataReceived
(SocketAddress remoteAddress, long bytes) Records the amount of the data that is received, in bytes.void
recordDataReceived
(SocketAddress remoteAddress, SocketAddress proxyAddress, long bytes) Records the amount of the data that is received, in bytes.abstract void
recordDataReceived
(ContextView contextView, SocketAddress remoteAddress, long bytes) Records the amount of the data that is received, in bytes.void
recordDataReceived
(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, long bytes) Records the amount of the data that is received, in bytes.void
recordDataSent
(SocketAddress remoteAddress, long bytes) Records the amount of the data that is sent, in bytes.void
recordDataSent
(SocketAddress remoteAddress, SocketAddress proxyAddress, long bytes) Records the amount of the data that is sent, in bytes.abstract void
recordDataSent
(ContextView contextView, SocketAddress remoteAddress, long bytes) Records the amount of the data that is sent, in bytes.void
recordDataSent
(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, long bytes) Records the amount of the data that is sent, in bytes.void
recordTlsHandshakeTime
(SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status) Records the time that is spent for TLS handshake.void
recordTlsHandshakeTime
(SocketAddress remoteAddress, Duration time, String status) Records the time that is spent for TLS handshake.void
recordTlsHandshakeTime
(ContextView contextView, SocketAddress remoteAddress, SocketAddress proxyAddress, Duration time, String status) Records the time that is spent for TLS handshake.abstract void
recordTlsHandshakeTime
(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, wait
Methods 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 currentContextView
associated 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 currentContextView
associated 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 currentContextView
associated 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 currentContextView
associated 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 currentContextView
associated 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 currentContextView
associated 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 currentContextView
associated 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 currentContextView
associated 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 currentContextView
associated 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 currentContextView
associated 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:ChannelMetricsRecorder
Increments the number of the errors that have occurred.- Specified by:
incrementErrorsCount
in interfaceChannelMetricsRecorder
- Parameters:
remoteAddress
- The remote peer
-
incrementErrorsCount
Description copied from interface:ChannelMetricsRecorder
Increments the number of the errors that have occurred.- Specified by:
incrementErrorsCount
in interfaceChannelMetricsRecorder
- Parameters:
remoteAddress
- The remote peerproxyAddress
- The proxy address
-
recordConnectTime
Description copied from interface:ChannelMetricsRecorder
Records the time that is spent for connecting to the remote address. Relevant only when on the client- Specified by:
recordConnectTime
in 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:ChannelMetricsRecorder
Records the time that is spent for connecting to the remote address. Relevant only when on the client- Specified by:
recordConnectTime
in 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:ChannelMetricsRecorder
Records the amount of the data that is received, in bytes.- Specified by:
recordDataReceived
in interfaceChannelMetricsRecorder
- Parameters:
remoteAddress
- The remote peerbytes
- The amount of the data that is received, in bytes
-
recordDataReceived
Description copied from interface:ChannelMetricsRecorder
Records the amount of the data that is received, in bytes.- Specified by:
recordDataReceived
in interfaceChannelMetricsRecorder
- Parameters:
remoteAddress
- The remote peerproxyAddress
- The proxy addressbytes
- The amount of the data that is received, in bytes
-
recordDataSent
Description copied from interface:ChannelMetricsRecorder
Records the amount of the data that is sent, in bytes.- Specified by:
recordDataSent
in interfaceChannelMetricsRecorder
- Parameters:
remoteAddress
- The remote peerbytes
- The amount of the data that is sent, in bytes
-
recordDataSent
Description copied from interface:ChannelMetricsRecorder
Records the amount of the data that is sent, in bytes.- Specified by:
recordDataSent
in interfaceChannelMetricsRecorder
- Parameters:
remoteAddress
- The remote peerproxyAddress
- The proxy addressbytes
- The amount of the data that is sent, in bytes
-
recordTlsHandshakeTime
Description copied from interface:ChannelMetricsRecorder
Records the time that is spent for TLS handshake.- Specified by:
recordTlsHandshakeTime
in 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:ChannelMetricsRecorder
Records the time that is spent for TLS handshake.- Specified by:
recordTlsHandshakeTime
in interfaceChannelMetricsRecorder
- Parameters:
remoteAddress
- The remote peerproxyAddress
- The proxy addresstime
- the time in nanoseconds that is spent for TLS handshakestatus
- the status of the operation
-