Skip to content

five-on-it / apps/server/src/metrics

apps/server/src/metrics ​

The game server's Prometheus metrics (GET /metrics, prom-client): what a fleet's dashboards and alerts read (TECHNICAL_SPECS §11, the servers' wave).

  • The loop: every step's time (foi_tick_seconds, a histogram over every room), the steps that started a period or more late (catching up) and the times it skipped ahead.
  • The rooms (labelled by room and level, read when scraped): players, how long a round of snapshots takes, the entities a client holds, the AI's step, the bytes sent in snapshots, the snapshots skipped on backed-up connections and the keyframes asked for.
  • The data channel (rtc-host.ts, read when scraped; zero on a server that offers none): the channels open and on their way, those opened, the connections fallen back to the WebSocket by reason, the bytes each way and the worker's stops.
  • The process: its CPU, memory, event loop lag and garbage collection (prom-client's defaults, prefixed foi_).

Interfaces ​

Functions ​