NEXIS
Infrastructure

Observability

Metrics endpoints and baseline checks.

Observability

Metrics Endpoints

  • Data plane: GET /metrics on :9100 (default)
  • Control API: GET /metrics on :3000
  • Data plane admin snapshot: GET /admin/runtime on :9100 (requires x-nexis-internal-token)

What to Track

  • connect/handshake latency
  • join latency
  • room message RTT
  • websocket errors
  • reconnect/resume success rate
  • active rooms, members, and room state drift from expected plugin state

Runtime Admin Snapshot

Use the data-plane admin endpoint for live room/session introspection:

curl "http://localhost:9100/admin/runtime?include_state=1" \
  -H "x-nexis-internal-token: <internal-token>"

Query options:

  • include_state=1 includes full room state payloads
  • room_id=<room-id> filters snapshot to a specific room

Baseline Testing

Use included k6 scenario:

k6 run infra/load/k6-ws.js

Run it regularly after protocol or room-logic changes.

Typed Metrics Snapshot

const : [] = [
  { : 'nexis_handshake_total', : 42 },
  { : 'nexis_ws_errors_total', : 0 },
];

On this page