This library provides annotation-based timing for methods returning promised values, namely
java.util.concurrent.CompletionStage
and io.smallrye.mutiny.Uni
.
Please add our bintray repository:
<repositories>
<repository>
<id>bintray</id>
<name>JFrog Bintray Apache Maven Packages</name>
<url>https://dl.bintray.com/traum-ferienwohnungen/maven</url>
</repository>
</repositories>
This library assumes io.smallrye:smallrye-metrics
is available at runtime.
Therefore, the minimum set of dependencies looks as follows:
<dependencies>
<!-- When from quarkus use io.quarkus:quarkus-smallrye-metrics instead -->
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-metrics</artifactId>
<version>2.4.x</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.traum</groupId>
<artifactId>smallrye-metrics-async-timed</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
</dependencies>
Annotate any bean method returning one of the aforementioned types with com.traum.microprofile.metrics.annotation.AsyncSimplyTimed
,
instead of MicroProfile's SimplyTimed
.