0

Graphite doesn't show the unit for time metrics. I am not sure if it is milliseconds or microseconds. How to verify that? I am reporting from JMX MeterRegistry.

hegde
  • 1
  • 2

2 Answers2

1

Based on the "spring-micrometer" tag you added, I assume you're using Micrometer.

Base time unit is governed by MeterRegistry.getBaseTimeUnit(). GraphiteMeterRegistry doesn't override it and extends DropwizardMeterRegistry, so DropwizardMeterRegistry.getBaseTimeUnit() will be used. As you can see, it's milliseconds.

UPDATE:

When reporting to the Graphite, there are time unit conversions. Time unit for rates is seconds and time unit for durations is milliseconds by default.

Johnny Lim
  • 5,623
  • 8
  • 38
  • 53
  • 1
    Yes, you are right! I am using Micrometer. Thanks for guiding me to the source code. I have a better clarity now. I wish graphite had units on it's y axis. :/ – hegde Oct 04 '18 at 14:42
  • I am using JMXMeterRegistry and not GraphiteMeterRegistry. – hegde Oct 16 '18 at 17:10
  • @hegde Is there any reason not to use `GraphiteMeterRegistry` for Graphite? – Johnny Lim Oct 17 '18 at 04:34
  • I am implementing micrometer in spring and exporting metrics to jmx(jconsole) which is then read by graphite. This is because someone else is taking care of the graphite and they are reading from the jmx metrics. :/ – hegde Oct 18 '18 at 16:04
0

you can add unit to your Y -axis from general settings in graphite. For that you need to confirm your unit from code,the way you are publishing to JMX MeterRegistry.

Shail
  • 31
  • 9