From 2917dce675502714f8d167acb0ce2299402b7ea7 Mon Sep 17 00:00:00 2001 From: legendecas Date: Mon, 18 Apr 2022 17:29:39 +0800 Subject: [PATCH 1/3] Clarify MetricReader.Collect result --- CHANGELOG.md | 2 ++ specification/metrics/sdk.md | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a4ba583f0f..42145e718e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ release. - Clarify SDK behavior when view conflicts are present ([#2462](https://github.com/open-telemetry/opentelemetry-specification/pull/2462)). +- Clarify MetricReader.Collect result + ([#2495](https://github.com/open-telemetry/opentelemetry-specification/pull/2495)). ### Logs diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index e040fabeece..7bfab828b47 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -710,7 +710,9 @@ Instruments](./api.md#asynchronous-instrument-api) involved, their callback functions will be triggered. `Collect` SHOULD provide a way to let the caller know whether it succeeded, -failed or timed out. +failed or timed out. When the `Collect` operation fails or times out on +part of the instruments, the SDK SHOULD return all successfully collected result +and a failed reasons list to the caller. `Collect` does not have any required parameters, however, [OpenTelemetry SDK](../overview.md#sdk) authors MAY choose to add parameters (e.g. callback, From d6b38b7d3403dc6b57b5ba64cadf300af3151ea2 Mon Sep 17 00:00:00 2001 From: legendecas Date: Tue, 19 Apr 2022 17:02:54 +0800 Subject: [PATCH 2/3] fixup! --- specification/metrics/sdk.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index 7bfab828b47..e732681a9aa 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -711,7 +711,7 @@ functions will be triggered. `Collect` SHOULD provide a way to let the caller know whether it succeeded, failed or timed out. When the `Collect` operation fails or times out on -part of the instruments, the SDK SHOULD return all successfully collected result +part of the instruments, the SDK MAY return successfully collected results and a failed reasons list to the caller. `Collect` does not have any required parameters, however, [OpenTelemetry From a0fcfa71553300ac329c6e1439e52793e17217d6 Mon Sep 17 00:00:00 2001 From: legendecas Date: Wed, 20 Apr 2022 10:31:22 +0800 Subject: [PATCH 3/3] Update specification/metrics/sdk.md Co-authored-by: Cijo Thomas --- specification/metrics/sdk.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index e732681a9aa..a67a2d70fee 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -711,7 +711,7 @@ functions will be triggered. `Collect` SHOULD provide a way to let the caller know whether it succeeded, failed or timed out. When the `Collect` operation fails or times out on -part of the instruments, the SDK MAY return successfully collected results +some of the instruments, the SDK MAY return successfully collected results and a failed reasons list to the caller. `Collect` does not have any required parameters, however, [OpenTelemetry