I am noticing strange spikes in data in Graphite, and I am using Dropwizard metrics to send the metrics to Graphite. I am specifically using the Metrics meter class to gather metrics. I have code in place which more or less does the following
public void recordMetric(){
metricRegistry.meter("count.employee").mark();
if (employee.getDesignation().equalsIgnoreCase("manager"){
metricRegistry.meter("count.employee.manager").mark();
}
}
The problem is when I view the "m1_rate" on Graphite, there are a lot of instances where the "count.employee.manager" metric has a higher rate than "count.employee" . How is this possible? This is throwing off my other metrics and casts doubts on the viability of the metric. Has anyone run into this problem? Any pointers on how this problem can be fixed? I suspect, this might be due to some quirks in Graphite, but not sure. Any help would be greatly appreciated. Thanks!