New Container: Prometheus
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 45/100
Direzione di ricerca
Non sono indicati file di implementazione né test. Inizia esaminando le implementazioni dei container esistenti di testcontainers-python e la documentazione di Prometheus e l’immagine Docker collegate; il lavoro è completo quando un PrometheusContainer può esporre la UI/API, configurare target di scrape o un prometheus.yml personalizzato e supportare gli aspetti di readiness e ricaricamento della configurazione descritti nell’issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 2.3k
- Fork
- 386
- Merge medio
- 4h 40m
- PR unite (30g)
- 1
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di testcontainers/testcontainers-python
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
testcontainers/testcontainers-python#1115 · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Updating the documentation Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
testcontainers/testcontainers-python#1086 · 1 commento ·
-
Bug: [minio] _healthcheck calls for nested wait_container_is_ready resulting in long wait time Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
testcontainers/testcontainers-python#578 · 5 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
Tutte le issue di testcontainers/testcontainers-python
Issue simili
-
货币战争手改优先级配置缺少列表元素类型校验(P3) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Apertaarea: ci bug perceived difficulty: 3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ClickHouse/clickhouse-connect#1057 ·