Add GET /admin/metrics as an authenticated SSE stream for the admin console.
Metrics are sourced from Prometheus (OTEL -> Collector -> Prometheus).
Scope
- Authenticated admin-only SSE endpoint (will reuse Phase 1 admin session/auth)
- Periodic snapshots built from PromQL queries against existing OTEL metrics, e.g.:
- Events/sec:
rate(nostream_events_accepted_total) (& rejected if needed)
- Accepted / rejected totals (counter values or rates)
- Active WebSocket connections:
nostream_websocket_connections
- CPU / memory per worker (from
nostream_process_* gauges; aggregate or sum by worker_type / worker_index as needed)
- Include lightweight DB and Redis health in each snapshot
- Cluster-wide view comes from Prometheus aggregation (worker labels on OTEL resource attrs), not primary -> worker IPC
Depends on
Add
GET /admin/metricsas an authenticated SSE stream for the admin console.Metrics are sourced from Prometheus (OTEL -> Collector -> Prometheus).
Scope
rate(nostream_events_accepted_total)(& rejected if needed)nostream_websocket_connectionsnostream_process_*gauges; aggregate or sum byworker_type/worker_indexas needed)Depends on
PROMETHEUS_URL)