codahale/metrics — Issue #166: Metrics & GangliaReporter reports TimeUnit to Ganglia
Author: pdoubleya
Created: 2012-02-23 19:27:56+00:00
State: open

Short summary: a Meter, e.g. "requests per second", appears to be reported to Ganglia with units of "seconds" as opposed to "requests".

This is with Metrics 2.0.0.

Meter values are reported to Ganglia with measurements in terms of TimeUnits. I have a Meter, for example, which measures
requests per minute. What appears in our Ganglia web display is a y-axis marked MINUTES as opposed to "requests".
Configuration is simple

final MetricName tps = new MetricName("project", "http", "submit", "");
final Meter meter = Metrics.newMeter(tps, "requests", TimeUnit.MINUTES);
registry.add(tps, meter);

In GangliaReporter, the meter.rateUnit() is used to report "units" to Ganglia, but this appears to mean Ganglia is receiving values in terms of, e.g. minutes - as if it were a timer, rather than a request per minute counter.