From 69a5f78134bdd6a9a5decfbf5abf7f01e45f8924 Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Fri, 14 Jul 2023 18:06:32 +0000 Subject: [PATCH] clarify parameters of the MetricProducer.Produce() --- CHANGELOG.md | 2 +- specification/metrics/sdk.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34016102f19..ce3c25b064b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ release. ### Metrics -- Promote MetricProducer and MetricReader.RegisterProducer specification to feature-freeze. +- Promote MetricProducer and MetricReader.RegisterProducer specification to feature-freeze, and clarify Produce() parameters. ([#3600](https://github.com/open-telemetry/opentelemetry-specification/pull/3600)) ### Logs diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index 741913df74d..7953c415517 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -1422,7 +1422,8 @@ A `MetricProducer` MUST support the following functions: `Produce` provides metrics from the MetricProducer to the caller. `Produce` MUST return a batch of [Metric points](./data-model.md#metric-points). `Produce` does not have any required parameters, however, [OpenTelemetry -SDK](../overview.md#sdk) authors MAY choose to add parameters (e.g. timeout). +SDK](../overview.md#sdk) authors MAY choose to add required or optional +parameters (e.g. timeout). `Produce` SHOULD provide a way to let the caller know whether it succeeded, failed or timed out. When the `Produce` operation fails, the `MetricProducer`