sozu-proxy / sozu

Sōzu HTTP reverse proxy, configurable at runtime, fast and safe, built in Rust. It is awesome!
https://www.sozu.io/
GNU Affero General Public License v3.0
3.12k stars 194 forks source link

Metrics related to Http status code #1146

Open Wonshtrum opened 1 month ago

Wonshtrum commented 1 month ago

We currently have (on Sozu 1.0.5) two "kind" of metrics on http status codes:

The naming is not really explicit, so may we change it? Maybe http.generated.301 and http.total.1xx? Additionally, independently of their origin, some of those metrics are stored:

We can't store all of them with "backend precision", as some errors are generated prior to this knowledge (400 are typically generated before the cluster is known). Should we aggregate the "more precise" status codes on clusters and workers? To have quick access to how many 2xx responses were served for example (currently we have to look into each backend). Should it be done with more metrics directly? or with an option of the metrics get command? If we choose the former should they be named differently? If the latter, should we specify the exact name of the metric to aggregate, a pattern, or does it aggregate all metrics that can be aggregated?