New Container: Prometheus
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Không có tệp triển khai hoặc bài kiểm thử nào được nêu tên. Hãy bắt đầu bằng cách xem xét các triển khai container hiện có của testcontainers-python cùng với tài liệu Prometheus và Docker image được liên kết; công việc được xem là hoàn tất khi một PrometheusContainer có thể cung cấp UI/API, cấu hình các scrape target hoặc một prometheus.yml tùy chỉnh, và hỗ trợ các vấn đề về readiness và tải lại cấu hình được mô tả trong issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Feature Request: PrometheusContainer
What is the new container you'd like to have?
I'd like to propose a PrometheusContainer for integration testing with Prometheus.
Relevant resources:
- Docker image: https://hub.docker.com/r/prom/prometheus
- Prometheus docs: https://prometheus.io/docs/introduction/overview/
Besides exposing the Prometheus UI/API, it could provide convenience methods to configure scrape targets and rules directly, without requiring users to write and mount a complete prometheus.yml, for example:
prometheus = (
PrometheusContainer()
.with_scrape_target("app", app_container, port=8080, metrics_path="/metrics")
.with_scrape_target("redis", redis_exporter)
)
The container could generate the corresponding prometheus.yml internally while still allowing users to provide a custom configuration file if needed.
Why not just use a generic container for this?
While DockerContainer("prom/prometheus") works, most tests usually need additional setup:
- Configuring scrape targets.
- Providing a Prometheus configuration.
- Waiting until Prometheus is ready to accept requests.
- Reload Prometheus on config change.
- etc.
Other references
A similar idea has already been discussed in the testcontainers-java
- Ngôn ngữ chính
- Python
- Star
- 2.3k
- Fork
- 386
- Merge trung bình
- 4 giờ 40 phút
- Pull request đã merge (30 ngày)
- 1
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.
Issue khác của testcontainers/testcontainers-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
testcontainers/testcontainers-python#1115 · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Updating the documentation Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
testcontainers/testcontainers-python#1086 · 1 bình luận ·
-
Bug: [minio] _healthcheck calls for nested wait_container_is_ready resulting in long wait time Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
testcontainers/testcontainers-python#578 · 5 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
Tất cả issue của testcontainers/testcontainers-python
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
canonical/paas-charm#368 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
tech debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
addition to tracking list Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
StevenBlack/hosts#3256 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
qualcomm/qai-appbuilder#275 ·