debugInfo returns the debugging information for support requests.
(ar *api.Request)
| 303 | |
| 304 | // debugInfo returns the debugging information for support requests. |
| 305 | func debugInfo(ar *api.Request) (data []byte, err error) { |
| 306 | // Create debug information helper. |
| 307 | di := new(debug.Info) |
| 308 | di.Style = ar.Request.URL.Query().Get("style") |
| 309 | |
| 310 | // Add debug information. |
| 311 | |
| 312 | // Very basic information at the start. |
| 313 | di.AddVersionInfo() |
| 314 | di.AddPlatformInfo(ar.Context()) |
| 315 | |
| 316 | // Unexpected logs. |
| 317 | di.AddLastUnexpectedLogs() |
| 318 | |
| 319 | // Status Information from various modules. |
| 320 | status.AddToDebugInfo(di) |
| 321 | captain.AddToDebugInfo(di) |
| 322 | resolver.AddToDebugInfo(di) |
| 323 | config.AddToDebugInfo(di) |
| 324 | |
| 325 | // Detailed information. |
| 326 | AddVersionsToDebugInfo(di) |
| 327 | compat.AddToDebugInfo(di) |
| 328 | module.instance.AddWorkerInfoToDebugInfo(di) |
| 329 | di.AddGoroutineStack() |
| 330 | |
| 331 | // Return data. |
| 332 | return di.Bytes(), nil |
| 333 | } |
| 334 | |
| 335 | // getSavePermission returns the requested api.Permission from p. |
| 336 | // It only allows "user" and "admin" as external processes should |
nothing calls this directly
no test coverage detected