Class DoubleBase2ExponentialHistogramAggregator
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.internal.aggregator.DoubleBase2ExponentialHistogramAggregator
-
- All Implemented Interfaces:
Aggregator<ExponentialHistogramPointData,DoubleExemplarData>
public final class DoubleBase2ExponentialHistogramAggregator extends java.lang.Object implements Aggregator<ExponentialHistogramPointData,DoubleExemplarData>
Aggregator that generates base2 exponential histograms.This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
DoubleBase2ExponentialHistogramAggregator.Handle
-
Field Summary
Fields Modifier and Type Field Description private int
maxBuckets
private int
maxScale
private MemoryMode
memoryMode
private java.util.function.Supplier<ExemplarReservoir<DoubleExemplarData>>
reservoirSupplier
-
Constructor Summary
Constructors Constructor Description DoubleBase2ExponentialHistogramAggregator(java.util.function.Supplier<ExemplarReservoir<DoubleExemplarData>> reservoirSupplier, int maxBuckets, int maxScale, MemoryMode memoryMode)
Constructs an exponential histogram aggregator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AggregatorHandle<ExponentialHistogramPointData,DoubleExemplarData>
createHandle()
Returns a newAggregatorHandle
.MetricData
toMetricData(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, MetricDescriptor metricDescriptor, java.util.Collection<ExponentialHistogramPointData> points, AggregationTemporality temporality)
Returns theMetricData
that thisAggregation
will produce.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.opentelemetry.sdk.metrics.internal.aggregator.Aggregator
copyPoint, createReusablePoint, diff, diffInPlace, toPoint, toPoint
-
-
-
-
Field Detail
-
reservoirSupplier
private final java.util.function.Supplier<ExemplarReservoir<DoubleExemplarData>> reservoirSupplier
-
maxBuckets
private final int maxBuckets
-
maxScale
private final int maxScale
-
memoryMode
private final MemoryMode memoryMode
-
-
Constructor Detail
-
DoubleBase2ExponentialHistogramAggregator
public DoubleBase2ExponentialHistogramAggregator(java.util.function.Supplier<ExemplarReservoir<DoubleExemplarData>> reservoirSupplier, int maxBuckets, int maxScale, MemoryMode memoryMode)
Constructs an exponential histogram aggregator.- Parameters:
reservoirSupplier
- Supplier of exemplar reservoirs per-stream.
-
-
Method Detail
-
createHandle
public AggregatorHandle<ExponentialHistogramPointData,DoubleExemplarData> createHandle()
Description copied from interface:Aggregator
Returns a newAggregatorHandle
. This MUST by used by the synchronous to aggregate recorded measurements during the collection cycle.- Specified by:
createHandle
in interfaceAggregator<ExponentialHistogramPointData,DoubleExemplarData>
- Returns:
- a new
AggregatorHandle
.
-
toMetricData
public MetricData toMetricData(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, MetricDescriptor metricDescriptor, java.util.Collection<ExponentialHistogramPointData> points, AggregationTemporality temporality)
Description copied from interface:Aggregator
Returns theMetricData
that thisAggregation
will produce.- Specified by:
toMetricData
in interfaceAggregator<ExponentialHistogramPointData,DoubleExemplarData>
- Parameters:
resource
- the resource producing the metric.instrumentationScopeInfo
- the scope that instrumented the metric.metricDescriptor
- the name, description and unit of the metric.points
- list of pointstemporality
- the temporality of the metric.- Returns:
- the
MetricDataType
that thisAggregation
will produce.
-
-