Class DoubleExplicitBucketHistogramAggregator
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.internal.aggregator.DoubleExplicitBucketHistogramAggregator
-
- All Implemented Interfaces:
Aggregator<HistogramPointData,DoubleExemplarData>
public final class DoubleExplicitBucketHistogramAggregator extends java.lang.Object implements Aggregator<HistogramPointData,DoubleExemplarData>
Aggregator that generates explicit bucket 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 classDoubleExplicitBucketHistogramAggregator.Handle
-
Field Summary
Fields Modifier and Type Field Description private double[]boundariesprivate java.util.List<java.lang.Double>boundaryListprivate MemoryModememoryModeprivate java.util.function.Supplier<ExemplarReservoir<DoubleExemplarData>>reservoirSupplier
-
Constructor Summary
Constructors Constructor Description DoubleExplicitBucketHistogramAggregator(double[] boundaries, java.util.function.Supplier<ExemplarReservoir<DoubleExemplarData>> reservoirSupplier, MemoryMode memoryMode)Constructs an explicit bucket histogram aggregator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AggregatorHandle<HistogramPointData,DoubleExemplarData>createHandle()Returns a newAggregatorHandle.MetricDatatoMetricData(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, MetricDescriptor metricDescriptor, java.util.Collection<HistogramPointData> pointData, AggregationTemporality temporality)Returns theMetricDatathat thisAggregationwill 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
-
boundaries
private final double[] boundaries
-
memoryMode
private final MemoryMode memoryMode
-
boundaryList
private final java.util.List<java.lang.Double> boundaryList
-
reservoirSupplier
private final java.util.function.Supplier<ExemplarReservoir<DoubleExemplarData>> reservoirSupplier
-
-
Constructor Detail
-
DoubleExplicitBucketHistogramAggregator
public DoubleExplicitBucketHistogramAggregator(double[] boundaries, java.util.function.Supplier<ExemplarReservoir<DoubleExemplarData>> reservoirSupplier, MemoryMode memoryMode)Constructs an explicit bucket histogram aggregator.- Parameters:
boundaries- Bucket boundaries, in-order.reservoirSupplier- Supplier of exemplar reservoirs per-stream.memoryMode- TheMemoryModeto use in this aggregator.
-
-
Method Detail
-
createHandle
public AggregatorHandle<HistogramPointData,DoubleExemplarData> createHandle()
Description copied from interface:AggregatorReturns a newAggregatorHandle. This MUST by used by the synchronous to aggregate recorded measurements during the collection cycle.- Specified by:
createHandlein interfaceAggregator<HistogramPointData,DoubleExemplarData>- Returns:
- a new
AggregatorHandle.
-
toMetricData
public MetricData toMetricData(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, MetricDescriptor metricDescriptor, java.util.Collection<HistogramPointData> pointData, AggregationTemporality temporality)
Description copied from interface:AggregatorReturns theMetricDatathat thisAggregationwill produce.- Specified by:
toMetricDatain interfaceAggregator<HistogramPointData,DoubleExemplarData>- Parameters:
resource- the resource producing the metric.instrumentationScopeInfo- the scope that instrumented the metric.metricDescriptor- the name, description and unit of the metric.pointData- list of pointstemporality- the temporality of the metric.- Returns:
- the
MetricDataTypethat thisAggregationwill produce.
-
-