Class Aggregation

Inheritance Relationships

Derived Types

Class Documentation

class Aggregation

Subclassed by opentelemetry::sdk::metrics::DoubleHistogramAggregation, opentelemetry::sdk::metrics::DoubleLastValueAggregation, opentelemetry::sdk::metrics::DoubleSumAggregation, opentelemetry::sdk::metrics::DropAggregation, opentelemetry::sdk::metrics::LongHistogramAggregation, opentelemetry::sdk::metrics::LongLastValueAggregation, opentelemetry::sdk::metrics::LongSumAggregation

Public Functions

virtual void Aggregate(int64_t value, const PointAttributes &attributes = {}) noexcept = 0
virtual void Aggregate(double value, const PointAttributes &attributes = {}) noexcept = 0
virtual std::unique_ptr<Aggregation> Merge(const Aggregation &delta) const noexcept = 0

Returns the result of the merge of the two aggregations.

This should always assume that the aggregations do not overlap and merge together for a new cumulative report.

Parameters:

delta – the newly captured (delta) aggregation

Returns:

the result of the merge of the given aggregation.

virtual std::unique_ptr<Aggregation> Diff(const Aggregation &next) const noexcept = 0

Returns a new delta aggregation by comparing two cumulative measurements.

Parameters:

next – the newly captured (cumulative) aggregation.

Returns:

The resulting delta aggregation.

virtual PointType ToPoint() const noexcept = 0

Returns the point data that the aggregation will produce.

Returns:

PointType

virtual ~Aggregation() = default