Class DeltaBase2ExponentialHistogram
java.lang.Object
io.micrometer.registry.otlp.internal.Base2ExponentialHistogram
io.micrometer.registry.otlp.internal.DeltaBase2ExponentialHistogram
- All Implemented Interfaces:
io.micrometer.core.instrument.distribution.Histogram,AutoCloseable
A
Base2ExponentialHistogram where values are reset after every Step.
Internally, this uses StepValue to roll the HistogramSnapshot for every step.
This is an internal class and might have breaking changes, external implementations SHOULD NOT rely on this implementation.
- Since:
- 1.14.0
-
Constructor Summary
ConstructorsConstructorDescriptionDeltaBase2ExponentialHistogram(int maxScale, int maxBucketsCount, double zeroThreshold, TimeUnit baseUnit, io.micrometer.core.instrument.Clock clock, long stepMillis) Creates an Base2ExponentialHistogram that record positive values and resets for every step. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Returns the latest snapshot of recordings fromBase2ExponentialHistogram.takeExponentialHistogramSnapShot()and not the current set of values.Methods inherited from class io.micrometer.registry.otlp.internal.Base2ExponentialHistogram
recordDouble, recordLong, takeSnapshot
-
Constructor Details
-
DeltaBase2ExponentialHistogram
public DeltaBase2ExponentialHistogram(int maxScale, int maxBucketsCount, double zeroThreshold, @Nullable TimeUnit baseUnit, io.micrometer.core.instrument.Clock clock, long stepMillis) Creates an Base2ExponentialHistogram that record positive values and resets for every step. This doesn't move the step window during recording but this does so on callingBase2ExponentialHistogram.takeSnapshot(long, double, double)()}.- Parameters:
maxScale- - maximum scale that can be used. The recordings start with this scale and gets downscaled to the scale that supports recording data within maxBucketsCount.maxBucketsCount- - maximum number of buckets that can be used for distribution.zeroThreshold- - values less than or equal to this are considered in zero count and recorded in the histogram. If less than 0, this is rounded to zero. In case of recording time, this should be in nanoseconds.baseUnit- - an Optional TimeUnit. If set to a non-null unit, the recorded values are converted to this unit.clock- - clock to be used.stepMillis- - window for delta aggregation
-
-
Method Details
-
getLatestExponentialHistogramSnapshot
Description copied from class:Base2ExponentialHistogramReturns the latest snapshot of recordings fromBase2ExponentialHistogram.takeExponentialHistogramSnapShot()and not the current set of values. It is recommended to use this method to consume values recorded in this Histogram as this will provide consistency in recorded values.- Specified by:
getLatestExponentialHistogramSnapshotin classBase2ExponentialHistogram
-
close
public void close()
-