Top Fields Constructors Methods
reactor.netty5.http.server

pack-priv final Class MicrometerHttpServerMetricsRecorder

extends MicrometerHttpMetricsRecorder
implements HttpServerMetricsRecorder
Class Inheritance
All Implemented Interfaces
reactor.netty5.http.server.HttpServerMetricsRecorder, reactor.netty5.http.HttpMetricsRecorder, reactor.netty5.channel.ChannelMetricsRecorder
Imports
io.micrometer.core.instrument.Counter, io.micrometer.core.instrument.DistributionSummary, io.micrometer.core.instrument.Gauge, io.micrometer.core.instrument.Timer, reactor.netty5.channel.MeterKey, reactor.netty5.http.MicrometerHttpMetricsRecorder, reactor.netty5.internal.util.MapUtils, reactor.util.annotation.Nullable, java.net.SocketAddress, java.time.Duration, java.util.concurrent.ConcurrentHashMap, .ConcurrentMap, java.util.concurrent.atomic.LongAdder

Author
Violeta Georgieva
Since
0.9

Field Summary

Modifier and TypeField and Description
private final LongAdder
private final ConcurrentMap<String, LongAdder>
private final LongAdder
private final ConcurrentMap<String, LongAdder>
private final ConcurrentMap<String, io.micrometer.core.instrument.DistributionSummary>
private final ConcurrentMap<String, io.micrometer.core.instrument.DistributionSummary>
private final ConcurrentMap<String, io.micrometer.core.instrument.Counter>
pack-priv static final MicrometerHttpServerMetricsRecorder
private static final String
Inherited from reactor.netty5.http.MicrometerHttpMetricsRecorder:
dataReceivedTimeCachedataSentTimeCacheresponseTimeCache

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private LongAdder
pack-priv final io.micrometer.core.instrument.Timer
getResponseTimeTimer(String name, String uri, String method, String status)

private LongAdder
public void
incrementErrorsCount(SocketAddress
The remote peer
remoteAddress
,
String
the requested URI
uri
)

Overrides reactor.netty5.http.MicrometerHttpMetricsRecorder.incrementErrorsCount.

Implements reactor.netty5.http.HttpMetricsRecorder.incrementErrorsCount.

Increments the number of the errors that are occurred
public void
public void
recordConnectTime(SocketAddress
The remote peer
remoteAddress
,
Duration
the time in nanoseconds that is spent for connecting to the remote address
time
,
String
the status of the operation
status
)

Overrides reactor.netty5.channel.MicrometerChannelMetricsRecorder.recordConnectTime.

Implements reactor.netty5.channel.ChannelMetricsRecorder.recordConnectTime.

Records the time that is spent for connecting to the remote address Relevant only when on the client
public void
recordDataReceived(SocketAddress
The remote peer
remoteAddress
,
String
the requested URI
uri
,
long
The amount of the data that is received, in bytes
bytes
)

Overrides reactor.netty5.http.MicrometerHttpMetricsRecorder.recordDataReceived.

Implements reactor.netty5.http.HttpMetricsRecorder.recordDataReceived.

Records the amount of the data that is received, in bytes
public void
recordDataReceived(SocketAddress
The remote peer
remoteAddress
,
long
The amount of the data that is received, in bytes
bytes
)

Overrides reactor.netty5.channel.MicrometerChannelMetricsRecorder.recordDataReceived.

Implements reactor.netty5.channel.ChannelMetricsRecorder.recordDataReceived.

Records the amount of the data that is received, in bytes
public void
recordDataReceivedTime(String
the requested URI
uri
,
String
the HTTP method
method
,
Duration
the time in nanoseconds that is spent in consuming incoming data
time
)

Implements reactor.netty5.http.server.HttpServerMetricsRecorder.recordDataReceivedTime.

Records the time that is spent in consuming incoming data
public void
recordDataSent(SocketAddress
The remote peer
remoteAddress
,
String
the requested URI
uri
,
long
The amount of the data that is sent, in bytes
bytes
)

Overrides reactor.netty5.http.MicrometerHttpMetricsRecorder.recordDataSent.

Implements reactor.netty5.http.HttpMetricsRecorder.recordDataSent.

Records the amount of the data that is sent, in bytes
public void
recordDataSent(SocketAddress
The remote peer
remoteAddress
,
long
The amount of the data that is sent, in bytes
bytes
)

Overrides reactor.netty5.channel.MicrometerChannelMetricsRecorder.recordDataSent.

Implements reactor.netty5.channel.ChannelMetricsRecorder.recordDataSent.

Records the amount of the data that is sent, in bytes
public void
recordDataSentTime(String
the requested URI
uri
,
String
the HTTP method
method
,
String
the HTTP status
status
,
Duration
the time in nanoseconds that is spent in sending outgoing data
time
)

Implements reactor.netty5.http.server.HttpServerMetricsRecorder.recordDataSentTime.

Records the time that is spent in sending outgoing data
public void
recordResolveAddressTime(SocketAddress
The remote peer
remoteAddress
,
Duration
the time in nanoseconds that is spent for resolving to the remote address
time
,
String
the status of the operation
status
)

Overrides reactor.netty5.channel.MicrometerChannelMetricsRecorder.recordResolveAddressTime.

Implements reactor.netty5.channel.ChannelMetricsRecorder.recordResolveAddressTime.

Records the time that is spent for resolving the remote address Relevant only when on the client
public void
recordResponseTime(String
the requested URI
uri
,
String
the HTTP method
method
,
String
the HTTP status
status
,
Duration
the total time in nanoseconds for the request/response
time
)

Implements reactor.netty5.http.server.HttpServerMetricsRecorder.recordResponseTime.

Records the total time for the request/response
public void
recordServerConnectionActive(SocketAddress
the local server address
localAddress
)

Overrides default reactor.netty5.http.server.HttpServerMetricsRecorder.recordServerConnectionActive.

Record a new active in-use http connection
public void
recordServerConnectionInactive(SocketAddress
the local server address
localAddress
)

Overrides default reactor.netty5.http.server.HttpServerMetricsRecorder.recordServerConnectionInactive.

Record an inactive http connection
public void
recordStreamClosed(SocketAddress
the local server address
localAddress
)

Overrides default reactor.netty5.http.server.HttpServerMetricsRecorder.recordStreamClosed.

Record a closed HTTP/2 stream
public void
recordStreamOpened(SocketAddress
the local server address
localAddress
)

Overrides default reactor.netty5.http.server.HttpServerMetricsRecorder.recordStreamOpened.

Record an opened HTTP/2 stream
public void
recordTlsHandshakeTime(SocketAddress
The remote peer
remoteAddress
,
Duration
the time in nanoseconds that is spent for TLS handshake
time
,
String
the status of the operation
status
)

Overrides reactor.netty5.channel.MicrometerChannelMetricsRecorder.recordTlsHandshakeTime.

Implements reactor.netty5.channel.ChannelMetricsRecorder.recordTlsHandshakeTime.

Records the time that is spent for TLS handshake

Field Detail

activeConnectionsAdderback to summary
private final LongAdder activeConnectionsAdder
activeConnectionsCacheback to summary
private final ConcurrentMap<String, LongAdder> activeConnectionsCache
activeStreamsAdderback to summary
private final LongAdder activeStreamsAdder
activeStreamsCacheback to summary
private final ConcurrentMap<String, LongAdder> activeStreamsCache
dataReceivedCacheback to summary
private final ConcurrentMap<String, io.micrometer.core.instrument.DistributionSummary> dataReceivedCache

Hides reactor.netty5.http.MicrometerHttpMetricsRecorder.dataReceivedCache.

dataSentCacheback to summary
private final ConcurrentMap<String, io.micrometer.core.instrument.DistributionSummary> dataSentCache

Hides reactor.netty5.http.MicrometerHttpMetricsRecorder.dataSentCache.

errorsCacheback to summary
private final ConcurrentMap<String, io.micrometer.core.instrument.Counter> errorsCache

Hides reactor.netty5.http.MicrometerHttpMetricsRecorder.errorsCache.

INSTANCEback to summary
pack-priv static final MicrometerHttpServerMetricsRecorder INSTANCE
PROTOCOL_VALUE_HTTPback to summary
private static final String PROTOCOL_VALUE_HTTP

Constructor Detail

MicrometerHttpServerMetricsRecorderback to summary
private MicrometerHttpServerMetricsRecorder()

Method Detail

getActiveStreamsAdderback to summary
private LongAdder getActiveStreamsAdder(SocketAddress localAddress)
Annotations
@Nullable
getResponseTimeTimerback to summary
pack-priv final io.micrometer.core.instrument.Timer getResponseTimeTimer(String name, String uri, String method, String status)
Annotations
@Nullable
getServerConnectionAdderback to summary
private LongAdder getServerConnectionAdder(SocketAddress localAddress)
Annotations
@Nullable
incrementErrorsCountback to summary
public void incrementErrorsCount(SocketAddress remoteAddress, String uri)

Overrides reactor.netty5.http.MicrometerHttpMetricsRecorder.incrementErrorsCount.

Implements reactor.netty5.http.HttpMetricsRecorder.incrementErrorsCount.

Doc from reactor.netty5.http.HttpMetricsRecorder.incrementErrorsCount.

Increments the number of the errors that are occurred

Parameters
remoteAddress:SocketAddress

The remote peer

uri:String

the requested URI

Annotations
@Override
incrementErrorsCountback to summary
public void incrementErrorsCount(SocketAddress remoteAddress)

Overrides reactor.netty5.channel.MicrometerChannelMetricsRecorder.incrementErrorsCount.

Implements reactor.netty5.channel.ChannelMetricsRecorder.incrementErrorsCount.

Doc from reactor.netty5.channel.ChannelMetricsRecorder.incrementErrorsCount.

Increments the number of the errors that are occurred

Parameters
remoteAddress:SocketAddress

The remote peer

Annotations
@Override
recordConnectTimeback to summary
public void recordConnectTime(SocketAddress remoteAddress, Duration time, String status)

Overrides reactor.netty5.channel.MicrometerChannelMetricsRecorder.recordConnectTime.

Implements reactor.netty5.channel.ChannelMetricsRecorder.recordConnectTime.

Doc from reactor.netty5.channel.ChannelMetricsRecorder.recordConnectTime.

Records the time that is spent for connecting to the remote address Relevant only when on the client

Parameters
remoteAddress:SocketAddress

The remote peer

time:Duration

the time in nanoseconds that is spent for connecting to the remote address

status:String

the status of the operation

Annotations
@Override
recordDataReceivedback to summary
public void recordDataReceived(SocketAddress remoteAddress, String uri, long bytes)

Overrides reactor.netty5.http.MicrometerHttpMetricsRecorder.recordDataReceived.

Implements reactor.netty5.http.HttpMetricsRecorder.recordDataReceived.

Doc from reactor.netty5.http.HttpMetricsRecorder.recordDataReceived.

Records the amount of the data that is received, in bytes

Parameters
remoteAddress:SocketAddress

The remote peer

uri:String

the requested URI

bytes:long

The amount of the data that is received, in bytes

Annotations
@Override
recordDataReceivedback to summary
public void recordDataReceived(SocketAddress remoteAddress, long bytes)

Overrides reactor.netty5.channel.MicrometerChannelMetricsRecorder.recordDataReceived.

Implements reactor.netty5.channel.ChannelMetricsRecorder.recordDataReceived.

Doc from reactor.netty5.channel.ChannelMetricsRecorder.recordDataReceived.

Records the amount of the data that is received, in bytes

Parameters
remoteAddress:SocketAddress

The remote peer

bytes:long

The amount of the data that is received, in bytes

Annotations
@Override
recordDataReceivedTimeback to summary
public void recordDataReceivedTime(String uri, String method, Duration time)

Implements reactor.netty5.http.server.HttpServerMetricsRecorder.recordDataReceivedTime.

Doc from reactor.netty5.http.server.HttpServerMetricsRecorder.recordDataReceivedTime.

Records the time that is spent in consuming incoming data

Parameters
uri:String

the requested URI

method:String

the HTTP method

time:Duration

the time in nanoseconds that is spent in consuming incoming data

Annotations
@Override
recordDataSentback to summary
public void recordDataSent(SocketAddress remoteAddress, String uri, long bytes)

Overrides reactor.netty5.http.MicrometerHttpMetricsRecorder.recordDataSent.

Implements reactor.netty5.http.HttpMetricsRecorder.recordDataSent.

Doc from reactor.netty5.http.HttpMetricsRecorder.recordDataSent.

Records the amount of the data that is sent, in bytes

Parameters
remoteAddress:SocketAddress

The remote peer

uri:String

the requested URI

bytes:long

The amount of the data that is sent, in bytes

Annotations
@Override
recordDataSentback to summary
public void recordDataSent(SocketAddress remoteAddress, long bytes)

Overrides reactor.netty5.channel.MicrometerChannelMetricsRecorder.recordDataSent.

Implements reactor.netty5.channel.ChannelMetricsRecorder.recordDataSent.

Doc from reactor.netty5.channel.ChannelMetricsRecorder.recordDataSent.

Records the amount of the data that is sent, in bytes

Parameters
remoteAddress:SocketAddress

The remote peer

bytes:long

The amount of the data that is sent, in bytes

Annotations
@Override
recordDataSentTimeback to summary
public void recordDataSentTime(String uri, String method, String status, Duration time)

Implements reactor.netty5.http.server.HttpServerMetricsRecorder.recordDataSentTime.

Doc from reactor.netty5.http.server.HttpServerMetricsRecorder.recordDataSentTime.

Records the time that is spent in sending outgoing data

Parameters
uri:String

the requested URI

method:String

the HTTP method

status:String

the HTTP status

time:Duration

the time in nanoseconds that is spent in sending outgoing data

Annotations
@Override
recordResolveAddressTimeback to summary
public void recordResolveAddressTime(SocketAddress remoteAddress, Duration time, String status)

Overrides reactor.netty5.channel.MicrometerChannelMetricsRecorder.recordResolveAddressTime.

Implements reactor.netty5.channel.ChannelMetricsRecorder.recordResolveAddressTime.

Doc from reactor.netty5.channel.ChannelMetricsRecorder.recordResolveAddressTime.

Records the time that is spent for resolving the remote address Relevant only when on the client

Parameters
remoteAddress:SocketAddress

The remote peer

time:Duration

the time in nanoseconds that is spent for resolving to the remote address

status:String

the status of the operation

Annotations
@Override
recordResponseTimeback to summary
public void recordResponseTime(String uri, String method, String status, Duration time)

Implements reactor.netty5.http.server.HttpServerMetricsRecorder.recordResponseTime.

Doc from reactor.netty5.http.server.HttpServerMetricsRecorder.recordResponseTime.

Records the total time for the request/response

Parameters
uri:String

the requested URI

method:String

the HTTP method

status:String

the HTTP status

time:Duration

the total time in nanoseconds for the request/response

Annotations
@Override
recordServerConnectionActiveback to summary
public void recordServerConnectionActive(SocketAddress localAddress)

Overrides default reactor.netty5.http.server.HttpServerMetricsRecorder.recordServerConnectionActive.

Doc from reactor.netty5.http.server.HttpServerMetricsRecorder.recordServerConnectionActive.

Record a new active in-use http connection

Parameters
localAddress:SocketAddress

the local server address

Annotations
@Override
recordServerConnectionInactiveback to summary
public void recordServerConnectionInactive(SocketAddress localAddress)

Overrides default reactor.netty5.http.server.HttpServerMetricsRecorder.recordServerConnectionInactive.

Doc from reactor.netty5.http.server.HttpServerMetricsRecorder.recordServerConnectionInactive.

Record an inactive http connection

Parameters
localAddress:SocketAddress

the local server address

Annotations
@Override
recordStreamClosedback to summary
public void recordStreamClosed(SocketAddress localAddress)

Overrides default reactor.netty5.http.server.HttpServerMetricsRecorder.recordStreamClosed.

Doc from reactor.netty5.http.server.HttpServerMetricsRecorder.recordStreamClosed.

Record a closed HTTP/2 stream

Parameters
localAddress:SocketAddress

the local server address

Annotations
@Override
recordStreamOpenedback to summary
public void recordStreamOpened(SocketAddress localAddress)

Overrides default reactor.netty5.http.server.HttpServerMetricsRecorder.recordStreamOpened.

Doc from reactor.netty5.http.server.HttpServerMetricsRecorder.recordStreamOpened.

Record an opened HTTP/2 stream

Parameters
localAddress:SocketAddress

the local server address

Annotations
@Override
recordTlsHandshakeTimeback to summary
public void recordTlsHandshakeTime(SocketAddress remoteAddress, Duration time, String status)

Overrides reactor.netty5.channel.MicrometerChannelMetricsRecorder.recordTlsHandshakeTime.

Implements reactor.netty5.channel.ChannelMetricsRecorder.recordTlsHandshakeTime.

Doc from reactor.netty5.channel.ChannelMetricsRecorder.recordTlsHandshakeTime.

Records the time that is spent for TLS handshake

Parameters
remoteAddress:SocketAddress

The remote peer

time:Duration

the time in nanoseconds that is spent for TLS handshake

status:String

the status of the operation

Annotations
@Override