Interface ExponentialHistogramPointData

All Superinterfaces:
PointData

@Immutable public interface ExponentialHistogramPointData extends PointData
ExponentialHistogramPointData represents an approximate distribution of measurements across exponentially increasing bucket boundaries, taken for a ExponentialHistogramData. It contains the necessary information to calculate bucket boundaries and perform aggregation.

The bucket boundaries are calculated using both the scale getScale(), and the offset ExponentialHistogramBuckets.getOffset().

See: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/datamodel.md#exponentialhistogram

  • Method Details

    • create

      static ExponentialHistogramPointData create(int scale, double sum, long zeroCount, ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets, long startEpochNanos, long epochNanos, io.opentelemetry.api.common.Attributes attributes, List<ExemplarData> exemplars)
      Create an ExponentialHistogramPointData.
      Returns:
      an ExponentialHistogramPointData.
    • getScale

      int getScale()
      Scale characterises the resolution of the histogram, with larger values of scale offering greater precision. Bucket boundaries of the histogram are located at integer powers of the base, where base = Math.pow(2, Math.pow(2, -scale)).
      Returns:
      the scale.
    • getSum

      double getSum()
      Returns the sum of all measurements in the data point. The sum should be disregarded if there are both positive and negative measurements.
      Returns:
      the sum of all measurements in this data point.
    • getCount

      long getCount()
      Returns the number of measurements taken for this data point, including the positive bucket counts, negative bucket counts, and the zero count.
      Returns:
      the number of measurements in this data point.
    • getZeroCount

      long getZeroCount()
      Returns the number of measurements equal to zero in this data point.
      Returns:
      the number of values equal to zero.
    • getPositiveBuckets

      ExponentialHistogramBuckets getPositiveBuckets()
      Return the ExponentialHistogramBuckets representing the positive measurements taken for this histogram.
      Returns:
      the positive buckets.
    • getNegativeBuckets

      ExponentialHistogramBuckets getNegativeBuckets()
      Return the ExponentialHistogramBuckets representing the negative measurements taken for this histogram.
      Returns:
      the negative buckets.