From 93b927e03b3e365ff072dc7c3a2f33e95e60dd49 Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Thu, 20 Jul 2023 14:42:21 +0000 Subject: [PATCH] allow passing MetricProducers to MetricReaders via config --- CHANGELOG.md | 3 +++ specification/metrics/sdk.md | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f46e7f8bae0..5efbe1def3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ release. ### Metrics +- Allow passing MetricProducers as config to MetricReaders instead of through RegisterProducer. + ([#TODO](https://github.com/open-telemetry/opentelemetry-specification/pull/TODO)) + ### Logs ### Resource diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index 2e66ff1d4a1..0994fe8e812 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -1112,6 +1112,11 @@ If the [MeterProvider](#meterprovider) is an instance of MeterProvider, but MUST NOT allow multiple [MeterProviders](#meterprovider) to be registered with the same MetricReader. +MetricReaders MAY accept zero or more MetricProducers during construction +instead of providing the RegisterProducer operation. Provided MetricProducers +are used as a source of of aggregated metric data in subsequent invocations of +Collect. + #### Collect Collects the metrics from the SDK and any registered