Class MetricSettings.Builder

  • Enclosing class:
    MetricSettings

    @Beta
    public static final class MetricSettings.Builder
    extends java.lang.Object
    A builder for the immutable MetricSettings instances.
    • Constructor Summary

      Constructors 
      Constructor Description
      Builder()
      Create a new builder for a MetricSettings instance with default settings.
    • Constructor Detail

      • Builder

        public Builder()
        Create a new builder for a MetricSettings instance with default settings.
    • Method Detail

      • histogram

        public MetricSettings.Builder histogram​(boolean histogram)
        Set whether a resulting metric should have a histogram. Default is false.
        Parameters:
        histogram - whether to generate a histogram
        Returns:
        this, to facilitate chaining
      • build

        public MetricSettings build()
        Build a fresh MetricSettings instance.
        Returns:
        a MetricSettings instance containing the values set in this builder