Add experimental view_matching_mode (composable metric views) support
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java
- Lĩnh vực
- backend-api-design, databases
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Java
- Star
- 2.5k
- Fork
- 1k
- Merge trung bình
- 4 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 52
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của open-telemetry/opentelemetry-java
-
PrometheusComponentProvider promotes all resource attributes when resource_constant_labels is empty ({})Có thể đã có người làm @rooks-ns đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
open-telemetry/opentelemetry-java#9014 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
open-telemetry/opentelemetry-java#9011 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Fix `otel.sdk.log.created` counting semanticsCó thể đã có người làm @anuraaga đã nhận 93 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
open-telemetry/opentelemetry-java#8688 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
open-telemetry/opentelemetry-java#9012 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
SimpleLogRecordProcessor/SimpleSpanProcessor.forceFlush() result never completes when an export completes while ofAll() counts the pending setCó thể đã có người làm @nikhilred2619 đã nhận 4 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
open-telemetry/opentelemetry-java#8995 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của open-telemetry/opentelemetry-java
Issue tương tự
-
bug web-ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
jenkinsci/jenkins#27705 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
googleads/googleads-mobile-flutter#1541 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Keyboard crashes Chrome tabsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Julow/Unexpected-Keyboard#1490 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Vakore/ZappierGames#275 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
unitycatalog/unitycatalog#2148 ·
Maintainer thường phản hồi trong vòng 2 ngày