Package io.opentelemetry.sdk.metrics
Interface Aggregation
public interface Aggregation
Configures how instrument measurements are combined into metrics.
Aggregation provides a set of built-in aggregations via static methods.
- Since:
- 1.14.0
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic Aggregation
Choose the default aggregation for theInstrumentType
.static Aggregation
drop()
Drops all measurements and don't export any metric.static Aggregation
Aggregates measurements into an explicit bucketMetricDataType.HISTOGRAM
using the default bucket boundaries.static Aggregation
explicitBucketHistogram
(List<Double> bucketBoundaries) Aggregates measurements into an explicit bucketMetricDataType.HISTOGRAM
.static Aggregation
Records the last seen measurement as aMetricDataType.DOUBLE_GAUGE
orMetricDataType.LONG_GAUGE
.static Aggregation
sum()
Aggregates measurements into aMetricDataType.DOUBLE_SUM
orMetricDataType.LONG_SUM
.
-
Method Details
-
drop
Drops all measurements and don't export any metric. -
defaultAggregation
Choose the default aggregation for theInstrumentType
. -
sum
Aggregates measurements into aMetricDataType.DOUBLE_SUM
orMetricDataType.LONG_SUM
. -
lastValue
Records the last seen measurement as aMetricDataType.DOUBLE_GAUGE
orMetricDataType.LONG_GAUGE
. -
explicitBucketHistogram
Aggregates measurements into an explicit bucketMetricDataType.HISTOGRAM
using the default bucket boundaries. -
explicitBucketHistogram
Aggregates measurements into an explicit bucketMetricDataType.HISTOGRAM
.- Parameters:
bucketBoundaries
- A list of (inclusive) upper bounds for the histogram. Should be in order from lowest to highest.
-