|
|
@ -19,6 +19,7 @@ package org.springframework.boot.actuate.metrics.web.reactive.server;
|
|
|
|
import io.micrometer.core.instrument.Tag;
|
|
|
|
import io.micrometer.core.instrument.Tag;
|
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
|
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
import org.springframework.web.reactive.HandlerMapping;
|
|
|
|
import org.springframework.web.reactive.HandlerMapping;
|
|
|
|
import org.springframework.web.server.ServerWebExchange;
|
|
|
|
import org.springframework.web.server.ServerWebExchange;
|
|
|
|
import org.springframework.web.util.pattern.PathPattern;
|
|
|
|
import org.springframework.web.util.pattern.PathPattern;
|
|
|
@ -110,7 +111,8 @@ public final class WebFluxTags {
|
|
|
|
public static Tag exception(Throwable exception) {
|
|
|
|
public static Tag exception(Throwable exception) {
|
|
|
|
if (exception != null) {
|
|
|
|
if (exception != null) {
|
|
|
|
String simpleName = exception.getClass().getSimpleName();
|
|
|
|
String simpleName = exception.getClass().getSimpleName();
|
|
|
|
return Tag.of("exception", simpleName.isEmpty() ? exception.getClass().getName() : simpleName);
|
|
|
|
return Tag.of("exception", StringUtils.hasText(simpleName) ? simpleName
|
|
|
|
|
|
|
|
: exception.getClass().getName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return EXCEPTION_NONE;
|
|
|
|
return EXCEPTION_NONE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|