mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
feat: mount pprof and metrics to /api/v2/debug for admins (#20353)
Adds the following debug routes for people with the `debug_info:read`
permission:
- `/api/v2/debug/pprof` for `net/http/pprof`
- `/`
- `/cmdline`
- `/profile`
- `/symbol`
- `/trace`
- `/*`
- `/api/v2/debug/metrics` for Prometheus metrics
This commit is contained in:
@@ -160,8 +160,9 @@ func VerifySwaggerDefinitions(t *testing.T, router chi.Router, swaggerComments [
|
||||
t.Run(method+" "+route, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
// This route is for compatibility purposes and is not documented.
|
||||
if route == "/workspaceagents/me/metadata" {
|
||||
// Wildcard routes break the swaggo parser, so we do not document
|
||||
// them.
|
||||
if strings.HasSuffix(route, "/*") {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user