Skip to content

fix: reduce gzip noise in proxy DebugResponse#172

Merged
meyer9 merged 1 commit intomainfrom
fix/proxy-debug-gzip-noise
Mar 28, 2026
Merged

fix: reduce gzip noise in proxy DebugResponse#172
meyer9 merged 1 commit intomainfrom
fix/proxy-debug-gzip-noise

Conversation

@meyer9
Copy link
Copy Markdown
Collaborator

@meyer9 meyer9 commented Mar 27, 2026

Summary

DebugResponse unconditionally tried gzip decompression on every proxied response, logging at Error level when it failed. Most upstream nodes respond with plain JSON (not gzip-compressed), causing hundreds of spurious error lines per second:

Error creating gzip reader  err="gzip: invalid header"

This made benchmark output nearly unreadable.

Fix

When gzip.NewReader fails (response isn't gzip'd), fall back to logging the raw body at Debug level instead of Error. Same for close/read errors — downgraded from Error to Debug.

Testing

Tested locally end-to-end with the load-test benchmark — gzip noise is completely eliminated from output.

DebugResponse unconditionally tried gzip decompression on every
proxied response, logging at Error level when it failed. Most
responses are plain JSON (not gzip-compressed), causing hundreds
of spurious error lines per second.

Fall back to logging the raw body at Debug level when the response
is not gzip-encoded.
@cb-heimdall
Copy link
Copy Markdown
Collaborator

cb-heimdall commented Mar 27, 2026

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@meyer9 meyer9 merged commit 54b3839 into main Mar 28, 2026
14 checks passed
@meyer9 meyer9 deleted the fix/proxy-debug-gzip-noise branch March 28, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants