Expand description
What a service measures, for Prometheus: its requests by route and
status and how long they take, what the limits refuse, and its
database connections; services add their own (the combat service’s
WebSockets, say). Served at /metrics on METRICS_ADDR, an address of
its own that the proxy never serves; without it nothing is measured.
Functions§
- as_f64
countas a gauge’s value, at mostu32::MAX: far beyond any count here.- endpoint
GET /metrics: what was measured, in Prometheus’ text format.- install
- Measures
servicefrom now on, everything labelled with its name; the handle renders what was measured. Once per process. - refused
- Counts a request a limit refused:
limitis which. - requests
- Counts and times
router’s requests, by the route they matched (its template, such as/characters/{id}, not the ids themselves). - watch_
pool - Measures
pool’s connections whenever the measurements are read. The first pool a service watches is the one measured.