| Modifier and Type | Field and Description |
|---|---|
String |
RESULT_TAG_FAILURE_VALUE |
String |
RESULT_TAG_SUCCESS_VALUE |
| Constructor and Description |
|---|
MicrometerCountedInterceptor(io.micrometer.core.instrument.MeterRegistry meterRegistry) |
| Modifier and Type | Method and Description |
|---|---|
(package private) Object |
countedMethod(javax.interceptor.InvocationContext context)
Intercept methods annotated with the
Counted annotation and expose a few counters about
their execution status. |
public final String RESULT_TAG_FAILURE_VALUE
public final String RESULT_TAG_SUCCESS_VALUE
public MicrometerCountedInterceptor(io.micrometer.core.instrument.MeterRegistry meterRegistry)
Object countedMethod(javax.interceptor.InvocationContext context) throws Exception
Counted annotation and expose a few counters about
their execution status. By default, record both failed and successful attempts. If the
Counted.recordFailuresOnly() is set to true, 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 CompletionStage or any of its subclasses,
the counters will be incremented only when the CompletionStage is completed.
If completed exceptionally a failure is recorded, otherwise if
Counted.recordFailuresOnly() is set to false, a success is recorded.
Copyright © 2021 JBoss by Red Hat. All rights reserved.