rust-ceramic icon indicating copy to clipboard operation
rust-ceramic copied to clipboard

feat: adjust prom metrics to capture path info and status codes

Open dav1do opened this issue 9 months ago • 0 comments

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)

image

dav1do avatar May 21 '24 22:05 dav1do