prometheus / prometheus/client_python

Provide APIs to help application developers test their Histogram-using code

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

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

主要言語
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 _buckets attribute, or
  • call Histogram.collectand look at the resulting Metric objects which are documented as "intended only for internal use" and then look at its Samples which 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).

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

まず、Python クライアントの Histogram 実装を調査します。特に _buckets 属性と collect メソッド、およびそれが返す Metric オブジェクトと Samples オブジェクトを確認してください。バケットのカウントと合計値を読み取るための、文書化された外部 API を定義してテストし、アプリケーションのテストが private オブジェクトや内部専用オブジェクトを使わずに値をアサートできることを示すカバレッジを追加してください。

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

評価

技術スタック
python
領域
observability
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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