Wrong json umarshal bug for model value
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
model/value.go の 51 行目付近から始め、query-range レスポンスの値がどのように unmarshalled されるかを調べてください。提供されたクエリ、timestamp、step で報告内容を再現し、その後クライアントの結果を curl の直接レスポンスと比較してください。unmarshalled された timestamp と value のデータが Prometheus のレスポンスと一致すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Go
- スター
- 297
- フォーク
- 380
- 平均マージ
- 3日 15時間
- マージ済み PR(30日)
- 13
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
prometheus/common のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
prometheus/common#1023 ·
メンテナーはふだん 2 日以内に返信
-
expfmt: OpenMetrics 1.0 output with a unit that is not a name suffix fails the whole scrape in Prometheus対応中かも @itsmeasadali が 40 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
prometheus/common#1005 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 52/100
prometheus/common#876 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Feature request: Add client_assertion field for oauth2 jwt-bearer grant type対応中かも @alliasgher が 218 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
prometheus/common#869 ·
メンテナーはふだん 2 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
prometheus/common#858 ·
メンテナーはふだん 2 日以内に返信
prometheus/common の issue をすべて見る
似ている issue
-
[Plugin] calendarオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
MUKE-coder/grit#228 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
Chemaclass/agnostic-ai#3681 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
OSS TEST
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
seaweedfs/seaweed-block#268 ·
メンテナーはふだん 1 日以内に返信