Package io.quarkus.micrometer.runtime
Interface HttpServerMetricsTagsContributor.Context
- Enclosing interface:
HttpServerMetricsTagsContributor
public static interface HttpServerMetricsTagsContributor.Context
-
Method Summary
Modifier and TypeMethodDescriptionio.vertx.core.http.HttpServerRequestrequest()Represents the HTTP requests<T> TGives access to the contextual data that was added while the HTTP request was active.Optional<io.vertx.core.spi.observability.HttpResponse> response()Represents the HTTP response, if one exists.
-
Method Details
-
request
io.vertx.core.http.HttpServerRequest request()Represents the HTTP requests -
response
Optional<io.vertx.core.spi.observability.HttpResponse> response()Represents the HTTP response, if one exists. This isOptionalbecauseHttpServerMetricsTagsContributor.contribute(Context)is called in both cases where the HTTP request has been completed and when the request was reset (so no respose exists) -
requestContextLocalData
Gives access to the contextual data that was added while the HTTP request was active. This can be found of doing something likeContextLocals.get(String), however this method is needed becauseContextLocals.get(String)won't work whenHttpServerMetricsTagsContributor.contribute(Context)is called as the HTTP request has already gone away.Beware of high cardinality causing memory usage increase.
Don't use keys that might hold many different values (more than a few dozens). The problem is not just about the current request but the combination of different values from all the requests the server will receive.
-