Interface Aggregation


  • @Immutable
    public interface Aggregation
    Aggregation is the process of combining a certain set of recorded measurements for a given Instrument into the equivalent MetricData.
    • Method Detail

      • getAggregatorFactory

        AggregatorFactory getAggregatorFactory​(InstrumentValueType instrumentValueType)
        Returns an AggregationFactory that can be used to produce the Aggregator that needs to be used to aggregate all the values to produce this Aggregation.
        Parameters:
        instrumentValueType - the type of recorded values for the Instrument.
        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 the MetricData that this Aggregation will produce.
        Parameters:
        resource - the Resource associated with the Instrument.
        instrumentationLibraryInfo - the InstrumentationLibraryInfo associated with the Instrument.
        descriptor - the InstrumentDescriptor of the Instrument.
        aggregatorMap - the map of Labels to Aggregators.
        startEpochNanos - the startEpochNanos for the Point.
        epochNanos - the epochNanos for the Point.
        Returns:
        the MetricData.Type that this Aggregation will produce.