cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alain Rastoul (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-13103) incorrect jvm metric names
Date Thu, 05 Jan 2017 19:30:58 GMT
Alain Rastoul created CASSANDRA-13103:

             Summary: incorrect jvm metric names
                 Key: CASSANDRA-13103
             Project: Cassandra
          Issue Type: Bug
          Components: Observability
            Reporter: Alain Rastoul
            Priority: Minor

Some jvm metrics have a double dot in name like: , (etc).
it seems that an extra dot is added at the end of the name in, around
line 367 (in 3.0.10):
                // enable metrics provided by metrics-jvm.jar
                CassandraMetricsRegistry.Metrics.register("jvm.buffers.", new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer()));
                CassandraMetricsRegistry.Metrics.register("jvm.gc.", new GarbageCollectorMetricSet());
                CassandraMetricsRegistry.Metrics.register("jvm.memory.", new MemoryUsageGaugeSet());

and also added in append method of MetricRegistry.
Call stack is:
MetricRegistry>>registerAll(String prefix, MetricSet metrics)
MetricRegistry>>static String name(String name, String... names)
MetricRegistry>>static void append(StringBuilder builder, String part)

and in append the dot is also added:
            if(builder.length() > 0) {

The codahale MetricRegistry class seems to have no recent modification of name or append methods,
so it look like a small bug.
May be the fix could be to simply remove the final dot ?

This message was sent by Atlassian JIRA

View raw message