Wrong json umarshal bug for model value
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu tại model/value.go, khoảng dòng 51, và kiểm tra cách các giá trị trong response query-range được unmarshalled. Tái hiện báo cáo bằng query, timestamp và step được cung cấp, sau đó so sánh kết quả của client với response trực tiếp từ curl. Hoàn thành khi dữ liệu timestamp và value đã được unmarshalled khớp với response của Prometheus.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I found a strange bug, the response data unmarshalled by prom client-go is wrong by chance.
I use the queryRange API provided by prometheus client go as followings
and i print the time series data returned by the queryRange api, it has unexpected data value. it is very large and unexpected.

the value logged function is below, i use json marshal directly to marshal the returned data by api, i am sure that this is the data returned by prometheus client-go api queryRange function:
and then i use curl curl -G --data-urlencode 'query=irate(container_cpu_usage_seconds_total{container!="POD",namespace="ns-prjchlvc-1544041-production",pod=~"^monitor-server-siliconvalley-150001.*$",container="second-monitor-server"}[3m])' --data-urlencode 'start=1658205420.000' --data-urlencode 'end=1658865360.000' --data-urlencode 'step=60' http://127.0.0.1:9090/api/v1/query_range to query the prometheus directly, it returned normal data as expected. you can see the following data timestamp and value, it is what we want. but the above image is use the client-go api, with the same param, it has unexpected value at the same timestamp.

So i think the json unmarshal has some bug the prometheus client go impelmented
- 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ự
-
[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 ·
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
Chemaclass/agnostic-ai#3681 · 1 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 70/100
-
OSS TEST
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
seaweedfs/seaweed-block#268 ·
Maintainer thường phản hồi trong vòng 1 ngày