Skip to content

feat: prometheus metrics endpoint - #12

Merged
mateuseap merged 1 commit into
mainfrom
feat/prometheus-metrics
Jul 23, 2026
Merged

feat: prometheus metrics endpoint#12
mateuseap merged 1 commit into
mainfrom
feat/prometheus-metrics

Conversation

@mateuseap

Copy link
Copy Markdown
Owner

Live usage and engine-load visibility for the Grafana dashboard.

Changes made

  • prom-client registry with hand-picked series only: chesskernel_games_active (sampled every 30s from an indexed count), chesskernel_socket_connections (gateway connect/disconnect), chesskernel_stockfish_running and chesskernel_stockfish_duration_seconds{op} (evaluate/bestmove wrapped)
  • GET /metrics excluded from the api global prefix: reachable in-cluster only, nginx never proxies it publicly

Test plan

  • Server build clean, 8/8 jest tests green
  • After deploy: Prometheus target Up, ChessKernel panels live in Grafana

- /metrics outside the api prefix (cluster-internal, not proxied)
- gauges: active games (30s DB sample), socket.io connections
- stockfish in-flight gauge + duration histogram by operation
@mateuseap mateuseap self-assigned this Jul 23, 2026
@mateuseap
mateuseap merged commit 85c8fe4 into main Jul 23, 2026
@mateuseap
mateuseap deleted the feat/prometheus-metrics branch July 23, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant