Class CodahaleSlf4jReporter.Builder

  • All Implemented Interfaces:

    
    public final class CodahaleSlf4jReporter.Builder
    
                        

    A builder for Slf4jReporter instances. Defaults to logging to metrics, not using a marker, converting rates to events/second, converting durations to milliseconds, and not filtering metrics.

    • Constructor Detail

      • CodahaleSlf4jReporter.Builder

        CodahaleSlf4jReporter.Builder(MetricRegistry registry)
    • Method Detail

      • shutdownExecutorOnStop

         final CodahaleSlf4jReporter.Builder shutdownExecutorOnStop(Boolean shutdownExecutorOnStop)

        Specifies whether or not, the executor (used for reporting) will be stopped with same time with reporter. Default value is true. Setting this parameter to false, has the sense in combining with providing external managed executor via .scheduleOn.

        Parameters:
        shutdownExecutorOnStop - if true, then executor will be stopped in same time with this reporter
        Returns:

        this

      • scheduleOn

         final CodahaleSlf4jReporter.Builder scheduleOn(ScheduledExecutorService executor)

        Specifies the executor to use while scheduling reporting of metrics. Default value is null. Null value leads to executor will be auto created on start.

        Parameters:
        executor - the executor to use while scheduling reporting of metrics.
        Returns:

        this

      • disabledMetricAttributes

         final CodahaleSlf4jReporter.Builder disabledMetricAttributes(Set<MetricAttribute> disabledMetricAttributes)

        Don't report the passed metric attributes for all metrics (e.g. "p999", "stddev" or "m15"). See MetricAttribute.

        Parameters:
        disabledMetricAttributes - a set of MetricAttribute
        Returns:

        this