- Notifications
You must be signed in to change notification settings - Fork1.1k
chore: add debug logging and recovery to agent api requests#20785
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
7b05da2 to3b15e9eCompareEmyrk commentedNov 19, 2025
Yea, this is preferred over build tags in the |
ceb48d7 to89b4c8eCompare89b4c8e to687ff60Comparecode-asher commentedNov 20, 2025
I ended up just moving |
c266bb8 intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
I am trying to debugcoder/internal#1010 andcoder/internal#1059 where I get a context timeout on API requests to the agent.
So, I thought maybe it could make sense to log agent API requests to see if it is even getting the requests, along with adding the recovery middleware because maybe it is panicking.
Because rbac cannot be imported in slim, I had to split the logger middleware into slim and non-slim versions.
And similarly, exclude other middleware that will not make sense in a slim context (mostly because they import rbac or database).
Although, I wonder if I should just break out the middleware I need (
recover,loggermw, andtracingright now) into a new package because most ofhttpmwseems to be designed around being used in coderd specifically and will probably never make sense in a slim context. Would a top-levelhttpmwpackage make sense maybe?@Emyrk tagged you just because I saw a comment elsewhere about possibly creating a new package for middleware