Class MetricProducer

Nested Relationships

Nested Types

Inheritance Relationships

Derived Type

Class Documentation

class MetricProducer

MetricProducer defines the interface which bridges to third-party metric sources MUST implement, so they can be plugged into an OpenTelemetry MetricReader as a source of aggregated metric data.

Implementations must be thread-safe, and should accept configuration for the AggregationTemporality of produced metrics.

Subclassed by opentelemetry::sdk::metrics::MetricCollector

Public Types

enum class Status

Values:

enumerator kSuccess
enumerator kFailure
enumerator kTimeout

Public Functions

MetricProducer() = default
virtual ~MetricProducer() = default
MetricProducer(const MetricProducer&) = delete
MetricProducer(const MetricProducer&&) = delete
void operator=(const MetricProducer&) = delete
void operator=(const MetricProducer&&) = delete
virtual Result Produce() noexcept = 0

Produce returns a batch of Metric Points, with a single instrumentation scope that identifies the MetricProducer. Implementations may return successfully collected points even if there is a partial failure.

struct Result

Public Members

ResourceMetrics points_
Status status_