Add experimental view_matching_mode (composable metric views) support
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- java
調査の方向性
Start with ViewRegistry.findViews(...) in sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/internal/view/ViewRegistry.java, then read the specification sections linked in the issue for stream grouping and merging rules. Inspect ViewBuilder and View for configured-property tracking, and SdkMeterProviderUtil for the experimental setter pattern; wire MeterProviderModelAccessor.getViewMatchingMode(model) from MeterProviderFactory.create(...). Done means composable matching, precedence, attribute filtering, and advisory fallback follow the specification while independent remains the default.
索引モデルが issue の本文から書いたものです。
説明
Description
The OpenTelemetry Metrics SDK specification defines an experimental (Development) view_matching_mode configuration parameter (independent vs. composable) on MeterProvider to compose multiple matching Views (for example, combining a broad policy View that filters attributes or disables instruments with an instrument-specific View that customizes aggregation) into merged metric streams rather than emitting duplicate/conflicting streams (specification/metrics/sdk.md#L519-L543, introduced in https://github.com/open-telemetry/opentelemetry-specification/pull/5173).
Currently in opentelemetry-java:
ViewRegistry.findViews(...)only implementsindependentmatching, evaluating each matchingViewas a separate stream: https://github.com/open-telemetry/opentelemetry-java/blob/f02bddc4091f56d68b60b4c433afcec64c8d97b9/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/internal/view/ViewRegistry.java#L99-L155opentelemetry-sdk-extension-declarative-config(:sdk-extensions:declarative-config) includes theview_matching_mode/developmentmodel accessor (MeterProviderModelAccessor.getViewMatchingMode), butMeterProviderFactory.create(...)does not yet wire it toSdkMeterProviderBuilder:- https://github.com/open-telemetry/opentelemetry-java/blob/f02bddc4091f56d68b60b4c433afcec64c8d97b9/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/model/internal/MeterProviderModelAccessor.java#L52-L58
- https://github.com/open-telemetry/opentelemetry-java/blob/f02bddc4091f56d68b60b4c433afcec64c8d97b9/sdk-extensions/declarative-config/src/main/java/io/opentelemetry/sdk/autoconfigure/declarativeconfig/MeterProviderFactory.java#L40-L107
Proposal
Implement experimental support for view_matching_mode (independent default, composable opt-in) in opentelemetry-sdk-metrics and wire it in opentelemetry-sdk-extension-declarative-config:
- Expose an experimental
view_matching_modesetter onSdkMeterProviderBuilderviaSdkMeterProviderUtil(following the pattern in https://github.com/open-telemetry/opentelemetry-java/blob/f02bddc4091f56d68b60b4c433afcec64c8d97b9/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/internal/SdkMeterProviderUtil.java#L70-L84). - Implement
composableView grouping and stream merging inopentelemetry-sdk-metrics(ViewBuilder/ViewandViewRegistry) per the specification:- Form a stream group for each distinct configured
Viewnamecontaining matchingViews with thatnameplus all matchingViews withname == null(or a single default-named group if no matchingViewsetsname). - Track explicitly configured
ViewBuilderproperties (distinguishing unset properties fromViewBuilder's default field values inViewBuilder.java#L26-L30) to apply atomic last-wins precedence across non-attribute_keysstream settings, falling back per-aspect to the preceding validViewin the group (or default) with a warning on semantic errors rather than discarding the entireRegisteredView. - Compose specified
attribute_keyspredicates via logical AND, and override instrument advisory parameters only for aspects configured by matchingViews in the group (falling back to instrument advisory parameters otherwise).
- Form a stream group for each distinct configured
- Wire
MeterProviderModelAccessor.getViewMatchingMode(model)inMeterProviderFactory.create(...).
Additional Context
- Specification PR: https://github.com/open-telemetry/opentelemetry-specification/pull/5173 (open clarification PR: https://github.com/open-telemetry/opentelemetry-specification/pull/5414)
- Specification stabilization tracking issue: https://github.com/open-telemetry/opentelemetry-specification/issues/5385
- Declarative configuration schema PR: https://github.com/open-telemetry/opentelemetry-configuration/pull/666
- Reference Go prototype: https://github.com/open-telemetry/opentelemetry-go/pull/8510
- Related Java PR (
OptIninstrument advice andViewenabledconfiguration): https://github.com/open-telemetry/opentelemetry-java/pull/8979
- 主要言語
- Java
- スター
- 2.5k
- フォーク
- 1k
- 平均マージ
- 4日 3時間
- マージ済み PR(30日)
- 52
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
open-telemetry/opentelemetry-java のほかの issue
-
PrometheusComponentProvider promotes all resource attributes when resource_constant_labels is empty ({})対応中かも @rooks-ns が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
open-telemetry/opentelemetry-java#9014 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
open-telemetry/opentelemetry-java#9011 ·
メンテナーはふだん 2 日以内に返信
-
Fix `otel.sdk.log.created` counting semantics対応中かも @anuraaga が 93 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
open-telemetry/opentelemetry-java#8688 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
open-telemetry/opentelemetry-java#9012 ·
メンテナーはふだん 2 日以内に返信
-
SimpleLogRecordProcessor/SimpleSpanProcessor.forceFlush() result never completes when an export completes while ofAll() counts the pending set対応中かも @nikhilred2619 が 4 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
open-telemetry/opentelemetry-java#8995 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
open-telemetry/opentelemetry-java の issue をすべて見る
似ている issue
-
bug web-ui
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
jenkinsci/jenkins#27705 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
googleads/googleads-mobile-flutter#1541 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
Julow/Unexpected-Keyboard#1490 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
Vakore/ZappierGames#275 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
unitycatalog/unitycatalog#2148 ·
メンテナーはふだん 2 日以内に返信