use of ratpack.dropwizard.metrics.CsvConfig in project ratpack by ratpack.
the class CsvReporterProvider method get.
@Override
public CsvReporter get() {
if (config.getCsv().isPresent()) {
CsvConfig csv = config.getCsv().get();
CsvReporter.Builder builder = CsvReporter.forRegistry(metricRegistry);
if (csv.getIncludeFilter() != null || csv.getExcludeFilter() != null) {
builder.filter(new RegexMetricFilter(csv.getIncludeFilter(), csv.getExcludeFilter()));
}
return builder.build(csv.getReportDirectory());
} else {
return null;
}
}
Aggregations