Prometheus metrics and a Grafana dashboard for self-hosters
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 38/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- docker, grafana, javascript, node.js, prometheus
- Ambito
- backend, observability
Direzione di ricerca
Start by reading the server entry points and battle, matchmaking, Judge0, and HTTP request handling code to locate the events and measurements named in the issue. Check the Docker setup and existing tests, then add the metrics endpoint, label-allowlist and token tests, and dashboard under docs/monitoring/. Done means the dashboard screenshot uses live local data, instrumentation has a before-and-after latency number, and npm test and node scripts/check-boundary.js pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Self-hosters cannot see what their instance is doing: how many battles are live, how long Judge0 takes, how deep the matchmaking queue is, or why players are waiting.
What to do
- Expose Prometheus metrics at
/metricsusingprom-client. Disabled unlessCODEARENA_METRICS=1, and protected by a bearer token (CODEARENA_METRICS_TOKEN) because it reveals traffic. - Metrics worth having:
- Live battles, connected sockets and players in each matchmaking queue.
- Matchmaking wait time as a histogram.
- Judge0 request latency and errors by language and outcome.
- HTTP request latency and status by route pattern, never by raw URL, so ids do not explode label counts.
- Battles finished by type (ranked, unranked, bot) and result (win, tie, forfeit).
- Node process metrics from
prom-client's defaults.
- Ship a Grafana dashboard JSON in
docs/monitoring/with panels for the above. - If #10 has landed, add optional Prometheus and Grafana services to the Docker setup.
Rules
- No user ids, emails or usernames in labels, ever. Add a test that scans every registered metric's labels against an allowlist.
- Instrumentation must not add measurable latency to battle events. Include a before and after number.
Definition of done
- A screenshot of the dashboard with live local data.
- Tests for the endpoint being off by default, the token check and the label allowlist.
npm testandnode scripts/check-boundary.jspass.
- Lingua principale
- JavaScript
- Stelle
- 0
- Fork
- 2
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi 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 sennaicodes/codearena
-
Add issue and pull request templatesForse di nuovo libera @franciscorodr26 l’ha presa 19 giorni fa e non c’è nessuna pull request aperta. Apertadocumentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
sennaicodes/codearena#13 · 1 commento ·
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
sennaicodes/codearena#34 ·
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
sennaicodes/codearena#33 ·
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
sennaicodes/codearena#32 ·
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
sennaicodes/codearena#30 ·
Tutte le issue di sennaicodes/codearena
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 12 giorni
-
[Bug]: Payment providers removed from config are never disabled in payment_providerForse già presa @medusa-os-bot l’ha presa oggi. Apertatype: bug
Difficoltà 2/5 Mezza giornata Idoneità per principianti 82/100
medusajs/medusa#17544 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area:cli good first issue priority:medium type:feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
PicadoLabs/build-with-ai#199 ·
I maintainer di solito rispondono entro 1 giorno
-
Cookies with valid Max-Age are omitted when Expires is in the pastForse già presa @Max-Reisinger l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
sagemathinc/sagebrush#252 ·
I maintainer di solito rispondono entro 1 giorno