Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify a default-enabled behavior for Metric Views #2417

Merged
merged 9 commits into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | | ? | | - | | | | | | - | |
Expand Down
12 changes: 6 additions & 6 deletions specification/metrics/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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
jmacd marked this conversation as resolved.
Show resolved Hide resolved
by default.
* END.
jmacd marked this conversation as resolved.
Show resolved Hide resolved
jmacd marked this conversation as resolved.
Show resolved Hide resolved

Here are some examples:
Expand Down