Interface ExponentialHistogramPointData
- All Superinterfaces:
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().
- Since:
- 1.23.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreate(int scale, double sum, long zeroCount, boolean hasMin, double min, boolean hasMax, double max, ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets, long startEpochNanos, long epochNanos, io.opentelemetry.api.common.Attributes attributes, List<DoubleExemplarData> exemplars) Create a record.longgetCount()Returns the number of measurements taken for this data point, including the positive bucket counts, negative bucket counts, and the zero count.List of exemplars collected from measurements that were used to form the data point.doublegetMax()The max of all measurements recorded, ifhasMax()istrue.doublegetMin()The min of all measurements recorded, ifhasMin()istrue.Return theExponentialHistogramBucketsrepresenting the negative measurements taken for this histogram.Return theExponentialHistogramBucketsrepresenting the positive measurements taken for this histogram.intgetScale()Scale characterises the resolution of the histogram, with larger values of scale offering greater precision.doublegetSum()Returns the sum of all measurements in the data point.longReturns the number of measurements equal to zero in this data point.booleanhasMax()ReturntrueifgetMax()is set.booleanhasMin()ReturntrueifgetMin()is set.Methods inherited from interface io.opentelemetry.sdk.metrics.data.PointData
getAttributes, getEpochNanos, getStartEpochNanos
-
Method Details
-
create
static ExponentialHistogramPointData create(int scale, double sum, long zeroCount, boolean hasMin, double min, boolean hasMax, double max, ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets, long startEpochNanos, long epochNanos, io.opentelemetry.api.common.Attributes attributes, List<DoubleExemplarData> exemplars) Create a record.- Since:
- 1.50.0
-
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, wherebase = 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.
-
hasMin
boolean hasMin()ReturntrueifgetMin()is set. -
getMin
double getMin() -
hasMax
boolean hasMax()ReturntrueifgetMax()is set. -
getMax
double getMax() -
getPositiveBuckets
ExponentialHistogramBuckets getPositiveBuckets()Return theExponentialHistogramBucketsrepresenting the positive measurements taken for this histogram.- Returns:
- the positive buckets.
-
getNegativeBuckets
ExponentialHistogramBuckets getNegativeBuckets()Return theExponentialHistogramBucketsrepresenting the negative measurements taken for this histogram.- Returns:
- the negative buckets.
-
getExemplars
List<DoubleExemplarData> getExemplars()List of exemplars collected from measurements that were used to form the data point.- Specified by:
getExemplarsin interfacePointData
-