prometheus-metrics-core makes io.prometheus.metrics.tracer.initializer a mandatory OSGi import although the code supports its absence
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #2528 của @kalayciburak — đã merge
Đá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
- 78/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
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu trong phần hướng dẫn maven-bundle-plugin dành cho prometheus-metrics-core và kiểm tra OSGi manifest được tạo để tìm import của io.prometheus.metrics.tracer.initializer. Đặt import thành tùy chọn, sau đó chạy các bài kiểm thử OSGi hoặc micrometer-osgi-test-tests và xác minh rằng bundle được resolve mà không cần prometheus-metrics-tracer-initializer.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
prometheus-metrics-core 1.9.0 ships Import-Package: io.prometheus.metrics.tracer.initializer;version="[1.9,2)" with no resolution:=optional, so an OSGi deployment that leaves out prometheus-metrics-tracer-initializer cannot resolve the bundle.
The code is written for that artifact to be absent. ExemplarSampler.sampleTraceContextLabels() calls SpanContextSupplier through its fully qualified name on purpose, and the comment says why:
// Using the qualified name so that Micrometer can exclude the dependency on
// prometheus-metrics-tracer-initializer
// as they provide their own implementation of SpanContextSupplier.
// If we had an import statement for SpanContextSupplier the dependency would be needed in any case.
The block that follows is guarded with catch (NoClassDefFoundError ignored).
Micrometer does exactly what that comment describes: micrometer-registry-prometheus excludes the artifact from prometheus-metrics-core. On the Maven side it works. In OSGi it does not resolve:
⇒ Bundle: micrometer-osgi-test-tests cannot be resolved
⇒ because Import-Package requirement for: io.micrometer.prometheusmetrics could not be provided
⇒ because Import-Package requirement for: io.prometheus.metrics.core.exemplars; version=[1.9.0,2.0.0)
⇒ because Import-Package requirement for: io.prometheus.metrics.tracer.initializer; version=[1.9.0,2.0.0)
Dropping prometheus-metrics-tracer-initializer onto the runtime makes it resolve and the tests pass, so that import is the only thing missing.
Marking it optional in the maven-bundle-plugin instructions for prometheus-metrics-core would line the manifest up with what the code already allows, the same way _exportcontents was added to prometheus-metrics-exposition-formats for #2395.
- Ngôn ngữ chính
- Java
- Star
- 2.3k
- Fork
- 832
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 73
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 prometheus/client_java
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
prometheus/client_java#2416 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Switch Micrometer compatibility workflow to upstream once typed-descriptor path becomes defaultCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
prometheus/client_java#2182 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
OpenMetrics 2.0: option to keep _total and unit suffixes, so switching from OM1 doesn't rename seriesCó thể đã có người làm @arnabnandy7 đã nhận 1 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 62/100
prometheus/client_java#2518 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
prometheus/client_java#2306 · 10 bình luận · 4 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 32/100
prometheus/client_java#2084 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của prometheus/client_java
Issue tương tự
-
waiting-for-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
spring-cloud/spring-cloud-openfeign#1443 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
ADORSYS-GIS/keycloak-oid4vp-plugin#221 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Upgrade to Spring Pulsar 2.0.8Đang mởstatus: team-only type: dependency-upgrade
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
spring-projects/spring-boot#52099 ·
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 67/100
tchiotludo/akhq#3307 · 1 reaction ·
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 75/100
objectionary/jeo-maven-plugin#1885 ·
Maintainer thường phản hồi trong vòng 4 ngày