public class MicrometerHttpMetricsRecorder extends MicrometerChannelMetricsRecorder implements HttpMetricsRecorder
HttpMetricsRecorder
implementation for integration with Micrometer.Modifier and Type | Field and Description |
---|---|
protected static String |
DATA_RECEIVED_TIME_DESCRIPTION |
protected static String |
DATA_SENT_TIME_DESCRIPTION |
protected ConcurrentMap<MeterKey,io.micrometer.core.instrument.Timer> |
dataReceivedTimeCache |
protected ConcurrentMap<MeterKey,io.micrometer.core.instrument.Timer> |
dataSentTimeCache |
protected static String |
RESPONSE_TIME_DESCRIPTION |
protected ConcurrentMap<MeterKey,io.micrometer.core.instrument.Timer> |
responseTimeCache |
BYTES_UNIT, DATA_RECEIVED_DESCRIPTION, DATA_SENT_DESCRIPTION, ERRORS_DESCRIPTION
Modifier | Constructor and Description |
---|---|
protected |
MicrometerHttpMetricsRecorder(String name,
String protocol) |
Modifier and Type | Method and Description |
---|---|
void |
incrementErrorsCount(SocketAddress remoteAddress,
String uri)
Increments the number of the errors that are occurred.
|
void |
recordDataReceived(SocketAddress remoteAddress,
String uri,
long bytes)
Records the amount of the data that is received, in bytes.
|
void |
recordDataSent(SocketAddress remoteAddress,
String uri,
long bytes)
Records the amount of the data that is sent, in bytes.
|
filter, incrementErrorsCount, name, protocol, recordConnectTime, recordDataReceived, recordDataSent, recordResolveAddressTime, recordServerConnectionClosed, recordServerConnectionOpened, recordTlsHandshakeTime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
incrementErrorsCount, recordConnectTime, recordDataReceived, recordDataSent, recordResolveAddressTime, recordServerConnectionClosed, recordServerConnectionOpened, recordTlsHandshakeTime
protected static final String DATA_RECEIVED_TIME_DESCRIPTION
protected static final String DATA_SENT_TIME_DESCRIPTION
protected static final String RESPONSE_TIME_DESCRIPTION
protected final ConcurrentMap<MeterKey,io.micrometer.core.instrument.Timer> dataReceivedTimeCache
protected final ConcurrentMap<MeterKey,io.micrometer.core.instrument.Timer> dataSentTimeCache
protected final ConcurrentMap<MeterKey,io.micrometer.core.instrument.Timer> responseTimeCache
public void recordDataReceived(SocketAddress remoteAddress, String uri, long bytes)
HttpMetricsRecorder
recordDataReceived
in interface HttpMetricsRecorder
remoteAddress
- The remote peeruri
- the requested URIbytes
- The amount of the data that is received, in bytespublic void recordDataSent(SocketAddress remoteAddress, String uri, long bytes)
HttpMetricsRecorder
recordDataSent
in interface HttpMetricsRecorder
remoteAddress
- The remote peeruri
- the requested URIbytes
- The amount of the data that is sent, in bytespublic void incrementErrorsCount(SocketAddress remoteAddress, String uri)
HttpMetricsRecorder
incrementErrorsCount
in interface HttpMetricsRecorder
remoteAddress
- The remote peeruri
- the requested URI