freecoding.school100% FREE · NO SIGNUP
Gateway RidgeISSUE #20 of 35

metrics · histograms · counters · gauges

Gateway GusVSTimeout Titan
Gateway Gus saysMetrics come as counters, gauges, and histograms — each measuring differently.

Counters only go up (total requests, errors) — you rate them to get req/sec. Gauges go up and down (memory in use, active connections). Histograms bucket observations (request latency) so you can compute percentiles (p50, p95, p99) — far more useful than averages, which hide tail latency. Pick the right type for what you're measuring.

Power-ups you unlock

Timeout Titan attacks — common mistakes

Boss battleChoose counter/gauge/histogram for: total errors, active users, request latency.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>total errors   → counter
active users   → gauge
request latency→ histogram (p50/p95/p99)</pre></body></html>
▶ Open the interactive comic issue
‹ Tracing · Opentelemetry · SpansLogging · Structured Json · Levels ›