Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Prometheus metrics and a Grafana dashboard for self-hosters

オープン
#31 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
docker, grafana, javascript, node.js, prometheus

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
JavaScript
スター
0
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sennaicodes/codearena のほかの issue

sennaicodes/codearena の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。