prometheus / prometheus/client_python
Histogram without label creates histogram_*.db even without data
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 4.4k
- Fork
- 876
- Merge trung bình
- 8 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 1
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện vấn đề bằng script prom_example.py và prometheus_multiproc_dir với một Histogram không có label, sau đó so sánh với trường hợp có label. Kiểm tra các đường dẫn khởi tạo của Histogram, Counter và Gauge; được coi là hoàn tất khi không có tệp .db nào được tạo trước khi bất kỳ dữ liệu metric nào được ghi lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- prometheus, python
- Lĩnh vực
- observability-sre
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100