|
|
@ -1,5 +1,5 @@
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Copyright 2012-2021 the original author or authors.
|
|
|
|
* Copyright 2012-2022 the original author or authors.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
@ -109,7 +109,8 @@ public class MetricsWebFilter implements WebFilter {
|
|
|
|
Iterable<Tag> tags = this.tagsProvider.httpRequestTags(exchange, cause);
|
|
|
|
Iterable<Tag> tags = this.tagsProvider.httpRequestTags(exchange, cause);
|
|
|
|
long duration = System.nanoTime() - start;
|
|
|
|
long duration = System.nanoTime() - start;
|
|
|
|
AutoTimer.apply(this.autoTimer, this.metricName, annotations,
|
|
|
|
AutoTimer.apply(this.autoTimer, this.metricName, annotations,
|
|
|
|
(builder) -> builder.tags(tags).register(this.registry).record(duration, TimeUnit.NANOSECONDS));
|
|
|
|
(builder) -> builder.description("Duration of HTTP server request handling").tags(tags)
|
|
|
|
|
|
|
|
.register(this.registry).record(duration, TimeUnit.NANOSECONDS));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex) {
|
|
|
|
catch (Exception ex) {
|
|
|
|
logger.warn("Failed to record timer metrics", ex);
|
|
|
|
logger.warn("Failed to record timer metrics", ex);
|
|
|
|