diff --git a/sdk/include/opentelemetry/sdk/metrics/export/metric_producer.h b/sdk/include/opentelemetry/sdk/metrics/export/metric_producer.h index 17d8bc0561..b05298de34 100644 --- a/sdk/include/opentelemetry/sdk/metrics/export/metric_producer.h +++ b/sdk/include/opentelemetry/sdk/metrics/export/metric_producer.h @@ -33,6 +33,19 @@ struct ScopeMetrics { const opentelemetry::sdk::instrumentationscope::InstrumentationScope *scope_ = nullptr; std::vector metric_data_; + + template + inline ScopeMetrics(ScopePtr &&scope, MetricDataType &&metric) + : scope_{std::move(scope)}, metric_data_{std::move(metric)} + {} + + inline ScopeMetrics() {} + inline ScopeMetrics(const ScopeMetrics &) = default; + inline ScopeMetrics(ScopeMetrics &&) = default; + + inline ScopeMetrics &operator=(const ScopeMetrics &) = default; + + inline ScopeMetrics &operator=(ScopeMetrics &&) = default; }; struct ResourceMetrics