Class ExemplarReservoir
Defined in File reservoir.h
Inheritance Relationships
Derived Types
public opentelemetry::sdk::metrics::FilteredExemplarReservoir
(Class FilteredExemplarReservoir)public opentelemetry::sdk::metrics::FixedSizeExemplarReservoir
(Class FixedSizeExemplarReservoir)public opentelemetry::sdk::metrics::NoExemplarReservoir
(Class NoExemplarReservoir)
Class Documentation
-
class ExemplarReservoir
An interface for an exemplar reservoir of samples.
This represents a reservoir for a specific “point” of metric data.
Subclassed by opentelemetry::sdk::metrics::FilteredExemplarReservoir, opentelemetry::sdk::metrics::FixedSizeExemplarReservoir, opentelemetry::sdk::metrics::NoExemplarReservoir
Public Functions
-
virtual ~ExemplarReservoir() = default
-
virtual void OfferMeasurement(int64_t value, const MetricAttributes &attributes, const opentelemetry::context::Context &context, const opentelemetry::common::SystemTimestamp ×tamp) noexcept = 0
Offers a long measurement to be sampled.
-
virtual void OfferMeasurement(double value, const MetricAttributes &attributes, const opentelemetry::context::Context &context, const opentelemetry::common::SystemTimestamp ×tamp) noexcept = 0
Offers a double measurement to be sampled.
-
virtual std::vector<std::shared_ptr<ExemplarData>> CollectAndReset(const MetricAttributes &pointAttributes) noexcept = 0
Builds vector of Exemplars for exporting from the current reservoir.
Additionally, clears the reservoir for the next sampling period.
- Parameters:
pointAttributes – the Attributes associated with the metric point. ExemplarDatas should filter these out of their final data state.
- Returns:
A vector of sampled exemplars for this point. Implementers are expected to filter out pointAttributes from the original recorded attributes.
-
virtual ~ExemplarReservoir() = default