prometheus / prometheus/client_python

[Question] Is "REGISTRY" meant to be a decorator for "Collectors"?

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

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

主要言語
Python
スター
4.4k
フォーク
876
平均マージ
8日 4時間
マージ済み PR(30日)
1

説明

Browsing through the code I've found a function called write_to_textfile in the exposition module. This function signature looks like this:

def write_to_textfile(path, registry):
    """Write metrics to the given path.
    pass

If you read the implementation of the function, turns out the expectation is not really a registry but instead anything that implements (something like an interface) the .collect() method.

Is that by design?

If so, would it be welcomed the addition of type hints throughout the code? I would be happy to add them and create a PR.

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

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

はじめの一歩

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

調査の方向性

exposition モジュールの write_to_textfile から始め、registry パラメーターを issue で説明されている .collect() の動作と比較してください。変更を加える前に、Python コードベース全体で型ヒントが必要かどうかを判断してください。実施するには、合意されたスコープとメンテナーの判断が必要です。

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

評価

技術スタック
python
領域
observability-sre
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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