Skip to content

Commit 0264388

Browse files
chore(docs): add high level overview of agent api debug docs
1 parent d8814a5 commit 0264388

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

agent/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,7 @@ func (a *agent) HandleHTTPDebugLogs(w http.ResponseWriter, r *http.Request) {
17871787
}
17881788
defer f.Close()
17891789

1790-
// Limit to 10MB.
1790+
// Limit to 10MiB.
17911791
w.WriteHeader(http.StatusOK)
17921792
_, err = io.Copy(w, io.LimitReader(f, 10*1024*1024))
17931793
if err != nil && !errors.Is(err, io.EOF) {

docs/reference/agent-api/debug.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ curl http://127.0.0.1:2113/debug/logs
1010

1111
`GET /debug/logs`
1212

13+
Get the first 10MiB of data from `$CODER_AGENT_LOG_DIR/coder-agent.log`.
14+
1315
### Responses
1416

1517
| Status | Meaning | Description | Schema |
@@ -26,11 +28,8 @@ curl http://127.0.0.1:2113/debug/magicsock
2628

2729
`GET /debug/magicsock`
2830

29-
### Responses
30-
3131
See
32-
[Tailscale's documentation](https://pkg.go.dev/tailscale.com/wgengine/magicsock#Conn.ServeHTTPDebug)
33-
for response format.
32+
[Tailscale's documentation](https://pkg.go.dev/tailscale.com/wgengine/magicsock#Conn.ServeHTTPDebug).
3433

3534
## Toggle debug logging for magicsock
3635

@@ -42,6 +41,10 @@ curl http://127.0.0.1:2113/debug/magicsock/debug-logging/true
4241

4342
`GET /debug/magicsock/debug-logging/{state}`
4443

44+
Set whether debug logging is enabled. See
45+
[Tailscale's documentation](https://pkg.go.dev/tailscale.com/wgengine/magicsock#Conn.SetDebugLoggingEnabled)
46+
for more information.
47+
4548
### Parameters
4649

4750
| Name | In | Type | Required | Description |
@@ -64,6 +67,8 @@ curl http://127.0.0.1:2113/debug/manifest
6467

6568
`GET /debug/manifest`
6669

70+
Get the manifest the agent fetched from `coderd` upon startup.
71+
6772
### Responses
6873

6974
| Status | Meaning | Description | Schema |

0 commit comments

Comments
 (0)