java.lang.Object
io.micronaut.configuration.metrics.micrometer.intercept.TimedInterceptor
All Implemented Interfaces:
io.micronaut.aop.Interceptor<Object,Object>, io.micronaut.aop.MethodInterceptor<Object,Object>, io.micronaut.core.order.Ordered

@Singleton @RequiresMetrics @InterceptorBean(io.micrometer.core.annotation.Timed.class) public class TimedInterceptor extends Object implements io.micronaut.aop.MethodInterceptor<Object,Object>
Implements support for Timed as AOP advice.
Since:
1.1.0
Author:
graemerocher
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Default metric name.
    static final String
    Tag key for an exception.

    Fields inherited from interface io.micronaut.aop.Interceptor

    ARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGET

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    TimedInterceptor(io.micrometer.core.instrument.MeterRegistry meterRegistry)
    Deprecated.
    Pass conversion service in new constructor
    protected
    TimedInterceptor(io.micrometer.core.instrument.MeterRegistry meterRegistry, io.micronaut.core.convert.ConversionService conversionService)
    Deprecated.
    Pass list of AbstractMethodTaggers in new constructor
    protected
    TimedInterceptor(io.micrometer.core.instrument.MeterRegistry meterRegistry, io.micronaut.core.convert.ConversionService conversionService, List<AbstractMethodTagger> methodTaggers)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    intercept(io.micronaut.aop.MethodInvocationContext<Object,Object> context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.aop.MethodInterceptor

    intercept

    Methods inherited from interface io.micronaut.core.order.Ordered

    getOrder
  • Field Details

  • Constructor Details

    • TimedInterceptor

      @Deprecated protected TimedInterceptor(io.micrometer.core.instrument.MeterRegistry meterRegistry)
      Deprecated.
      Pass conversion service in new constructor
      Parameters:
      meterRegistry - The meter registry
    • TimedInterceptor

      @Deprecated protected TimedInterceptor(io.micrometer.core.instrument.MeterRegistry meterRegistry, io.micronaut.core.convert.ConversionService conversionService)
      Deprecated.
      Pass list of AbstractMethodTaggers in new constructor
      Parameters:
      meterRegistry - The meter registry
      conversionService - The conversion service
    • TimedInterceptor

      @Inject protected TimedInterceptor(io.micrometer.core.instrument.MeterRegistry meterRegistry, io.micronaut.core.convert.ConversionService conversionService, List<AbstractMethodTagger> methodTaggers)
      Parameters:
      meterRegistry - The meter registry
      conversionService - The conversion service
      methodTaggers - Additional tag builders
  • Method Details

    • intercept

      public Object intercept(io.micronaut.aop.MethodInvocationContext<Object,Object> context)
      Specified by:
      intercept in interface io.micronaut.aop.MethodInterceptor<Object,Object>