Defined in File metric_producer.h
public opentelemetry::sdk::metrics::MetricCollector(Class MetricCollector)
MetricProducer is the interface that is used to make metric data available to the OpenTelemetry exporters. Implementations should be stateful, in that each call to
Collectwill return any metric generated since the last call was made.
Implementations must be thread-safe.
Subclassed by opentelemetry::sdk::metrics::MetricCollector
MetricProducer() = default
virtual ~MetricProducer() = default
virtual bool Collect(nostd::function_ref<bool(ResourceMetrics &metric_data)> callback) noexcept = 0
The callback to be called for each metric exporter. This will only be those metrics that have been produced since the last time this method was called.
a status of completion of method.
- MetricProducer() = default