@ -21,7 +21,6 @@ import io.micrometer.core.instrument.Tag;
import org.springframework.http.HttpStatus ;
import org.springframework.util.StringUtils ;
import org.springframework.web.reactive.HandlerMapping ;
import org.springframework.web.reactive.function.server.RouterFunctions ;
import org.springframework.web.server.ServerWebExchange ;
import org.springframework.web.util.pattern.PathPattern ;
@ -87,9 +86,7 @@ public final class WebFluxTags {
/ * *
* Creates a { @code uri } tag based on the URI of the given { @code exchange } . Uses the
* { @link HandlerMapping # BEST_MATCHING_PATTERN_ATTRIBUTE } best matching pattern from
* WebFlux annotation or { @link RouterFunctions # MATCHING_PATTERN_ATTRIBUTE } from
* WebFlux Fn .
* { @link HandlerMapping # BEST_MATCHING_PATTERN_ATTRIBUTE } best matching pattern .
* @param exchange the exchange
* @return the uri tag derived from the exchange
* /
@ -99,11 +96,6 @@ public final class WebFluxTags {
if ( pathPattern ! = null ) {
return Tag . of ( "uri" , pathPattern . getPatternString ( ) ) ;
}
String matchingPattern = exchange
. getAttribute ( RouterFunctions . MATCHING_PATTERN_ATTRIBUTE ) ;
if ( matchingPattern ! = null ) {
return Tag . of ( "uri" , matchingPattern ) ;
}
HttpStatus status = exchange . getResponse ( ) . getStatusCode ( ) ;
if ( status ! = null ) {
if ( status . is3xxRedirection ( ) ) {