Prometheus metrics and a Grafana dashboard for self-hosters
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- docker, grafana, javascript, node.js, prometheus
- 領域
- backend, observability
調査の方向性
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 の本文から書いたものです。
説明
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.
- 主要言語
- JavaScript
- スター
- 0
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sennaicodes/codearena のほかの issue
-
Add issue and pull request templates再び着手できるかも @franciscorodr26 が 19 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンdocumentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
sennaicodes/codearena#13 · コメント 1 件 ·
-
enhancement help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
sennaicodes/codearena#34 ·
-
enhancement help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
sennaicodes/codearena#33 ·
-
enhancement help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
sennaicodes/codearena#32 ·
-
enhancement help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
sennaicodes/codearena#30 ·
sennaicodes/codearena の issue をすべて見る
似ている issue
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
TanbirRamim/open-source-radar#353 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 2 日以内に返信
-
design-review mac P3 ui
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tosunlab/hisarapp-core#502 ·
-
enhancement status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mastra-ai/mastra#28651 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement frontend help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
nikhilb2/simple_invoicing#470 ·
メンテナーはふだん 1 日以内に返信