Interface AggregationTemporalitySelector
- All Known Subinterfaces:
MetricExporter,MetricReader
- All Known Implementing Classes:
PeriodicMetricReader
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface that selects
AggregationTemporality based on InstrumentType.- Since:
- 1.14.0
-
Method Summary
Modifier and TypeMethodDescriptionA common implementation ofAggregationTemporalitySelectorwhich returnsAggregationTemporality.CUMULATIVEfor all instruments.A common implementation ofAggregationTemporalitySelectorwhich indicates delta preference.getAggregationTemporality(InstrumentType instrumentType) Return the aggregation temporality for theInstrumentType.
-
Method Details
-
alwaysCumulative
A common implementation ofAggregationTemporalitySelectorwhich returnsAggregationTemporality.CUMULATIVEfor all instruments. -
deltaPreferred
A common implementation ofAggregationTemporalitySelectorwhich indicates delta preference.AggregationTemporality.DELTAis returned forInstrumentType.COUNTER,InstrumentType.OBSERVABLE_COUNTER, andInstrumentType.HISTOGRAM.AggregationTemporality.CUMULATIVEis returned forInstrumentType.UP_DOWN_COUNTERandInstrumentType.OBSERVABLE_UP_DOWN_COUNTER. -
getAggregationTemporality
Return the aggregation temporality for theInstrumentType.
-