Remove other attributes except count

45 Views Asked by At

We have JMX registry in Micrometer.

Questions:

  1. Are there any performance considerations associated with the calculations of these attributes: FifteenMinuteRate, FiveMinuteRate, MeanRate and OneMinuteRate?
  2. How can we remove them except for Count? (Just to make sure there will be no performace overhead)

JMX attributes

Here is a sample of our code:

JmxMeterRegistry meterRegistry = new JmxMeterRegistry(MyJmxConfig.DEFAULT, Clock.SYSTEM);
meterRegistry.counter(name, tags).increment(amount);

interface MyJmxConfig extends JmxConfig {
    MyJmxConfig DEFAULT = k -> null;

    @Override
    default String domain() {
         return "com.example.platform.metrics.test";
    }
}
1

There are 1 best solutions below

2
Jonatan Ivanov On

Micrometer's JmxMeterRegistry uses Dropwizard's JmxReporter that creates these values. JmxMeterRegistry has a ctor that enables you to specify your own JmxReporter and JmxReporter seems to have a capability to specify specificRateUnits, I think if you pass an empty Map, it should not produce the rates above.