-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debug logs: binary data in logs when using compression on metrics endpoint #4442
Labels
Comments
The same is true when using |
Hi @srenatus, is it okey printing like the image below istead of the current unreadable output ? |
Yeah that would be much preferable. 👍 |
Great!!, Can I take the issue please? |
christian1607
added a commit
to christian1607/opa
that referenced
this issue
Mar 26, 2022
This change omits the response body when using compression on metrics endpoint and when pprof is enabled Fixes: open-policy-agent#4442 Signed-off-by: Christian Altamirano <[email protected]>
@christian1607 thanks again! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Short description
With debug logging enabled, compressed requests cause binary data to be logged, messing up the terminal, and being generally of little use.
Steps To Reproduce
opa run -s --log-level debug --log-format text
curl --compressed http://localhost:8181/metrics
With log format text, we'll get a bunch of binary soup.
When using log format JSON, we'll get something like this
Expected behavior
Something useful is logged. Either print that the payload was compressed and omit it; or decompress it and output the response.
A cheap way out would be to ignore metrics requests' payloads in the request logging. It's of uncertain value.
The text was updated successfully, but these errors were encountered: