Package io.quarkus.micrometer.runtime
Class MicrometerCountedInterceptor
- java.lang.Object
-
- io.quarkus.micrometer.runtime.MicrometerCountedInterceptor
-
@Interceptor @Priority(1010) public class MicrometerCountedInterceptor extends Object
Quarkus declared interceptor responsible for intercepting all methods annotated with theCountedannotation to record a few counter metrics about their execution status.- See Also:
Counted
-
-
Field Summary
Fields Modifier and Type Field Description StringRESULT_TAG_FAILURE_VALUEStringRESULT_TAG_SUCCESS_VALUE
-
Constructor Summary
Constructors Constructor Description MicrometerCountedInterceptor(io.micrometer.core.instrument.MeterRegistry meterRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ObjectcountedMethod(io.quarkus.arc.ArcInvocationContext context)Intercept methods annotated with theCountedannotation and expose a few counters about their execution status.
-
-
-
Field Detail
-
RESULT_TAG_FAILURE_VALUE
public final String RESULT_TAG_FAILURE_VALUE
- See Also:
- Constant Field Values
-
RESULT_TAG_SUCCESS_VALUE
public final String RESULT_TAG_SUCCESS_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
countedMethod
Object countedMethod(io.quarkus.arc.ArcInvocationContext context) throws Exception
Intercept methods annotated with theCountedannotation and expose a few counters about their execution status. By default, record both failed and successful attempts. If theCounted.recordFailuresOnly()is set totrue, then record only failed attempts. In case of a failure, tags the counter with the simple name of the thrown exception.When the annotated method returns a
CompletionStageor any of its subclasses, the counters will be incremented only when theCompletionStageis completed. If completed exceptionally a failure is recorded, otherwise ifCounted.recordFailuresOnly()is set tofalse, a success is recorded.
-
-