I am using dropwizard gauge functionality in my code as following :
private AtomicInteger heapUsageAfterCollectionThresholdExceeded;
new Gauge<Integer>() {
@Override
public Integer getValue() {
return heapUsageThresholdExceeded.get();
}
Now this starts pushing the value of heapUsageThresholdExceeded to graphite. I was expecting to see integer values in graphite. But in graphite I see the value reported as a decimal point value (0.15). I have following questions:
ref : https://metrics.dropwizard.io/3.1.0/apidocs/com/codahale/metrics/Gauge.html
To answer your second question, it depends on the frequency at which metrics are reported. The default frequency is 1 minute
You can specify the frequency in your configuration file. Eg -
metrics:
reporters:
- type: graphite
host: localhost
port: 2003
prefix: example
frequency: 1m