Class TimedAspect


  • @NonNullApi
    @Incubating(since="1.0.0")
    public class TimedAspect
    extends java.lang.Object
    AspectJ aspect for intercepting types or methods annotated with @Timed.
    Since:
    1.0.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_METRIC_NAME  
      static java.lang.String EXCEPTION_TAG
      Tag key for an exception.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object timedMethod​(org.aspectj.lang.ProceedingJoinPoint pjp)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_METRIC_NAME

        public static final java.lang.String DEFAULT_METRIC_NAME
        See Also:
        Constant Field Values
      • EXCEPTION_TAG

        public static final java.lang.String EXCEPTION_TAG
        Tag key for an exception.
        Since:
        1.1.0
        See Also:
        Constant Field Values
    • Constructor Detail

      • TimedAspect

        public TimedAspect​(MeterRegistry registry,
                           java.util.function.Function<org.aspectj.lang.ProceedingJoinPoint,​java.lang.Iterable<Tag>> tagsBasedOnJoinPoint)
    • Method Detail

      • timedMethod

        public java.lang.Object timedMethod​(org.aspectj.lang.ProceedingJoinPoint pjp)
                                     throws java.lang.Throwable
        Throws:
        java.lang.Throwable