Expose the query metrics on a Prometheus endpoint
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- prometheus, rust
- Ambito
- authentication, backend, documentation, observability
Direzione di ricerca
Start with beacon-db/beacon-core/src/metrics.rs and trace where the server consolidates each query's metrics; then locate the existing /api/query/metrics/{query_id} route and configuration handling. Check how routes are protected and how configuration and performance pages are organized. Done means /metrics exposes the listed low-cardinality metrics in Prometheus text format, uses super-user credentials, honors BEACON_METRICS_ENABLED (default true), and both pages document it.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Beacon measures every query. MetricsTracker counts the rows, the bytes and the time in
beacon-db/beacon-core/src/metrics.rs.
GET /api/query/metrics/{query_id} returns the result of one query. No endpoint reports the totals
of the server. An operator cannot scrape Beacon with Prometheus. The operator gets no alert on a
slow query.
Proposal
Add GET /metrics in the Prometheus text format. Update each counter at the point where the server
consolidates the metrics of a query.
| Name | Type | Labels |
|---|---|---|
beacon_queries_total |
counter | status |
beacon_query_duration_seconds |
histogram | none |
beacon_query_input_bytes_total |
counter | none |
beacon_query_result_rows_total |
counter | none |
beacon_active_queries |
gauge | none |
beacon_file_stats_files |
gauge | state |
beacon_build_info |
gauge | version |
Rules
- Keep the cardinality low. Add no query id label, no file path label and no username label.
- Protect the route with the super-user credentials. A total tells a caller what the data holds.
- Add
BEACON_METRICS_ENABLED. The default istrue. - Document the endpoint on the configuration page and the performance page.
- Lingua principale
- Rust
- Stelle
- 16
- Fork
- 4
- Merge medio
- 19h 58m
- PR unite (30g)
- 39
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Nessuna 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 maris-development/beacon
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
maris-development/beacon#704 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
maris-development/beacon#681 ·
I maintainer di solito rispondono entro 1 giorno
-
bug effort-S python
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
maris-development/beacon#494 ·
I maintainer di solito rispondono entro 1 giorno
-
bug effort-S tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
maris-development/beacon#493 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
maris-development/beacon#687 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di maris-development/beacon
Issue simili
-
autofix:working
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
libracoder/kiri#1138 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
roc-lang/basic-webserver#277 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
samkerrcode/opengent#113 ·
I maintainer di solito rispondono entro 1 giorno
-
app bug session
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno