This commit is contained in:
Phillip Webb 2021-04-09 17:39:11 -07:00
parent efba7076ba
commit 3d7e5e3abd
3 changed files with 9 additions and 5 deletions

View File

@ -15,6 +15,6 @@
*/
/**
* Support classes HTTP-related metrics.
* Support classes for HTTP-related metrics.
*/
package org.springframework.boot.actuate.metrics.http;

View File

@ -70,9 +70,12 @@ public class DefaultWebFluxTagsProvider implements WebFluxTagsProvider {
@Override
public Iterable<Tag> httpRequestTags(ServerWebExchange exchange, Throwable exception) {
Tags tags = Tags.of(WebFluxTags.method(exchange), WebFluxTags.uri(exchange, this.ignoreTrailingSlash),
WebFluxTags.exception(exception), WebFluxTags.status(exchange),
WebFluxTags.outcome(exchange, exception));
Tags tags = Tags.empty();
tags = tags.and(WebFluxTags.method(exchange));
tags = tags.and(WebFluxTags.uri(exchange, this.ignoreTrailingSlash));
tags = tags.and(WebFluxTags.exception(exception));
tags = tags.and(WebFluxTags.status(exchange));
tags = tags.and(WebFluxTags.outcome(exchange, exception));
for (WebFluxTagsContributor contributor : this.contributors) {
tags = tags.and(contributor.httpRequestTags(exchange, exception));
}

View File

@ -41,7 +41,8 @@ import org.springframework.web.server.WebFilter;
import org.springframework.web.server.WebFilterChain;
/**
* Intercepts incoming HTTP requests handled by Spring WebFlux handlers.
* Intercepts incoming HTTP requests handled by Spring WebFlux handlers and records
* metrics about execution time and results.
*
* @author Jon Schneider
* @author Brian Clozel