Interface AggregationTemporalitySelector
-
- All Known Subinterfaces:
MetricExporter,MetricReader
- All Known Implementing Classes:
OtlpGrpcMetricExporter,OtlpHttpMetricExporter,PeriodicMetricReader
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface AggregationTemporalitySelectorA functional interface that selectsAggregationTemporalitybased onInstrumentType.- Since:
- 1.14.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static AggregationTemporalitySelectoralwaysCumulative()A common implementation ofAggregationTemporalitySelectorwhich returnsAggregationTemporality.CUMULATIVEfor all instruments.static java.lang.StringasString(AggregationTemporalitySelector selector)Returns a string representation of this selector, for using inObject.toString()implementations.static AggregationTemporalitySelectordeltaPreferred()A common implementation ofAggregationTemporalitySelectorwhich indicates delta preference.AggregationTemporalitygetAggregationTemporality(InstrumentType instrumentType)Return the aggregation temporality for theInstrumentType.static AggregationTemporalitySelectorlowMemory()A common implementation ofAggregationTemporalitySelectorwhich reduces memory.
-
-
-
Method Detail
-
alwaysCumulative
static AggregationTemporalitySelector alwaysCumulative()
A common implementation ofAggregationTemporalitySelectorwhich returnsAggregationTemporality.CUMULATIVEfor all instruments.
-
deltaPreferred
static AggregationTemporalitySelector 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.
-
lowMemory
static AggregationTemporalitySelector lowMemory()
A common implementation ofAggregationTemporalitySelectorwhich reduces memory.AggregationTemporality.DELTAis returned forInstrumentType.COUNTERandInstrumentType.HISTOGRAM.AggregationTemporality.CUMULATIVEis returned forInstrumentType.UP_DOWN_COUNTER,InstrumentType.OBSERVABLE_UP_DOWN_COUNTER, andInstrumentType.OBSERVABLE_COUNTER.- Since:
- 1.28.0
-
getAggregationTemporality
AggregationTemporality getAggregationTemporality(InstrumentType instrumentType)
Return the aggregation temporality for theInstrumentType.
-
asString
static java.lang.String asString(AggregationTemporalitySelector selector)
Returns a string representation of this selector, for using inObject.toString()implementations.- Since:
- 1.38.0
-
-