@@ -26,6 +26,7 @@ type Bundle struct {
26
26
NetcheckLocal * codersdk.WorkspaceAgentConnectionInfo `json:"netcheck_local"`
27
27
NetcheckRemote * codersdk.WorkspaceAgentConnectionInfo `json:"netcheck_remote"`
28
28
CoordinatorDebug string `json:"coordinator_debug"`
29
+ TailnetDebug string `json:"tailnet_debug"`
29
30
Logs []string `json:"logs"`
30
31
}
31
32
@@ -129,11 +130,25 @@ func Run(ctx context.Context, d *Deps) (*Bundle, error) {
129
130
d .Log .Error (ctx , "fetch coordinator debug page" , slog .Error (err ))
130
131
} else {
131
132
defer coordResp .Body .Close ()
132
- coordBytes , err := io .ReadAll (coordResp .Body )
133
+ bs , err := io .ReadAll (coordResp .Body )
133
134
if err != nil {
134
135
d .Log .Error (ctx , "read coordinator debug page" , slog .Error (err ))
135
136
} else {
136
- b .CoordinatorDebug = string (coordBytes )
137
+ b .CoordinatorDebug = string (bs )
138
+ }
139
+ }
140
+
141
+ // Get /api/v2/debug/tailnet
142
+ tailResp , err := d .Client .Request (ctx , http .MethodGet , "/api/v2/debug/tailnet" , nil )
143
+ if err != nil {
144
+ d .Log .Error (ctx , "fetch tailnet debug page" , slog .Error (err ))
145
+ } else {
146
+ defer tailResp .Body .Close ()
147
+ bs , err := io .ReadAll (tailResp .Body )
148
+ if err != nil {
149
+ d .Log .Error (ctx , "read tailnet debug page" , slog .Error (err ))
150
+ } else {
151
+ b .TailnetDebug = string (bs )
137
152
}
138
153
}
139
154
0 commit comments