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

Đang mở
#310 4 bình luận 1 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Lĩnh vực
backend-api-design

Hướng nghiên cứu

Không có tệp hoặc bài kiểm thử nào được nêu; hãy bắt đầu với cuộc thảo luận về pull request tài liệu Prometheus được liên kết và so sánh các ví dụ stateset của OM 1.0 với cả hai dạng composite được đề xuất. Xem lại các ghi chú về cardinality, parsing, interleaving, UX, PromQL và biểu diễn số nguyên so với số thực dấu phẩy động; công việc được xem là hoàn tất khi đã giải quyết quyết định về định dạng và ghi lại phần lý do.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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)`
Ngôn ngữ chính
Go
Star
2.5k
Fork
175
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của prometheus/OpenMetrics

Tất cả issue của prometheus/OpenMetrics

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.