prometheus / prometheus/client_python
Provide APIs to help application developers test their Histogram-using code
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 4.4k
- フォーク
- 876
- 平均マージ
- 8日 4時間
- マージ済み PR(30日)
- 1
説明
I have an application that uses Histogram. I want to write some tests that assert that my application is putting values into the right buckets of that histogram.
To read values out of the Histogram it seems that need to either:
- look at the Histogram's private
_bucketsattribute, or - call
Histogram.collectand look at the resultingMetricobjects which are documented as "intended only for internal use" and then look at itsSampleswhich aren't documented at all.
Neither of these seems particularly satisfactory. It would be very helpful if client_python provided some way to read bucket counts and the total sum from a Histogram, using documented APIs clearly marked as intended for external use (perhaps only in test suites).
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、Python クライアントの Histogram 実装を調査します。特に _buckets 属性と collect メソッド、およびそれが返す Metric オブジェクトと Samples オブジェクトを確認してください。バケットのカウントと合計値を読み取るための、文書化された外部 API を定義してテストし、アプリケーションのテストが private オブジェクトや内部専用オブジェクトを使わずに値をアサートできることを示すカバレッジを追加してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- observability
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100