OpenMetrics support for textfile collector
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 42/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
prometheus_client.exposition.write_to_textfile から始め、その動作を prometheus_client.openmetrics.exposition.generate_latest と比較します。既存のテキストファイル collector の動作を維持しながら、helper が OpenMetrics 出力をどのように公開すべきかを判断します。提供された registry に対してサポート対象の helper が有効な OpenMetrics テキストを書き込み、プロジェクトの関連テストでカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Currently prometheus_client.exposition.write_to_textfile doesn't support the OpenMetrics text format, which I'm addressing with this (private) hack:
from prometheus_client.openmetrics.exposition import (
generate_latest as generate_latest_openmetrics,
)
from prometheus_client.registry import CollectorRegistry
def write_openmetrics_to_textfile(path: str, registry: CollectorRegistry) -> None:
"""
Fork of `prometheus_client.exposition.write_to_textfile`, as the project
didn't provide an OpenMetrics variant of this helper function.
"""
with open(path, "wb") as fp:
fp.write(generate_latest_openmetrics(registry))
Would your project be interested in a non-hacky (as is the case above) OpenMetrics support for textfile collector?
- 主要言語
- Python
- スター
- 4.4k
- フォーク
- 876
- 平均マージ
- 8日 4時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
prometheus/client_python のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
prometheus/client_python#1177 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
prometheus/client_python#1210 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
prometheus/client_python#1199 · リアクション 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
prometheus/client_python#1176 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 52/100
prometheus/client_python#1126 · コメント 2 件 ·
prometheus/client_python の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
canonical/paas-charm#368 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
tech debt
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
StevenBlack/hosts#3256 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
qualcomm/qai-appbuilder#275 ·