Package io.quarkus.micrometer.runtime
Class MicrometerCountedInterceptor
java.lang.Object
io.quarkus.micrometer.runtime.MicrometerCountedInterceptor
Quarkus declared interceptor responsible for intercepting all methods
annotated with the
Counted annotation to record a few counter
metrics about their execution status.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMicrometerCountedInterceptor(io.micrometer.core.instrument.MeterRegistry meterRegistry, MeterTagsSupport meterTagsSupport) -
Method Summary
Modifier and TypeMethodDescription(package private) ObjectcountedMethod(io.quarkus.arc.ArcInvocationContext context) Intercept methods annotated with theCountedannotation and expose a few counters about their execution status.
-
Field Details
-
RESULT_TAG_FAILURE_VALUE
- See Also:
-
RESULT_TAG_SUCCESS_VALUE
- See Also:
-
-
Constructor Details
-
MicrometerCountedInterceptor
public MicrometerCountedInterceptor(io.micrometer.core.instrument.MeterRegistry meterRegistry, MeterTagsSupport meterTagsSupport)
-
-
Method Details
-
countedMethod
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.
-