add micrometer to collect metrics for prometheus

This commit is contained in:
Alexios Symeonidis 2024-08-06 14:31:07 +03:00
parent 551488952a
commit 202fa8ecbc
1 changed files with 0 additions and 1 deletions

View File

@ -29,7 +29,6 @@ public class MetricsAspect {
@Around("@annotation(io.micrometer.core.annotation.Timed)") @Around("@annotation(io.micrometer.core.annotation.Timed)")
public Object timeAnnotatedMethods(ProceedingJoinPoint joinPoint) throws Throwable { public Object timeAnnotatedMethods(ProceedingJoinPoint joinPoint) throws Throwable {
Method method = ((MethodSignature) joinPoint.getSignature()).getMethod(); Method method = ((MethodSignature) joinPoint.getSignature()).getMethod();
Timed timed = method.getAnnotation(Timed.class);
String className = joinPoint.getTarget().getClass().getSimpleName(); String className = joinPoint.getTarget().getClass().getSimpleName();
String methodName = method.getName(); String methodName = method.getName();