public class VertxHttpServerMetrics extends VertxTcpMetrics implements io.vertx.core.spi.metrics.HttpServerMetrics<HttpRequestMetric,io.micrometer.core.instrument.LongTaskTimer.Sample,Map<String,Object>>
| Modifier and Type | Field and Description |
|---|---|
(package private) List<Pattern> |
ignorePatterns |
(package private) static org.jboss.logging.Logger |
log |
(package private) Map<Pattern,String> |
matchPatterns |
(package private) static String |
METRICS_CONTEXT |
(package private) String |
nameHttpServerPush |
(package private) String |
nameHttpServerRequests |
(package private) String |
nameWebsocketConnections |
nameConnectionsnameBytesRead, nameBytesWritten, nameExceptionOccurred, registry| Constructor and Description |
|---|
VertxHttpServerMetrics(io.micrometer.core.instrument.MeterRegistry registry,
HttpBinderConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
io.micrometer.core.instrument.LongTaskTimer.Sample |
connected(Map<String,Object> socketMetric,
HttpRequestMetric requestMetric,
io.vertx.core.http.ServerWebSocket serverWebSocket)
Called when a server web socket connects.
|
void |
disconnected(io.micrometer.core.instrument.LongTaskTimer.Sample websocketMetric)
Called when the server web socket has disconnected.
|
HttpRequestMetric |
requestBegin(Map<String,Object> socketMetric,
io.vertx.core.http.HttpServerRequest request)
Called when an http server request begins.
|
void |
requestReset(HttpRequestMetric requestMetric)
Called when the http server request couldn't complete successfully, for
instance the connection was closed before the response was sent.
|
void |
responseEnd(HttpRequestMetric requestMetric,
io.vertx.core.http.HttpServerResponse response)
Called when an http server response has ended.
|
HttpRequestMetric |
responsePushed(Map<String,Object> socketMetric,
io.vertx.core.http.HttpMethod method,
String uri,
io.vertx.core.http.HttpServerResponse response)
Called when an http server response is pushed.
|
static HttpRequestMetric |
retrieveRequestMetric(io.vertx.core.Context context)
Retrieve and remove the RequestMetric from the Vertx Context
|
static void |
setRequestMetric(io.vertx.core.Context context,
HttpRequestMetric requestMetric)
Stash the RequestMetric in the Vertx Context
|
connected, disconnectedbytesRead, bytesWritten, exceptionOccurredclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstatic final org.jboss.logging.Logger log
static final String METRICS_CONTEXT
final String nameWebsocketConnections
final String nameHttpServerPush
final String nameHttpServerRequests
VertxHttpServerMetrics(io.micrometer.core.instrument.MeterRegistry registry,
HttpBinderConfiguration config)
public static void setRequestMetric(io.vertx.core.Context context,
HttpRequestMetric requestMetric)
context - Vertx context to store RequestMetric inrequestMetric - VertxMeterFilterpublic static HttpRequestMetric retrieveRequestMetric(io.vertx.core.Context context)
context - VertxMeterFilterpublic HttpRequestMetric responsePushed(Map<String,Object> socketMetric, io.vertx.core.http.HttpMethod method, String uri, io.vertx.core.http.HttpServerResponse response)
responsePushed in interface io.vertx.core.spi.metrics.HttpServerMetrics<HttpRequestMetric,io.micrometer.core.instrument.LongTaskTimer.Sample,Map<String,Object>>socketMetric - a Map for socket metric context or nullmethod - the pushed response methoduri - the pushed response uriresponse - the http server responsepublic HttpRequestMetric requestBegin(Map<String,Object> socketMetric, io.vertx.core.http.HttpServerRequest request)
responseEnd(io.quarkus.micrometer.runtime.binder.HttpRequestMetric, io.vertx.core.http.HttpServerResponse) when the response has ended or requestReset(io.quarkus.micrometer.runtime.binder.HttpRequestMetric) if
the request/response has failed before.requestBegin in interface io.vertx.core.spi.metrics.HttpServerMetrics<HttpRequestMetric,io.micrometer.core.instrument.LongTaskTimer.Sample,Map<String,Object>>socketMetric - a Map for socket metric context or nullrequest - the http server requestpublic void requestReset(HttpRequestMetric requestMetric)
requestReset in interface io.vertx.core.spi.metrics.HttpServerMetrics<HttpRequestMetric,io.micrometer.core.instrument.LongTaskTimer.Sample,Map<String,Object>>requestMetric - a RequestMetricContext or nullpublic void responseEnd(HttpRequestMetric requestMetric, io.vertx.core.http.HttpServerResponse response)
responseEnd in interface io.vertx.core.spi.metrics.HttpServerMetrics<HttpRequestMetric,io.micrometer.core.instrument.LongTaskTimer.Sample,Map<String,Object>>requestMetric - a RequestMetricContext or nullresponse - the http server responsepublic io.micrometer.core.instrument.LongTaskTimer.Sample connected(Map<String,Object> socketMetric, HttpRequestMetric requestMetric, io.vertx.core.http.ServerWebSocket serverWebSocket)
connected in interface io.vertx.core.spi.metrics.HttpServerMetrics<HttpRequestMetric,io.micrometer.core.instrument.LongTaskTimer.Sample,Map<String,Object>>socketMetric - a Map for socket metric context or nullrequestMetric - a RequestMetricContext or nullserverWebSocket - the server web socketpublic void disconnected(io.micrometer.core.instrument.LongTaskTimer.Sample websocketMetric)
disconnected in interface io.vertx.core.spi.metrics.HttpServerMetrics<HttpRequestMetric,io.micrometer.core.instrument.LongTaskTimer.Sample,Map<String,Object>>websocketMetric - a LongTaskTimer.Sample or nullCopyright © 2021 JBoss by Red Hat. All rights reserved.