PrometheusComponentProvider promotes all resource attributes when resource_constant_labels is empty ({})
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java, prometheus
- Lĩnh vực
- backend, observability
Hướng nghiên cứu
Bắt đầu trong exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus/internal/PrometheusComponentProvider.java, đặc biệt là phần phân tích resource_constant_labels quanh các dòng 63–76, và lần theo cách một cấu hình trống đi đến IncludeExcludePredicate.createPatternMatching. Trước tiên, kiểm tra các bài kiểm thử predicate liên quan và các bài kiểm thử của Prometheus exporter. Công việc hoàn tất khi một map trống không thêm thuộc tính resource làm nhãn metric và có kiểm thử hồi quy cho cấu hình đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
In PrometheusComponentProvider.java, configuring an empty resource_constant_labels: {} map in declarative configuration promotes all resource attributes onto every Prometheus metric series instead of none.
resource_constant_labels: {} is currently valid against the opentelemetry-configuration JSON Schema ($defs.IncludeExclude sets minItems: 1 on included and excluded, not minProperties: 1 on the object). When parsed:
meter_provider:
readers:
- pull:
exporter:
prometheus/development:
resource_constant_labels: {}
config.getStructured("resource_constant_labels") returns a non-null DeclarativeConfigProperties where both included and excluded are null, and passes (null, null) to IncludeExcludePredicate.createPatternMatching(null, null), which returns an include-all predicate (attributeKey -> true).
Expected behavior
Per the Prometheus exporter specification (By default, it MUST NOT add any resource attributes as metric labels) and ExperimentalPrometheusMetricExporter.resource_constant_labels (defaultBehavior: no resource attributes are added), when both included and excluded are null (matching Collector's pkg/resourcetotelemetry IsEmpty() check), no resource attributes should be added as metric labels (or empty {} should be rejected if disallowed by opentelemetry-configuration).
- 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
-
Độ 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ó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
open-telemetry/opentelemetry-java#9013 ·
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