Top Description Fields Constructors Methods
reactor.netty.http.server

pack-priv final Class MicrometerHttpServerMetricsRecorder

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

HttpServerMetricsRecorder for Reactor Netty built-in integration with Micrometer.
Author
Violeta Georgieva
Since
0.9

Field Summary

Modifier and TypeField and Description
private final ConcurrentMap<String, 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.netty.http.MicrometerHttpMetricsRecorder:
dataReceivedTimeCachedataSentTimeCacheresponseTimeCache

Constructor Summary

AccessConstructor and Description
private

Method Summary

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

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

Overrides reactor.netty.http.MicrometerHttpMetricsRecorder.incrementErrorsCount.

Implements reactor.netty.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.netty.channel.MicrometerChannelMetricsRecorder.recordConnectTime.

Implements reactor.netty.channel.ChannelMetricsRecorder.recordConnectTime.

Records the time that is spent for connecting to the remote address.
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.netty.http.MicrometerHttpMetricsRecorder.recordDataReceived.

Implements reactor.netty.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.netty.channel.MicrometerChannelMetricsRecorder.recordDataReceived.

Implements reactor.netty.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.netty.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.netty.http.MicrometerHttpMetricsRecorder.recordDataSent.

Implements reactor.netty.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.netty.channel.MicrometerChannelMetricsRecorder.recordDataSent.

Implements reactor.netty.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.netty.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.netty.channel.MicrometerChannelMetricsRecorder.recordResolveAddressTime.

Implements reactor.netty.channel.ChannelMetricsRecorder.recordResolveAddressTime.

Records the time that is spent for resolving the remote address.
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.netty.http.server.HttpServerMetricsRecorder.recordResponseTime.

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

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

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

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

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

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

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

Overrides default reactor.netty.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.netty.channel.MicrometerChannelMetricsRecorder.recordTlsHandshakeTime.

Implements reactor.netty.channel.ChannelMetricsRecorder.recordTlsHandshakeTime.

Records the time that is spent for TLS handshake.

Field Detail

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

Hides reactor.netty.http.MicrometerHttpMetricsRecorder.dataReceivedCache.

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

Hides reactor.netty.http.MicrometerHttpMetricsRecorder.dataSentCache.

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

Hides reactor.netty.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
pack-priv 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
pack-priv LongAdder getServerConnectionAdder(SocketAddress localAddress)
Annotations
@Nullable
incrementErrorsCountback to summary
public void incrementErrorsCount(SocketAddress remoteAddress, String uri)

Overrides reactor.netty.http.MicrometerHttpMetricsRecorder.incrementErrorsCount.

Implements reactor.netty.http.HttpMetricsRecorder.incrementErrorsCount.

Doc from reactor.netty.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.netty.channel.MicrometerChannelMetricsRecorder.incrementErrorsCount.

Implements reactor.netty.channel.ChannelMetricsRecorder.incrementErrorsCount.

Doc from reactor.netty.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.netty.channel.MicrometerChannelMetricsRecorder.recordConnectTime.

Implements reactor.netty.channel.ChannelMetricsRecorder.recordConnectTime.

Doc from reactor.netty.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.netty.http.MicrometerHttpMetricsRecorder.recordDataReceived.

Implements reactor.netty.http.HttpMetricsRecorder.recordDataReceived.

Doc from reactor.netty.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.netty.channel.MicrometerChannelMetricsRecorder.recordDataReceived.

Implements reactor.netty.channel.ChannelMetricsRecorder.recordDataReceived.

Doc from reactor.netty.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.netty.http.server.HttpServerMetricsRecorder.recordDataReceivedTime.

Doc from reactor.netty.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.netty.http.MicrometerHttpMetricsRecorder.recordDataSent.

Implements reactor.netty.http.HttpMetricsRecorder.recordDataSent.

Doc from reactor.netty.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.netty.channel.MicrometerChannelMetricsRecorder.recordDataSent.

Implements reactor.netty.channel.ChannelMetricsRecorder.recordDataSent.

Doc from reactor.netty.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.netty.http.server.HttpServerMetricsRecorder.recordDataSentTime.

Doc from reactor.netty.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.netty.channel.MicrometerChannelMetricsRecorder.recordResolveAddressTime.

Implements reactor.netty.channel.ChannelMetricsRecorder.recordResolveAddressTime.

Doc from reactor.netty.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.netty.http.server.HttpServerMetricsRecorder.recordResponseTime.

Doc from reactor.netty.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.netty.http.server.HttpServerMetricsRecorder.recordServerConnectionActive.

Doc from reactor.netty.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.netty.http.server.HttpServerMetricsRecorder.recordServerConnectionInactive.

Doc from reactor.netty.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.netty.http.server.HttpServerMetricsRecorder.recordStreamClosed.

Doc from reactor.netty.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.netty.http.server.HttpServerMetricsRecorder.recordStreamOpened.

Doc from reactor.netty.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.netty.channel.MicrometerChannelMetricsRecorder.recordTlsHandshakeTime.

Implements reactor.netty.channel.ChannelMetricsRecorder.recordTlsHandshakeTime.

Doc from reactor.netty.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