Class MetricReader

Inheritance Relationships

Derived Type

Class Documentation

class MetricReader

MetricReader defines the interface to collect metrics from SDK

Subclassed by opentelemetry::sdk::metrics::PeriodicExportingMetricReader

Public Functions

MetricReader()
void SetMetricProducer(MetricProducer *metric_producer)
bool Collect(nostd::function_ref<bool(ResourceMetrics &metric_data)> callback) noexcept

Collect the metrics from SDK.

Returns:

return the status of the operation.

virtual AggregationTemporality GetAggregationTemporality(InstrumentType instrument_type) const noexcept = 0

Get the AggregationTemporality for given Instrument Type for this reader.

Returns:

AggregationTemporality

bool Shutdown(std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept

Shutdown the metric reader.

bool ForceFlush(std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept

Force flush the metric read by the reader.

bool IsShutdown() const noexcept

Return the status of Metric reader.

virtual ~MetricReader() = default