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 all 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 @@ -45,6 +45,10 @@ release.
Asynchronous Counter, and Histogram instruments choose Delta
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
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 @@ -153,7 +153,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 @@ -214,11 +216,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](#drop-aggregation)
to disable instruments by default.

Here are some examples:

Expand Down