Repository navigation
feat: add Prometheus metrics to ws-server - #248
Merged
TheCodeHeist-Coder merged 2 commits intoNov 23, 2026
Merged
TheCodeHeist-Coder merged 2 commits into
TheCodeHeist-Coder merged 2 commits into
Conversation
TheCodeHeist-Coder
self-requested a review
November 23, 2026 07:28
TheCodeHeist-Coder
approved these changes
Nov 23, 2026
Owner
|
@spikedeeev Looks good, i'll merge it when i'll do deployment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a private Prometheus
/metricsendpoint tows-serverfor live-quiz observability.Exposes aggregate gauges and counters for:
The metrics listener runs on a separate port and is not published publicly in production. Metrics contain no session or participant labels.
Adds focused metrics tests and documents the endpoint in
ARCHITECTURE.md.Related issue
No issue: this addresses the missing operational visibility described by the live-quiz observability requirement.
Type of change
Which services does this touch?
apps/frontendapps/http-serverapps/ws-serverapps/genAIpackages/db(schema or Prisma changes)How did you test this?
pnpm --filter ws-server test: 61 tests passed.pnpm --filter ws-server run check-types: passed.pnpm --filter ws-server run build: passed.ws-serverlistens on port 9090.GET http://127.0.0.1:9090/metricsreturns HTTP 200 and Prometheus text format.rexial_ws_connections_openchanged from 0 to 1, then returned to 0 after disconnect.Checklist
pnpm run lintpnpm run check-typespnpm run builddocker-compose up.envfile, API key or other secret