- Notifications
You must be signed in to change notification settings - Fork928
feat(codersdk): add debug handlers for logs, manifest, and token to agent#12593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
} | ||
defer f.Close() | ||
// Limit to 10MB. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Should we limit this in the head or tail-end? A workspace running for a long time could have more relevant information towards the end. Then again, we seem to rotate at 5 MB so this will essentially always give the tail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yep, this was my thinking. I was thinking about tailing but the fact that we rotate makes this not as important.
Uh oh!
There was an error while loading.Please reload this page.
Part of#12161
Adds the following debug handlers to the agent API:
/debug/manifest
: returns the in-memory agent manifest/debug/token
: returns the in-memory agent session token/debug/logs
: returns up to the last 10MB of the agent log.We can technically get these by connecting to the agent over SSH but this seems to be a better way overall.