observability
Metrics Collector
Counters only go up. Gauges fluctuate. Both expose system health for monitoring.
scrapes0
metrics4
Each click simulates a Prometheus scrape
counter
http_requests_total
0
counter
http_errors_total
0
gauge
active_connections
5
gauge
cpu_usage_percent
42%
// scrape log
No scrapes yet
How It Works
- Counter: monotonically increasing (total requests)
- Gauge: point-in-time value (current connections)
- Prometheus scrapes /metrics endpoint periodically
- Time-series stored for dashboards and alerting
Use Cases
- Prometheus + Grafana dashboards
- SLA monitoring (error rate, latency)
- Auto-scaling triggers
- Alerting on threshold breaches