|
|
|
@ -83,8 +83,9 @@ public class MetricsRepositoryMethodInvocationListener implements RepositoryMeth
|
|
|
|
|
Set<Timed> annotations = TimedAnnotations.get(invocation.getMethod(), invocation.getRepositoryInterface());
|
|
|
|
|
Iterable<Tag> tags = this.tagsProvider.repositoryTags(invocation);
|
|
|
|
|
long duration = invocation.getDuration(TimeUnit.NANOSECONDS);
|
|
|
|
|
AutoTimer.apply(this.autoTimer, this.metricName, annotations, (builder) -> builder.tags(tags)
|
|
|
|
|
.register(this.registrySupplier.get()).record(duration, TimeUnit.NANOSECONDS));
|
|
|
|
|
AutoTimer.apply(this.autoTimer, this.metricName, annotations,
|
|
|
|
|
(builder) -> builder.description("Duration of repository invocations").tags(tags)
|
|
|
|
|
.register(this.registrySupplier.get()).record(duration, TimeUnit.NANOSECONDS));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|