Class Base2ExponentialHistogramAggregation
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.internal.view.Base2ExponentialHistogramAggregation
-
- All Implemented Interfaces:
Aggregation,AggregatorFactory
public final class Base2ExponentialHistogramAggregation extends java.lang.Object implements Aggregation, AggregatorFactory
Exponential bucket histogram aggregation configuration.This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
-
Field Summary
Fields Modifier and Type Field Description private static AggregationDEFAULTprivate static intDEFAULT_MAX_BUCKETSprivate static intDEFAULT_MAX_SCALEprivate intmaxBucketsprivate intmaxScale
-
Constructor Summary
Constructors Modifier Constructor Description privateBase2ExponentialHistogramAggregation(int maxBuckets, int maxScale)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Aggregationcreate(int maxBuckets, int maxScale)Aggregations measurements into anMetricDataType.EXPONENTIAL_HISTOGRAM.<T extends PointData,U extends ExemplarData>
Aggregator<T,U>createAggregator(InstrumentDescriptor instrumentDescriptor, ExemplarFilter exemplarFilter, MemoryMode memoryMode)Returns a newAggregator.static AggregationgetDefault()booleanisCompatibleWithInstrument(InstrumentDescriptor instrumentDescriptor)Determine if theAggregatorproduced byAggregatorFactory.createAggregator(InstrumentDescriptor, ExemplarFilter, MemoryMode)is compatible with theinstrumentDescriptor.java.lang.StringtoString()
-
-
-
Field Detail
-
DEFAULT_MAX_BUCKETS
private static final int DEFAULT_MAX_BUCKETS
- See Also:
- Constant Field Values
-
DEFAULT_MAX_SCALE
private static final int DEFAULT_MAX_SCALE
- See Also:
- Constant Field Values
-
DEFAULT
private static final Aggregation DEFAULT
-
maxBuckets
private final int maxBuckets
-
maxScale
private final int maxScale
-
-
Method Detail
-
getDefault
public static Aggregation getDefault()
-
create
public static Aggregation create(int maxBuckets, int maxScale)
Aggregations measurements into anMetricDataType.EXPONENTIAL_HISTOGRAM.- Parameters:
maxBuckets- the max number of positive buckets and negative buckets (max total buckets is 2 *maxBuckets+ 1 zero bucket).maxScale- the maximum and initial scale. If measurements can't fit in a particular scale given themaxBuckets, 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.- Returns:
- the aggregation
-
createAggregator
public <T extends PointData,U extends ExemplarData> Aggregator<T,U> createAggregator(InstrumentDescriptor instrumentDescriptor, ExemplarFilter exemplarFilter, MemoryMode memoryMode)
Description copied from interface:AggregatorFactoryReturns a newAggregator.- Specified by:
createAggregatorin interfaceAggregatorFactory- Parameters:
instrumentDescriptor- the descriptor of theInstrumentthat will record measurements.exemplarFilter- the filter on which measurements should turn into exemplarsmemoryMode- TheMemoryModethe aggregator will use- Returns:
- a new
Aggregator.Aggregator.drop()indicates no measurements should be recorded.
-
isCompatibleWithInstrument
public boolean isCompatibleWithInstrument(InstrumentDescriptor instrumentDescriptor)
Description copied from interface:AggregatorFactoryDetermine if theAggregatorproduced byAggregatorFactory.createAggregator(InstrumentDescriptor, ExemplarFilter, MemoryMode)is compatible with theinstrumentDescriptor.- Specified by:
isCompatibleWithInstrumentin interfaceAggregatorFactory
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-