Search in sources :

Example 1 with CsvConfig

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;
    }
}
Also used : CsvConfig(ratpack.dropwizard.metrics.CsvConfig) CsvReporter(com.codahale.metrics.CsvReporter)

Aggregations

CsvReporter (com.codahale.metrics.CsvReporter)1 CsvConfig (ratpack.dropwizard.metrics.CsvConfig)1