Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Prometheus metrics and a Grafana dashboard for self-hosters

Aperta
#31 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

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

enhancement help wanted

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 /metrics using prom-client. Disabled unless CODEARENA_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 test and node scripts/check-boundary.js pass.
Lingua principale
JavaScript
Stelle
0
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sennaicodes/codearena

Tutte le issue di sennaicodes/codearena

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.