Class GraphiteReporter

    • Constructor Detail

      • GraphiteReporter

        protected GraphiteReporter​(io.dropwizard.metrics5.MetricRegistry registry,
                                   GraphiteSender graphite,
                                   io.dropwizard.metrics5.Clock clock,
                                   String prefix,
                                   TimeUnit rateUnit,
                                   TimeUnit durationUnit,
                                   io.dropwizard.metrics5.MetricFilter filter,
                                   ScheduledExecutorService executor,
                                   boolean shutdownExecutorOnStop,
                                   Set<io.dropwizard.metrics5.MetricAttribute> disabledMetricAttributes)
        Creates a new GraphiteReporter instance.
        Parameters:
        registry - the MetricRegistry containing the metrics this reporter will report
        graphite - the GraphiteSender which is responsible for sending metrics to a Carbon server via a transport protocol
        clock - the instance of the time. Use Clock.defaultClock() for the default
        prefix - the prefix of all metric names (may be null)
        rateUnit - the time unit of in which rates will be converted
        durationUnit - the time unit of in which durations will be converted
        filter - the filter for which metrics to report
        executor - the executor to use while scheduling reporting of metrics (may be null).
        shutdownExecutorOnStop - if true, then executor will be stopped in same time with this reporter
        disabledMetricAttributes - do not report specific metric attributes
      • GraphiteReporter

        protected GraphiteReporter​(io.dropwizard.metrics5.MetricRegistry registry,
                                   GraphiteSender graphite,
                                   io.dropwizard.metrics5.Clock clock,
                                   String prefix,
                                   TimeUnit rateUnit,
                                   TimeUnit durationUnit,
                                   io.dropwizard.metrics5.MetricFilter filter,
                                   ScheduledExecutorService executor,
                                   boolean shutdownExecutorOnStop,
                                   Set<io.dropwizard.metrics5.MetricAttribute> disabledMetricAttributes,
                                   boolean addMetricAttributesAsTags)
        Creates a new GraphiteReporter instance.
        Parameters:
        registry - the MetricRegistry containing the metrics this reporter will report
        graphite - the GraphiteSender which is responsible for sending metrics to a Carbon server via a transport protocol
        clock - the instance of the time. Use Clock.defaultClock() for the default
        prefix - the prefix of all metric names (may be null)
        rateUnit - the time unit of in which rates will be converted
        durationUnit - the time unit of in which durations will be converted
        filter - the filter for which metrics to report
        executor - the executor to use while scheduling reporting of metrics (may be null).
        shutdownExecutorOnStop - if true, then executor will be stopped in same time with this reporter
        disabledMetricAttributes - do not report specific metric attributes
        addMetricAttributesAsTags - if true, then add metric attributes as tags instead of suffixes
      • GraphiteReporter

        protected GraphiteReporter​(io.dropwizard.metrics5.MetricRegistry registry,
                                   GraphiteSender graphite,
                                   io.dropwizard.metrics5.Clock clock,
                                   String prefix,
                                   TimeUnit rateUnit,
                                   TimeUnit durationUnit,
                                   io.dropwizard.metrics5.MetricFilter filter,
                                   ScheduledExecutorService executor,
                                   boolean shutdownExecutorOnStop,
                                   Set<io.dropwizard.metrics5.MetricAttribute> disabledMetricAttributes,
                                   boolean addMetricAttributesAsTags,
                                   DoubleFunction<String> floatingPointFormatter)
        Creates a new GraphiteReporter instance.
        Parameters:
        registry - the MetricRegistry containing the metrics this reporter will report
        graphite - the GraphiteSender which is responsible for sending metrics to a Carbon server via a transport protocol
        clock - the instance of the time. Use Clock.defaultClock() for the default
        prefix - the prefix of all metric names (may be null)
        rateUnit - the time unit of in which rates will be converted
        durationUnit - the time unit of in which durations will be converted
        filter - the filter for which metrics to report
        executor - the executor to use while scheduling reporting of metrics (may be null).
        shutdownExecutorOnStop - if true, then executor will be stopped in same time with this reporter
        disabledMetricAttributes - do not report specific metric attributes
        addMetricAttributesAsTags - if true, then add metric attributes as tags instead of suffixes
        floatingPointFormatter - custom floating point formatter
    • Method Detail

      • report

        public void report​(SortedMap<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Gauge<?>> gauges,
                           SortedMap<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Counter> counters,
                           SortedMap<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Histogram> histograms,
                           SortedMap<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Meter> meters,
                           SortedMap<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Timer> timers)
        Specified by:
        report in class io.dropwizard.metrics5.ScheduledReporter
      • stop

        public void stop()
        Overrides:
        stop in class io.dropwizard.metrics5.ScheduledReporter
      • format

        protected String format​(double v)