From b5146d16107d0e18eb65be816f5af6e4716b1280 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Tue, 15 Mar 2022 12:01:11 -0700 Subject: [PATCH 1/7] Clarify a default-enabled behavior for Metric Views --- specification/metrics/sdk.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index cd9746c43a8..78cc877e855 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -151,7 +151,9 @@ are the inputs: * The `name` of the Instrument(s). [OpenTelemetry SDK](../overview.md#sdk) authors MAY choose to support wildcard characters, with the question mark (`?`) matching exactly one character and the asterisk character (`*`) - matching zero or more characters. + matching zero or more characters. If wildcards are not supported in general, + OpenTelemetry SDKs MUST specifically recognize the single `*` wildcard + as matching all instruments. * The `name` of the Meter (optional). * The `version` of the Meter (optional). * The `schema_url` of the Meter (optional). @@ -210,11 +212,9 @@ made with an Instrument: know (e.g. expose [self-diagnostics logs](../error-handling.md#self-diagnostics)). * If the Instrument could not match with any of the registered `View`(s), the - SDK SHOULD provide a default behavior. The SDK SHOULD also provide a way for - the user to turn off the default behavior via MeterProvider (which means the - Instrument will be ignored when there is no match). Individual - implementations can decide what the default behavior is, and how to turn the - default behavior off. + SDK SHOULD enable the instrument using the default aggregation and temporality. + Users can configure match-all Views using Drop aggregation to disable instruments + by default. * END. Here are some examples: From 5f703773d84967f233754d06f5d625794a3f6506 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Tue, 15 Mar 2022 12:20:19 -0700 Subject: [PATCH 2/7] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc3ecfd0d91..916d30bd782 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,10 @@ release. ([#2379](https://github.com/open-telemetry/opentelemetry-specification/pull/2379)). - Clarify that MetricReader has one-to-one mapping to MeterProvider. ([#2406](https://github.com/open-telemetry/opentelemetry-specification/pull/2406)). +- Clarify that instruments are enabled by default, even when Views are configured. + Require support for the match-all View expression having `name=*` to support + disabling instruments by default. + ([#2417](https://github.com/open-telemetry/opentelemetry-specification/pull/2417)). ### Logs From 43ebf36fad201e2af04ee9420c8096f465346cfb Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Tue, 15 Mar 2022 12:23:09 -0700 Subject: [PATCH 3/7] spec matric --- spec-compliance-matrix.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec-compliance-matrix.md b/spec-compliance-matrix.md index 6f0ae8c43dc..3ed187119e1 100644 --- a/spec-compliance-matrix.md +++ b/spec-compliance-matrix.md @@ -165,6 +165,8 @@ Disclaimer: this list of features is still a work in progress, please refer to t | The updated configuration applies to all already returned `Meter`s. | if above | - | - | | - | | | | | | + | | | There is a way to register `View`s with a `MeterProvider`. | | - | + | | + | | | | | | + | | | The `View` instrument selection criteria is as specified. | | | + | | - | | | | | | + | | +| The `View` instrument selection criteria supports wildcards. | X | | | | | | | | | | | | +| The `View` instrument selection criteria supports the match-all wildcard. | | | | | | | | | | | | | | The name of the `View` can be specified. | | | + | | - | | | | | | + | | | The `View` allows configuring the name description, attributes keys and aggregation of the resulting metric stream. | | | ? | | - | | | | | | - | | | The `View` allows configuring the exemplar reservoir of resulting metric stream. | X | | ? | | - | | | | | | - | | From cee09a8319baacaf1b70dc19ad16cdad4056e61b Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Tue, 22 Mar 2022 07:36:20 -0700 Subject: [PATCH 4/7] Update specification/metrics/sdk.md Co-authored-by: Aaron Abbott --- 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 78cc877e855..d84abf03022 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -213,7 +213,7 @@ made with an Instrument: [self-diagnostics logs](../error-handling.md#self-diagnostics)). * If the Instrument could not match with any of the registered `View`(s), the SDK SHOULD enable the instrument using the default aggregation and temporality. - Users can configure match-all Views using Drop aggregation to disable instruments + Users can configure match-all Views using [Drop aggregation](#drop-aggregation) to disable instruments by default. * END. From 8a03971e4bbd87b61f52ed515699fba4d820e5e5 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Tue, 22 Mar 2022 07:38:28 -0700 Subject: [PATCH 5/7] update --- specification/metrics/sdk.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index 628a4e475be..ee864b3378b 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -151,9 +151,9 @@ are the inputs: * The `name` of the Instrument(s). [OpenTelemetry SDK](../overview.md#sdk) authors MAY choose to support wildcard characters, with the question mark (`?`) matching exactly one character and the asterisk character (`*`) - matching zero or more characters. If wildcards are not supported in general, - OpenTelemetry SDKs MUST specifically recognize the single `*` wildcard - as matching all instruments. + matching zero or more characters. If wildcards are not supported in general, + OpenTelemetry SDKs MUST specifically recognize the single `*` wildcard + as matching all instruments. * The `name` of the Meter (optional). * The `version` of the Meter (optional). * The `schema_url` of the Meter (optional). @@ -214,8 +214,8 @@ made with an Instrument: [self-diagnostics logs](../error-handling.md#self-diagnostics)). * If the Instrument could not match with any of the registered `View`(s), the SDK SHOULD enable the instrument using the default aggregation and temporality. - Users can configure match-all Views using [Drop aggregation](#drop-aggregation) to disable instruments - by default. + Users can configure match-all Views using [Drop aggregation](#drop-aggregation) + to disable instruments by default. * END. Here are some examples: From 1e892328cb73c50d8b383050091d76fc60e7e40c Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Tue, 22 Mar 2022 07:42:15 -0700 Subject: [PATCH 6/7] whitespace --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b84360f361e..1dddb0002f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,7 +46,7 @@ release. temporality by default. ([#2404](https://github.com/open-telemetry/opentelemetry-specification/pull/2404)). - Clarify that instruments are enabled by default, even when Views are configured. - Require support for the match-all View expression having `name=*` to support + Require support for the match-all View expression having `name=*` to support disabling instruments by default. ([#2417](https://github.com/open-telemetry/opentelemetry-specification/pull/2417)). From 63114d6a3c844028e6f5f179b405a1ef48d37df8 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Tue, 22 Mar 2022 08:09:47 -0700 Subject: [PATCH 7/7] Update specification/metrics/sdk.md --- specification/metrics/sdk.md | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index ee864b3378b..f3230d27ead 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -216,7 +216,6 @@ made with an Instrument: SDK SHOULD enable the instrument using the default aggregation and temporality. Users can configure match-all Views using [Drop aggregation](#drop-aggregation) to disable instruments by default. -* END. Here are some examples: