[x] I have added a description of my changes and why I'd like them included in the section below
Description of Changes
If you used Server::with_service (which we do for our internal release-store service, because we haven't ported it to axum yet) then the path labels in metrics would simply be /*axum_nest, instead of the actual request path.
I spent a bunch of time trying to write tests for this but ran into several issues caused by the metrics crate insisting on there only being a single global recorder. It doesn't seem like you can specify a recorder for just a scope. That means you cannot set one recorder per test and instead have to create one global PrometheusHandle stored in a static Mutex. That felt like a lot of machinery to add just to test this. So I skipped tests 😞
Checklist
Description of Changes
If you used
Server::with_service
(which we do for our internal release-store service, because we haven't ported it to axum yet) then the path labels in metrics would simply be/*axum_nest
, instead of the actual request path.I spent a bunch of time trying to write tests for this but ran into several issues caused by the metrics crate insisting on there only being a single global recorder. It doesn't seem like you can specify a recorder for just a scope. That means you cannot set one recorder per test and instead have to create one global
PrometheusHandle
stored in a staticMutex
. That felt like a lot of machinery to add just to test this. So I skipped tests 😞Related Issues
None.