feat: add experimental view_matching_mode to meter provider - #666
Open
dashpole wants to merge 6 commits into
Open
feat: add experimental view_matching_mode to meter provider#666dashpole wants to merge 6 commits into
dashpole wants to merge 6 commits into
Conversation
6 tasks
There was a problem hiding this comment.
Pull request overview
Adds an experimental meter_provider.view_matching_mode/development configuration option to support composable View matching (per spec work), and propagates it through the schema outputs, docs, and language support metadata.
Changes:
- Add
view_matching_mode/developmentto the MeterProvider schema (enum values:independent,composable) and regenerate JSON schema + docs. - Update per-language support metadata to mark the new property as
not_implemented. - Add a validator shelltest for invalid values and update an example configuration to demonstrate usage.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| validator/shelltests/invalid_view_matching_mode.yaml | New negative test input using an invalid view_matching_mode/development value. |
| validator/shelltests/invalid_view_matching_mode.test | Expected validator output for the invalid value case. |
| schema/meter_provider.yaml | Introduces view_matching_mode/development on MeterProvider. |
| schema/meta_schema_language_php.yaml | Marks the new MeterProvider property as not_implemented for PHP. |
| schema/meta_schema_language_js.yaml | Marks the new MeterProvider property as not_implemented for JS. |
| schema/meta_schema_language_java.yaml | Marks the new MeterProvider property as not_implemented for Java. |
| schema/meta_schema_language_go.yaml | Marks the new MeterProvider property as not_implemented for Go. |
| schema/meta_schema_language_cpp.yaml | Marks the new MeterProvider property as not_implemented for C++. |
| schema-docs.md | Documents the new property and its language support status (generated). |
| opentelemetry_configuration.json | Adds the generated JSON schema for the new property. |
| language-support-status.md | Updates generated language support tables to include the new property. |
| examples/otel-sdk-config.yaml | Demonstrates view_matching_mode/development: composable plus views. |
| CHANGELOG.md | Notes the new property in Unreleased. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dashpole
force-pushed
the
add-view-matching-mode
branch
from
June 23, 2026 18:51
5225b23 to
0e8eb3d
Compare
jack-berg
reviewed
Jul 23, 2026
dashpole
force-pushed
the
add-view-matching-mode
branch
from
July 23, 2026 15:40
0e8eb3d to
fb9dda0
Compare
jack-berg
reviewed
Jul 23, 2026
jack-berg
reviewed
Jul 23, 2026
jack-berg
left a comment
Member
There was a problem hiding this comment.
Content looks good. Still need to fix schema-docs.md, mark "ready for review", and get more approvals on the spec PR. But setting aside that, the schema changes look good here.
pull Bot
pushed a commit
to MC-MAGA/opentelemetry-specification
that referenced
this pull request
Aug 7, 2026
Fixes open-telemetry#5013 Following-up after this came up in the spec SIG meeting on 6/23. ### Summary Introduces an opt-in `view_matching_mode` configuration parameter on `MeterProvider` to support merging multiple Views that match the same Instrument. ### API * Adds `view_matching_mode` to `MeterProvider` with two modes: * `independent`: (Default) Maintains existing behavior where matching Views create separate streams independently. * `composable`: Merges matching Views into a single stream unless they configure different stream `name`s. ### Composable merge rules * For `name`, `description`, `aggregation`, `exemplar_reservoir`, and `aggregation_cardinality_limit`, **last-wins precedence** applies based on View registration order. * `attribute_keys`' `included` and `excluded` sets are merged. * `include` keeps only keys present in **all include-lists** (set intersection). * `exclude` drops keys listed in **any of the exclude-lists** (set union). ### Declarative Config example ```yaml meter_provider: view_matching_mode: composable views: # 1. Specific override: Rename histogram and use sum aggregation - selector: meter_name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp instrument_name: http.client.request.duration stream: name: http.client.latency aggregation: sum: {} # 2. Scope policy: Drop status code from all metrics in otelhttp scope - selector: meter_name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp stream: attribute_keys: exclude: - http.response.status_code ``` ### Alternatives Considered * Considered a boolean (`composable_views_enabled: true`) or alternative naming (`composable_views`), but opted for an explicit enum (`view_matching_mode`) to support future extensibility. * Considered **first-wins** ordering because first-wins is used more often in the specification, but aligned on **last-wins** to match reviewer intuition for how it should work. * Considered atomic whole-field last-wins for `attribute_keys`, but opted for set composition so global governance policies (e.g., dropping sensitive PII) layer safely with specific View overrides. * Other alternatives are listed in open-telemetry#5013 ### Checklist * [x] Related issues # * [x] Related [OTEP(s)](https://github.com/open-telemetry/oteps) # * [x] Links to the prototypes (when adding or changing features): open-telemetry/opentelemetry-go#8510 * [x] [`CHANGELOG.md`](https://github.com/open-telemetry/opentelemetry-specification/blob/main/CHANGELOG.md) file updated for non-trivial changes * For trivial changes, include `[chore]` in the PR title to skip the changelog check * [x] [Spec compliance matrix](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix/template.yaml) updated if necessary: * [x] [Declarative config data model](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/data-model.md#overview) is updated if SDK config surface is changed: open-telemetry/opentelemetry-configuration#666 @open-telemetry/specs-metrics-approvers --------- Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
…property Implements composable View matching configuration in support of open-telemetry/opentelemetry-specification#5173. - Adds experimental meter_provider.view_matching_mode/development property ('independent' default, 'composable') - Marks view_matching_mode/development as not_implemented in language support status matrix - Updates existing otel-sdk-config.yaml example and adds validator shelltest edge case
dashpole
force-pushed
the
add-view-matching-mode
branch
from
August 13, 2026 18:59
acb8776 to
0f7a679
Compare
dashpole
marked this pull request as ready for review
August 13, 2026 19:27
jack-berg
reviewed
Aug 13, 2026
jack-berg
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements composable View matching configuration in support of open-telemetry/opentelemetry-specification#5173.
Adds experimental meter_provider.view_matching_mode/development enum property, with ['independent' default, 'composable'] as values