@@ -81,17 +81,20 @@ class OPENTELEMETRY_EXPORT MeterProvider final : public opentelemetry::metrics::
8181 const sdk::resource::Resource &GetResource () const noexcept ;
8282
8383 /* *
84- * Attaches a metric reader to list of configured readers for this Meter providers.
85- * @param reader The metric reader for this meter provider. This
86- * must not be a nullptr.
87- * @param metric_filter The optional metric filter for the metric producer on which the supplied
88- * metric reader is to be registered.
84+ * Create a MetricCollector from a MetricReader using the MeterContext of this MeterProvider and
85+ * add it to the list of configured collectors.
86+ * @param reader The MetricReader for which a MetricCollector is to be created. This must not be a
87+ * nullptr.
88+ * @param metric_filter The optional MetricFilter used when creating the MetricCollector.
89+ * @return The MetricCollector created.
8990 *
9091 * Note: This reader may not receive any in-flight meter data, but will get newly created meter
91- * data. Note: This method is not thread safe, and should ideally be called from main thread.
92+ * data.
93+ * Note: This method is not thread safe, and should ideally be called from main thread.
9294 */
93- void AddMetricReader (std::shared_ptr<MetricReader> reader,
94- absl::optional<MetricFilter> metric_filter = absl::nullopt ) noexcept ;
95+ std::shared_ptr<MetricCollector> AddMetricReader (
96+ std::shared_ptr<MetricReader> reader,
97+ absl::optional<MetricFilter> metric_filter = absl::nullopt ) noexcept ;
9598
9699 /* *
97100 * Attaches a View to list of configured Views for this Meter provider.
0 commit comments