@Singleton @RequiresMetrics public class TimedInterceptor extends Object implements MethodInterceptor<Object,Object>
Timed as AOP advice.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_METRIC_NAME
Default metric name.
|
static String |
EXCEPTION_TAG
Tag key for an exception.
|
HOTSWAP, LAZY, PROXY_TARGETHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Modifier | Constructor and Description |
|---|---|
protected |
TimedInterceptor(io.micrometer.core.instrument.MeterRegistry meterRegistry)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
intercept(MethodInvocationContext<Object,Object> context)
Extended version of the
MethodInterceptor.intercept(InvocationContext) method that accepts a MethodInvocationContext. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinterceptpublic static final String DEFAULT_METRIC_NAME
public static final String EXCEPTION_TAG
protected TimedInterceptor(io.micrometer.core.instrument.MeterRegistry meterRegistry)
meterRegistry - The meter registrypublic Object intercept(MethodInvocationContext<Object,Object> context)
MethodInterceptorMethodInterceptor.intercept(InvocationContext) method that accepts a MethodInvocationContext.intercept in interface MethodInterceptor<Object,Object>context - The context