pull/11839/head
Andy Wilkinson 7 years ago
parent f5102516fa
commit e834b25ef1

@ -58,9 +58,8 @@ public class LoggersEndpointAutoConfigurationTests {
this.contextRunner
.withSystemProperties(
"org.springframework.boot.logging.LoggingSystem=none")
.run((context) -> {
assertThat(context).doesNotHaveBean(LoggersEndpoint.class);
});
.run((context) -> assertThat(context)
.doesNotHaveBean(LoggersEndpoint.class));
}
@Configuration

@ -75,7 +75,7 @@ public final class MetricsRun {
propertyValues.add("management.metrics.use-global-registry=false");
List<String> keep = Arrays.asList(implementations);
IMPLEMENTATIONS.stream()
.filter((implementation) -> !keep.contains(implementations))
.filter((implementation) -> !keep.contains(implementation))
.map(MetricsRun::disableExport).forEach(propertyValues::add);
return propertyValues.toArray(new String[0]);
}

@ -127,11 +127,9 @@ public class RouterFunctionMetrics {
public Mono<ServerResponse> filter(ServerRequest request,
HandlerFunction<ServerResponse> next) {
long start = System.nanoTime();
return next.handle(request).doOnSuccess((response) -> {
timer(start, request, response);
}).doOnError((error) -> {
timer(start, request, null);
});
return next.handle(request)
.doOnSuccess((response) -> timer(start, request, response))
.doOnError((error) -> timer(start, request, null));
}
private Iterable<Tag> getDefaultTags(ServerRequest request,

Loading…
Cancel
Save