prometheus / prometheus/client_python
Feature request - public `registry._names_to_collectors` access
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 4.4k
- フォーク
- 876
- 平均マージ
- 8日 4時間
- マージ済み PR(30日)
- 1
説明
Now we are working on Prometheus support in FastStream and faced with a problem. Shared registry between different middlewares leads to MetricsContainer duplication. So, we would like to have a public API to chech registry for already registered objects.
Can you please provide public access to this property some way?
https://github.com/prometheus/client_python/blob/master/prometheus_client/registry.py#L31
I think, the easiest way to save old API and provide us with a new one - add a public property like in the following snipper
class CollectorRegistry(Collector):
def __init__(self):
self._names_to_collectors: Dict[str, Collector] = {}
@property
def names_to_collectors(self):
return self._names_to_collectors
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
issue でリンクされているとおり、prometheus_client/registry.py の CollectorRegistry とその _names_to_collectors プロパティから始めてください。registry がどのように使用されているかを確認し、公開アクセスによる互換性への影響を特定してください。既存の内部属性を削除せずに、登録されたオブジェクトを調査するためのサポートされた公開手段を提供できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- prometheus, python
- 領域
- observability-sre
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100