Class DoubleExplicitBucketHistogramAggregator
java.lang.Object
io.opentelemetry.sdk.metrics.internal.aggregator.DoubleExplicitBucketHistogramAggregator
- All Implemented Interfaces:
Aggregator<HistogramPointData,
DoubleExemplarData>
public final class DoubleExplicitBucketHistogramAggregator
extends 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 ClassesModifier and TypeClassDescription(package private) static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final double[]
private final MemoryMode
private final Supplier
<ExemplarReservoir<DoubleExemplarData>> -
Constructor Summary
ConstructorsConstructorDescriptionDoubleExplicitBucketHistogramAggregator
(double[] boundaries, Supplier<ExemplarReservoir<DoubleExemplarData>> reservoirSupplier, MemoryMode memoryMode) Constructs an explicit bucket histogram aggregator. -
Method Summary
Modifier and TypeMethodDescriptionReturns a newAggregatorHandle
.toMetricData
(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, MetricDescriptor metricDescriptor, Collection<HistogramPointData> pointData, 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 Details
-
boundaries
private final double[] boundaries -
memoryMode
-
boundaryList
-
reservoirSupplier
-
-
Constructor Details
-
DoubleExplicitBucketHistogramAggregator
public DoubleExplicitBucketHistogramAggregator(double[] boundaries, 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
- TheMemoryMode
to use in this aggregator.
-
-
Method Details
-
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<HistogramPointData,
DoubleExemplarData> - Returns:
- a new
AggregatorHandle
.
-
toMetricData
public MetricData toMetricData(Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, MetricDescriptor metricDescriptor, Collection<HistogramPointData> pointData, AggregationTemporality temporality) Description copied from interface:Aggregator
Returns theMetricData
that thisAggregation
will produce.- Specified by:
toMetricData
in 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
MetricDataType
that thisAggregation
will produce.
-