Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
code-asher merged 2 commits intomainfromasher/agent-api-logs
Nov 25, 2025

Conversation

@code-asher
Copy link
Member

@code-ashercode-asher commentedNov 14, 2025
edited
Loading

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, andtracing right now) into a new package because most ofhttpmw seems to be designed around being used in coderd specifically and will probably never make sense in a slim context. Would a top-levelhttpmw package make sense maybe?

@Emyrk tagged you just because I saw a comment elsewhere about possibly creating a new package for middleware

@code-ashercode-asher changed the titlechore: add debug logging to agent api requestschore: add debug logging and recovery to agent api requestsNov 14, 2025
@code-ashercode-asherforce-pushed theasher/agent-api-logs branch 5 times, most recently from7b05da2 to3b15e9eCompareNovember 18, 2025 23:20
@Emyrk
Copy link
Member

Although, I wonder if I should just break out the middleware I need (recover, loggermw, and tracing right now) into a new package because most of httpmw seems to be designed around being used in coderd specifically and will probably never make sense in a slim context. Would a top-level httpmw package make sense maybe?

Yea, this is preferred over build tags in thehttpmw package as a whole imo. That is very easy for someone to mess up when they add a new mw.

code-asher reacted with thumbs up emoji

@code-ashercode-asherforce-pushed theasher/agent-api-logs branch 3 times, most recently fromceb48d7 to89b4c8eCompareNovember 20, 2025 00:25
@code-asher
Copy link
MemberAuthor

I ended up just movingrecover because moving the others made a bigger diff than I expected, I can def move them if we want but I went with the minimal impact for now.

@code-ashercode-asher merged commitc266bb8 intomainNov 25, 2025
30 checks passed
@code-ashercode-asher deleted the asher/agent-api-logs branchNovember 25, 2025 23:59
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsNov 25, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@EmyrkEmyrkEmyrk approved these changes

Assignees

@code-ashercode-asher

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@code-asher@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp