mirror of
https://github.com/coder/coder.git
synced 2026-06-03 13:08:25 +00:00
c5fc6defb8
I noticed while looking at scale test metrics that we don't always report a useful path in the API request metrics.  There are a lot of requests with path `/*`. I chased this problem to the workspace proxy, where we mount a the proxy router as a child of a "root" router to support some high level endpoints like `latency-check`. Because we query the path from the Chi route context in the prometheus middleware _before_ the request is actually handled, we can have a partially resolved pattern match only corresponding to the root router. The fix is to always re-resolve the path, rather than accept a partially resolved path.