/** * Enables the graphite reporter to send data for the given metrics registry to graphite server * with the specified period. * * @param metricsRegistry the metrics registry * @param period the period between successive outputs * @param unit the time unit of {@code period} * @param host the host name of graphite server (carbon-cache agent) * @param port the port number on which the graphite server is listening */ public static void enable(MetricsRegistry metricsRegistry, long period, TimeUnit unit, String host, int port) { enable(metricsRegistry, period, unit, host, port, null); }
/** * Enables the graphite reporter to send data to graphite server with the specified period. * * @param metricsRegistry the metrics registry * @param period the period between successive outputs * @param unit the time unit of {@code period} * @param host the host name of graphite server (carbon-cache agent) * @param port the port number on which the graphite server is listening * @param prefix the string which is prepended to all metric names */ public static void enable(MetricsRegistry metricsRegistry, long period, TimeUnit unit, String host, int port, String prefix) { enable(metricsRegistry, period, unit, host, port, prefix, MetricPredicate.ALL); }
/** * Enables the graphite reporter to send data for the default metrics registry to graphite * server with the specified period. * * @param period the period between successive outputs * @param unit the time unit of {@code period} * @param host the host name of graphite server (carbon-cache agent) * @param port the port number on which the graphite server is listening */ public static void enable(long period, TimeUnit unit, String host, int port) { enable(Metrics.defaultRegistry(), period, unit, host, port); }
/** * Enables the graphite reporter to send data to graphite server with the specified period. * * @param period the period between successive outputs * @param unit the time unit of {@code period} * @param host the host name of graphite server (carbon-cache agent) * @param port the port number on which the graphite server is listening * @param prefix the string which is prepended to all metric names */ public static void enable(long period, TimeUnit unit, String host, int port, String prefix) { enable(Metrics.defaultRegistry(), period, unit, host, port, prefix); }
com.yammer.metrics.reporting.GraphiteReporter.enable(Metrics.defaultRegistry(), getPeriod(), getRealTimeunit(), hostPort.getHost(), hostPort.getPort(), getResolvedPrefix(), getMetricPredicate());
private void enableMetrics2(HostPort hostPort) { GraphiteReporter.enable( Metrics.defaultRegistry(), getPeriod(), getRealTimeunit(), hostPort.getHost(), hostPort.getPort(), getResolvedPrefix(), MetricPredicateTransformer.generatePredicate(getPredicate())); }