Package com.codahale.metrics.graphite.GraphiteReporter

Examples of com.codahale.metrics.graphite.GraphiteReporter.Builder


        }

        final MetricRegistry metricRegistry = new MetricRegistry();
        final Graphite graphite = new Graphite(new InetSocketAddress(graphiteHost, graphitePort));

        final Builder builder =
            GraphiteReporter.forRegistry(metricRegistry).convertRatesTo(TimeUnit.SECONDS)
                .convertDurationsTo(TimeUnit.MILLISECONDS).filter(MetricFilter.ALL);
        if (StringUtils.isNotBlank(metricPrefix)) {
            LOGGER.info("Metric prefix: {}", metricPrefix);
            builder.prefixedWith(metricPrefix);
        }

        final GraphiteReporter reporter = builder.build(graphite);
        reporter.start(pollTimeMinutes, TimeUnit.MINUTES);

        return new MetricReporter(metricRegistry, reporter, histogramBuilder);
    }
View Full Code Here

TOP

Related Classes of com.codahale.metrics.graphite.GraphiteReporter.Builder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.