Class Base2ExponentialHistogramOptions.Builder

java.lang.Object
io.opentelemetry.sdk.metrics.Base2ExponentialHistogramOptions.Builder
Enclosing class:
Base2ExponentialHistogramOptions

public abstract static class Base2ExponentialHistogramOptions.Builder extends Object
Since:
1.60.0
  • Method Details

    • setMaxBuckets

      public abstract Base2ExponentialHistogramOptions.Builder setMaxBuckets(int maxBuckets)
      Sets the max number of positive buckets and negative buckets (max total buckets is 2 * maxBuckets + 1 zero bucket).
      Parameters:
      maxBuckets - the maximum number of buckets
    • setMaxScale

      public abstract Base2ExponentialHistogramOptions.Builder setMaxScale(int maxScale)
      Sets the maximum and initial scale. If measurements can't fit in a particular scale given the maxBuckets, the scale is reduced until the measurements can be accommodated. Setting maxScale may reduce the number of downscales. Additionally, the performance of computing bucket index is improved when scale is <= 0.
      Parameters:
      maxScale - the maximum scale
    • setRecordMinMax

      public abstract Base2ExponentialHistogramOptions.Builder setRecordMinMax(boolean recordMinMax)
      Sets whether min and max values should be recorded.
      Parameters:
      recordMinMax - whether to record min and max values
    • build

      Returns a new Base2ExponentialHistogramOptions with the configuration of this builder.
      Throws:
      IllegalArgumentException - if maxBuckets is less than 2, or if maxScale is not between -10 and 20 (inclusive).