feat(codersdk): add debug handlers for logs, manifest, and token to agent (#12593)

* feat(codersdk): add debug handlers for logs, manifest, and token to agent

* add more logging

* use io.LimitReader instead of seeking
This commit is contained in:
Cian Johnston
2024-03-14 15:36:12 +00:00
committed by GitHub
parent 135381bb4e
commit 63696d762f
4 changed files with 148 additions and 1 deletions
+3
View File
@@ -36,8 +36,11 @@ func (a *agent) apiHandler() http.Handler {
cacheDuration: cacheDuration,
}
r.Get("/api/v0/listening-ports", lp.handler)
r.Get("/debug/logs", a.HandleHTTPDebugLogs)
r.Get("/debug/magicsock", a.HandleHTTPDebugMagicsock)
r.Get("/debug/magicsock/debug-logging/{state}", a.HandleHTTPMagicsockDebugLoggingState)
r.Get("/debug/manifest", a.HandleHTTPDebugManifest)
r.Get("/debug/token", a.HandleHTTPDebugToken)
return r
}