Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

New Container: Prometheus

Đang mở
#1,075 6 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
docker, prometheus, python
Lĩnh vực
devops, testing

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ả

🚀 enhancement

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:

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

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của testcontainers/testcontainers-python

Tất cả issue của testcontainers/testcontainers-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.