OM 2.0: Should stateset be represented in a Complex/Composite format?

オープン
#310 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か

調査の方向性

ファイルやテストは指定されていません。リンク先の Prometheus ドキュメントの pull request に関する議論から始め、OM 1.0 の stateset の例を、提案されている両方の複合形式と比較してください。カーディナリティ、パース、インターリービング、UX、PromQL、および整数と浮動小数点数の表現に関するメモを確認してください。形式に関する決定が解決され、その根拠が文書化されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

OM 2.0

See https://github.com/prometheus/docs/pull/2679/changes#r2627250204

We are debating if stateset, represented in OM 1.0 as:

# TYPE foo stateset
foo{entity="controller",foo="a"} 1.0
foo{entity="controller",foo="bb"} 0.0
foo{entity="controller",foo="ccc"} 0.0
foo{entity="replica",foo="a"} 1.0
foo{entity="replica",foo="bb"} 0.0
foo{entity="replica",foo="ccc"} 1.0

Should be composite as histograms and summaries in 2.0 e.g.

# TYPE foo stateset
foo{entity="controller"} {states:["a":1, "bb":0, "ccc":0]}
foo{entity="replica"} {states:["a":1, "bb":0, "ccc":1]}

or

# TYPE foo stateset
foo{entity="controller"} {true:["a"], false:["bb", "ccc"]}
foo{entity="replica"} {true:["a", "ccc"], false:["bb"]}
Discussion notes
  • Otel does not have it, but some prev discussions happened to add statesets
  • ENUM is subcase
  • We don't know much about UX and usage to make clear decisions
  • Ensure integer not float for composite
  • for stateset ST not relevant/useful here as those are gauges
Pros & Cons for making it composite
Pros
  • We make it efficiency/reliable to parse (label matching to realize if it's same "sample"). Efficiency of stateset is actually a blocker for using them instead of gauges. There's a potential to reduce cardinality for large number of states.
  • Consistency with summaries and histograms
  • We don't need to have an extra rule around interleaving.
Cons
  • Readability maybe impaired (long lines) - but it's the same as histograms/summaries.
  • What you see what you query is violated unless we plan to implement composite/native stateset eventually (and change PromQL). Even if we plan, we don't know how it will look like, so it's unlikely we will figure out the right format, unless we do UX research on potential PromQL functions like state(metric, stateName) or true_states(metric)`
主要言語
Go
スター
2.5k
フォーク
175
平均マージ
1日 22時間
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

prometheus/OpenMetrics のほかの issue

prometheus/OpenMetrics の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。