Improve segmented journal JMX beans 90/81890/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 3 May 2019 11:01:14 +0000 (13:01 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 3 May 2019 11:02:26 +0000 (13:02 +0200)
This patch updates metric naming to properly tie them to individual
journals -- so that the statistics are actually useful.

JIRA: CONTROLLER-1884
Change-Id: I6f4f398894860566e234562d731462535b62801e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/SegmentedJournalActor.java

index c5fd3cf..1739b25 100644 (file)
@@ -191,7 +191,7 @@ final class SegmentedJournalActor extends AbstractActor {
         super.preStart();
 
         final MetricRegistry registry = MetricsReporter.getInstance(MeteringBehavior.DOMAIN).getMetricsRegistry();
-        final String actorName = self().path().toStringWithoutAddress();
+        final String actorName = self().path().parent().toStringWithoutAddress() + '/' + directory.getName();
 
         batchWriteTime = registry.timer(MetricRegistry.name(actorName, "batchWriteTime"));
         messageWriteCount = registry.meter(MetricRegistry.name(actorName, "messageWriteCount"));

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.