expfmt: Implement OpenMetrics generation
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
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách đọc package expfmt và metrics.proto, sau đó xem lại các TODOs còn lại trong issue này để xác định những tính năng OpenMetrics và quyết định về khả năng tương thích nào vẫn nằm trong phạm vi. Kiểm tra hỗ trợ tạo OpenMetrics hiện có và các bài kiểm thử của nó, nếu có. Được xem là hoàn thành khi tập hợp tính năng đã thống nhất được triển khai, các đầu vào không được hỗ trợ được xử lý và legacy negotiation vẫn có thể sử dụng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
To support OpenMetrics in v1 of prometheus/client_golang, we need to add OpenMetrics generation to the expfmt package, effectively a proto-to-OpenMetrics converter.
For this to work, we need to add the needed additional fields to metrics.proto. This should be backwards compatible for still existing protobuf consumers, while it provides an "inofficial" protobuf representation for OpenMetrics as a byproduct. This has the potential of creating confusion. However, the prometheus/client_model repo is anyway mostly deprecated, so we might as well abuse it for this "hack".
Update: Basic support is done. Here are the remaining TODOs (some of them will require more or less breaking changes, so we might consider bundling them and perhaps even starting to use major version numbers for this repo):
- Feature support:
-
# UNIT. -
_created. -
infotype. -
statesettype. -
gaugehistogramtype.
-
- Figure out how to deal with the
_totalsuffix. (Currently, we require it to be in the metric name and truncate it forTYPE/HELP, which is arguably the opposite of what would be expected but which simplifies the transition from current Prom text format usage.) - Reject exemplars that are too long.
- Reject counters with
NaN - More sophisticated timestamp rendering for both samples and exemplars (to not run into precision and overflow issues with float64 and
time.UnixNano). - Get rid of
NegotiateIncludingOpenMetrics(but we have to make sure there remains some way of letting users opt out of OpenMetrics to support legacy setups – which could be on the Prometheus server side by making theAcceptheader configurable). - Add the
Closemethod directly to theEncoderinterface.
- Ngôn ngữ chính
- Go
- Star
- 297
- Fork
- 380
- Merge trung bình
- 3 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 13
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/common
-
🧭 PR Triage DashboardĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
prometheus/common#1023 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
expfmt: OpenMetrics 1.0 output with a unit that is not a name suffix fails the whole scrape in PrometheusCó thể đã có người làm @itsmeasadali đã nhận 40 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
prometheus/common#1005 ·
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 52/100
prometheus/common#876 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Feature request: Add client_assertion field for oauth2 jwt-bearer grant typeCó thể đã có người làm @alliasgher đã nhận 218 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
prometheus/common#869 ·
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 30/100
prometheus/common#858 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của prometheus/common
Issue tương tự
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
orion-belt-dev/orion-belt#181 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
kubesmarts/logic-operator#105 ·
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 78/100
jakartaee/jakartablogs.ee#125 ·
-
story
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
patch-it-dev/patch-it-plugins#120 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Plugin] calendarĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
MUKE-coder/grit#228 ·