prometheus / prometheus/client_python
Histogram without label creates histogram_*.db even without data
オープン
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 4.4k
- フォーク
- 876
- 平均マージ
- 8日 4時間
- マージ済み PR(30日)
- 1
説明
I tried this with versions: 0.19.0 and 0.20.0, both seem to have this bug.
I have a script prom_example.py:
from prometheus_client import Histogram
Example = Histogram("example", "Example", "lol")
When I run it:
prometheus_multiproc_dir=/tmp/metrics python prom_example.py
I see nothing in /tmp/metrics (as expected).
But when I edit the script and remove the label from histogram:
from prometheus_client import Histogram
Example = Histogram("example", "Example")
Database is created is /tmp/metrics, named for example: histogram_37373.db I would expect no database creation, since no data is pushed into the metric.
Edit: it seems the behaviour is the same for Counter and Gauge
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ラベルなしの Histogram を使用し、prom_example.py スクリプトと prometheus_multiproc_dir で問題を再現してから、ラベルありの場合と比較します。Histogram、Counter、Gauge の初期化パスを確認します。完了条件は、メトリクスデータが記録される前に .db ファイルが作成されないことです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- prometheus, python
- 領域
- observability-sre
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100