I have implemented Dropwizard metrics in my application. I am sending metrics to Graphite using below code.
final Graphite graphite = new Graphite(new InetSocketAddress("xxx.xxx.xxx.xxx", xxxx));
final GraphiteReporter graphiteReporter = GraphiteReporter.forRegistry(metricRegistry)
.prefixedWith(getReporterRootTagName())
.convertRatesTo(TimeUnit.SECONDS)
.convertDurationsTo(TimeUnit.MILLISECONDS)
.filter(MetricFilter.ALL)
.build(graphite);
graphiteReporter.start(Integer.parseInt(getTimePeriod()), timeUnit);
I want to add custom MetricFilter so that instead of sending all metrics to Graphite only few specific metrics will be sent.
eg. max,mean,min,mean only.
Please post MetricFilter usage.