Fleet Observability

A firewalled, autoscaling game fleet that watches itself — metrics, logs and traces pushed into a Grafana / Loki / Prometheus / Tempo stack. Part of the Box of Cards work.

TS · Grafana · Loki · Prometheus · Tempo · Grafana Alloy · OpenTelemetry · prom-client · pino · Alertmanager · Caddy · restic · Docker · NestJS · NodeJs

Push, Not Pull

push-based-telemetry

The game servers autoscale and sit behind a firewall, so a central Prometheus can't scrape them. Instead each node runs one agent that pushes its metrics, logs and traces out through a single gateway to a monitoring box running Grafana, Loki, Prometheus and Tempo.

The Whole Fleet on One Screen

fleet-resources

One dashboard shows the whole fleet at a glance — memory, CPU, node count and the autoscaler — showing the servers scale up and down in real time. Monitoring only just went live, so there isn't much data to go by yet.

Latency and the Database

latency-and-database

The API's own HTTP request latency, shown next to MongoDB's size and connection-pool health, to catch the API slowing down or the database growing before it becomes a problem.

Pacing and Round Durations

pacing-durations

How long rounds, phases and whole games actually take (p50/p95/p99), to tell whether a rules change actually made the game faster or slower.

Runtime and API Detail

runtime-api-detail

Per-endpoint request rates and errors alongside Node.js internals — event-loop lag, heap and garbage collection — so a slow route or a memory leak shows up here first.

Logins and Live Connections

logins-connections

Logins, JWT renewals and live socket connections across the fleet — a quick read on how many people are actually connected right now.

Who's Playing

gameplay-activity

Live games and players over time, and the split between humans and AI, showing real activity and how much of it the AI players carry.

Deck and Option Analytics

deck-option-analytics

Which decks get played and which game options people pick — the product signal for what to build next. It's too high-cardinality for Prometheus, so it rides on Loki game-summary events.

Rounds by Game Option

rounds-by-option

Rounds broken down by game option — a closer look at how people actually configure and play their games.

Alerts and Restorable Backups

alerts-and-backups

About twenty alerts fire by email the moment something drifts — a node down, high memory, a 5xx spike, or a certificate within two weeks of expiring — plus a dead-man's switch that fires if the alerting itself goes quiet. Backups run daily and are tested to confirm they actually restore.