Class Aggregation
java.lang.Object
io.opentelemetry.sdk.metrics.view.Aggregation
Configures how measurements are combined into metrics for
Views.
Aggregation provides a set of built-in aggregations via static methods.
-
Method Summary
Modifier and TypeMethodDescriptionabstract <T> io.opentelemetry.sdk.metrics.internal.aggregator.Aggregator<T>createAggregator(io.opentelemetry.sdk.metrics.internal.descriptor.InstrumentDescriptor instrumentDescriptor, ExemplarFilter exemplarFilter) Returns a newAggregator.static AggregationThe default aggregation for an instrument will be chosen.static Aggregationdrop()The drop Aggregation will ignore/drop all Instrument Measurements.static AggregationAggregates measurements into an explicit bucket histogram using the default bucket boundaries.static AggregationexplicitBucketHistogram(List<Double> bucketBoundaries) Aggregates measurements into an explicit bucket histogram.static AggregationAggregates measurements using the best available Histogram.static AggregationRemembers the last seen measurement and reports as a Gauge.static Aggregationsum()Instrument measurements will be combined into a metric Sum.
-
Method Details
-
createAggregator
public abstract <T> io.opentelemetry.sdk.metrics.internal.aggregator.Aggregator<T> createAggregator(io.opentelemetry.sdk.metrics.internal.descriptor.InstrumentDescriptor instrumentDescriptor, ExemplarFilter exemplarFilter) Returns a newAggregator.- Parameters:
instrumentDescriptor- the descriptor of theInstrumentthat will record measurements.exemplarFilter- the filter on which measurements should turn into exemplars- Returns:
- a new
Aggregator.Aggregator.drop()indicates no measurements should be recorded.
-
drop
The drop Aggregation will ignore/drop all Instrument Measurements. -
defaultAggregation
The default aggregation for an instrument will be chosen. -
sum
Instrument measurements will be combined into a metric Sum. -
lastValue
Remembers the last seen measurement and reports as a Gauge. -
explicitBucketHistogram
Aggregates measurements into an explicit bucket histogram using the default bucket boundaries. -
explicitBucketHistogram
Aggregates measurements into an explicit bucket histogram.- Parameters:
bucketBoundaries- A list of (inclusive) upper bounds for the histogram. Should be in order from lowest to highest.
-
histogram
Aggregates measurements using the best available Histogram.
-