Class ReservoirCell

Class Documentation

class ReservoirCell

A Reservoir cell pre-allocated memories for Exemplar data.

Public Functions

ReservoirCell() = default
inline void RecordLongMeasurement(int64_t value, const MetricAttributes &attributes, const opentelemetry::context::Context &context)

Record the long measurement to the cell.

inline void RecordDoubleMeasurement(double value, const MetricAttributes &attributes, const opentelemetry::context::Context &context)

Record the long measurement to the cell.

inline std::shared_ptr<ExemplarData> GetAndResetLong(const MetricAttributes &point_attributes)

Retrieve the cell’s ExemplarData.

Must be used in tandem with recordLongMeasurement(int64_t, Attributes, Context).

inline std::shared_ptr<ExemplarData> GetAndResetDouble(const MetricAttributes &point_attributes)

Retrieve the cell’s ExemplarData.

Must be used in tandem with recordDoubleMeasurement(double, Attributes, Context).

inline void reset()