@before("publicMethods() && annotation(countedAnnotation)")
public void instrumentCounted(JoinPoint jp, Counted countedAnnotation)
{
String name= name(jp.getTarget().getClass(), StringUtils.hasLength(countedAnnotation.name())?
countedAnnotation.name():jp.getSignature().getName(),"counter");
Counter counter = counters.computeIfAbsent(name,key->metricRegistry.counter(java.lang.String.valueOf(key)));
}
@Before("publicMethods()&&annotation(meteredAnnotaion)")
public void instrumentMetered(JoinPoint jp, Metered meteredAnnotaion)
{
String name=name(jp.getTarget().getClass(),StringUtils.hasLength(meteredAnnotaion.name())?meteredAnnotaion.name():jp.getSignature().getName(),"meter");
}
@before("publicMethods() && annotation(countedAnnotation)")
public void instrumentCounted(JoinPoint jp, Counted countedAnnotation)
{
String name= name(jp.getTarget().getClass(), StringUtils.hasLength(countedAnnotation.name())?
countedAnnotation.name():jp.getSignature().getName(),"counter");
Counter counter = counters.computeIfAbsent(name,key->metricRegistry.counter(java.lang.String.valueOf(key)));
}