rust-ceramic
rust-ceramic copied to clipboard
feat: adjust prom metrics to capture path info and status codes
Added a middleware to capture all http requests status code, path and method in prometheus. In order to avoid blowing up prom with millions of labels, we rewrite a few known routes. This deletes the previous trait middleware metric handling and just relies on this for kubo and api http servers. I left store metrics alone as they provide additional useful visibility.
Example: rate(http_api_requests_total{k8s_pod_name="ceramic-0-0"}[$__rate_interval])
includes capturing 500s when something goes wrong (like someone deleting the db for lulz)