Interface Aggregation
-
@Immutable public interface AggregationAggregationis the process of combining a certain set of recorded measurements for a givenInstrumentinto the equivalentMetricData.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AggregatorFactorygetAggregatorFactory(InstrumentValueType instrumentValueType)Returns anAggregationFactorythat can be used to produce theAggregatorthat needs to be used to aggregate all the values to produce thisAggregation.MetricDatatoMetricData(io.opentelemetry.sdk.resources.Resource resource, io.opentelemetry.sdk.common.InstrumentationLibraryInfo instrumentationLibraryInfo, InstrumentDescriptor descriptor, Map<io.opentelemetry.api.common.Labels,Aggregator> aggregatorMap, long startEpochNanos, long epochNanos)Returns theMetricDatathat thisAggregationwill produce.
-
-
-
Method Detail
-
getAggregatorFactory
AggregatorFactory getAggregatorFactory(InstrumentValueType instrumentValueType)
Returns anAggregationFactorythat can be used to produce theAggregatorthat needs to be used to aggregate all the values to produce thisAggregation.- Parameters:
instrumentValueType- the type of recorded values for theInstrument.- Returns:
- the
AggregationFactory.
-
toMetricData
@Nullable MetricData toMetricData(io.opentelemetry.sdk.resources.Resource resource, io.opentelemetry.sdk.common.InstrumentationLibraryInfo instrumentationLibraryInfo, InstrumentDescriptor descriptor, Map<io.opentelemetry.api.common.Labels,Aggregator> aggregatorMap, long startEpochNanos, long epochNanos)
Returns theMetricDatathat thisAggregationwill produce.- Parameters:
resource- the Resource associated with theInstrument.instrumentationLibraryInfo- the InstrumentationLibraryInfo associated with theInstrument.descriptor- the InstrumentDescriptor of theInstrument.aggregatorMap- the map of Labels to Aggregators.startEpochNanos- the startEpochNanos for thePoint.epochNanos- the epochNanos for thePoint.- Returns:
- the
MetricData.Typethat thisAggregationwill produce.
-
-