Class WebFluxTags
java.lang.Object
org.springframework.boot.actuate.metrics.web.reactive.server.WebFluxTags
Factory methods for
Tags
associated with a request-response exchange that
is handled by WebFlux.- Since:
- 2.0.0
- Author:
- Jon Schneider, Andy Wilkinson, Michael McFadyen, Brian Clozel
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.micrometer.core.instrument.Tag
static io.micrometer.core.instrument.Tag
method
(ServerWebExchange exchange) Creates amethod
tag based on themethod
of theServerWebExchange.getRequest()
request of the givenexchange
.static io.micrometer.core.instrument.Tag
outcome
(ServerWebExchange exchange, Throwable exception) Creates anoutcome
tag based on the response status of the givenexchange
and the exception thrown during request processing.static io.micrometer.core.instrument.Tag
status
(ServerWebExchange exchange) Creates astatus
tag based on the response status of the givenexchange
.static io.micrometer.core.instrument.Tag
uri
(ServerWebExchange exchange) Creates auri
tag based on the URI of the givenexchange
.static io.micrometer.core.instrument.Tag
uri
(ServerWebExchange exchange, boolean ignoreTrailingSlash) Creates auri
tag based on the URI of the givenexchange
.
-
Method Details
-
method
Creates amethod
tag based on themethod
of theServerWebExchange.getRequest()
request of the givenexchange
.- Parameters:
exchange
- the exchange- Returns:
- the method tag whose value is a capitalized method (e.g. GET).
-
status
Creates astatus
tag based on the response status of the givenexchange
.- Parameters:
exchange
- the exchange- Returns:
- the status tag derived from the response status
-
uri
Creates auri
tag based on the URI of the givenexchange
. Uses theHandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE
best matching pattern if available. Falling back toREDIRECTION
for 3xx responses,NOT_FOUND
for 404 responses,root
for requests with no path info, andUNKNOWN
for all other requests.- Parameters:
exchange
- the exchange- Returns:
- the uri tag derived from the exchange
-
uri
public static io.micrometer.core.instrument.Tag uri(ServerWebExchange exchange, boolean ignoreTrailingSlash) Creates auri
tag based on the URI of the givenexchange
. Uses theHandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE
best matching pattern if available. Falling back toREDIRECTION
for 3xx responses,NOT_FOUND
for 404 responses,root
for requests with no path info, andUNKNOWN
for all other requests.- Parameters:
exchange
- the exchangeignoreTrailingSlash
- whether to ignore the trailing slash- Returns:
- the uri tag derived from the exchange
-
exception
- Parameters:
exception
- the exception, may benull
- Returns:
- the exception tag derived from the exception
-
outcome
public static io.micrometer.core.instrument.Tag outcome(ServerWebExchange exchange, Throwable exception) Creates anoutcome
tag based on the response status of the givenexchange
and the exception thrown during request processing.- Parameters:
exchange
- the exchangeexception
- the termination signal sent by the publisher- Returns:
- the outcome tag derived from the response status
- Since:
- 2.5.0
-