diff --git a/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/metrics/MonitoredAspect.java b/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/metrics/MonitoredAspect.java index 239fbc319..e61d9a4b7 100644 --- a/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/metrics/MonitoredAspect.java +++ b/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/metrics/MonitoredAspect.java @@ -53,7 +53,7 @@ public Object monitor(ProceedingJoinPoint pjp) throws Throwable { public Object monitor(ProceedingJoinPoint pjp, Monitored monitored) throws Throwable { String metricBasePath = buildMetricBasePath(pjp); - String newMetricBasePath = buildMetricWithTagsBasePath(pjp); + String metricWithTagBasePath = buildMetricWithTagsBasePath(pjp); String methodName = getMethodName(pjp); String result = null; @@ -73,9 +73,9 @@ public Object monitor(ProceedingJoinPoint pjp, Monitored monitored) throws Throw stopwatch.elapsed(TimeUnit.MILLISECONDS)); // Sends metrics with Tags: federation_namespace and method_name - incrementWithTags(buildMetricPath(COUNTER, newMetricBasePath, "calls"), methodName); - incrementWithTags(buildMetricPath(COUNTER, newMetricBasePath, result), methodName); - submitWithTags(buildMetricPath(TIMER, newMetricBasePath, "duration"), + incrementWithTags(buildMetricPath(COUNTER, metricWithTagBasePath, "calls"), methodName); + incrementWithTags(buildMetricPath(COUNTER, metricWithTagBasePath, result), methodName); + submitWithTags(buildMetricPath(TIMER, metricWithTagBasePath, "duration"), stopwatch.elapsed(TimeUnit.MILLISECONDS), methodName); } }