Reporting only specific metrics for Timers and Histograms

41 views
Skip to first unread message

Salil Surendran

unread,
Jan 22, 2016, 7:07:44 PM1/22/16
to metrics-user
Timers and histograms are expensive in terms that it generates 15 times more metrics than a counter or gauge and the users are not always interested in all the metrics. I was wondering if there is a way to limit the metrics being reported to only the metrics that I am interested in.

Justin Mason

unread,
Jan 24, 2016, 7:27:37 AM1/24/16
to metrics-user
sounds like the fix hinted at in https://github.com/dropwizard/metrics/issues/887 would address this, maybe?

Thanks for asking! This is a desirable feature, however I am hoping to have configurable percentiles as a native feature in Metrics 4 (each metric will define a set of attributes which they export, and the attributes would be configurable globally or per metric), and the reporters will report the attributes defined by the metrics. At least that's the current plan.


On Sat, 23 Jan 2016 at 00:07 Salil Surendran <ssure...@medallia.com> wrote:
Timers and histograms are expensive in terms that it generates 15 times more metrics than a counter or gauge and the users are not always interested in all the metrics. I was wondering if there is a way to limit the metrics being reported to only the metrics that I am interested in.

--
You received this message because you are subscribed to the Google Groups "metrics-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metrics-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marshall Pierce

unread,
Jan 24, 2016, 11:53:51 AM1/24/16
to metric...@googlegroups.com
When registering your Reporter you can define a MetricFilter of your choice.

> On Jan 22, 2016, at 4:07 PM, Salil Surendran <ssure...@medallia.com> wrote:
>
> Timers and histograms are expensive in terms that it generates 15 times more metrics than a counter or gauge and the users are not always interested in all the metrics. I was wondering if there is a way to limit the metrics being reported to only the metrics that I am interested in.
>
>

Salil Surendran

unread,
Jan 24, 2016, 6:02:34 PM1/24/16
to metrics-user
MetricFilter only lets you filter out the whole timer or histogram. I want to filter out for eg. the p999 or p99 but let the mean and stddev through.

Marshall Pierce

unread,
Jan 24, 2016, 7:23:56 PM1/24/16
to metric...@googlegroups.com
Ah, right. I should have remembered that, given that I had to do it myself for the new relic reporter:

https://github.com/palominolabs/metrics-new-relic/blob/master/metrics-new-relic/src/main/java/com/palominolabs/metrics/newrelic/MetricAttributeFilter.java

It would be up to each reporter to implement that separately.

Charlie Groves

unread,
Jan 24, 2016, 7:25:20 PM1/24/16
to metrics-user
I use this hacked version of GraphiteReporter to only report the values I want: https://gist.github.com/groves/b431a79a692bdd7e3adc. It's not ideal in that I need to update it every time I update metrics, but it allows me to send a lot more metrics to Graphite without running out of space. You could probably do something similar for other reporters?
Reply all
Reply to author
Forward
0 new messages