-
Notifications
You must be signed in to change notification settings - Fork 49
fix(streams): cut SSE error-log volume and add Redis pool headroom #340
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
Merged
+76
−7
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This only caps oversized structured fields; it does not stop JSON logging from serializing request
extrafields.LoggedAPIRoute.log_requeststill passesbody,headers, andquery_params, andstrip_sensitive_itemsonly removes blacklisted keys. In non-development environments, any non-blacklisted request body under 4096 characters is still emitted into production logs, which can expose request payload data and keeps per-request body logging enabled. Please drop or allowlist these structured request fields before JSON serialization rather than only truncating large values.Rule Used: What: Never log full response bodies, request bodi... (source)
Artifacts
Repro: focused runtime harness exercising log_request and JSON formatting
Repro: execution output showing serialized body headers and query_params in JSON log
Prompt To Fix With AI
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.
Acknowledged — this is a fair principle, but it's pre-existing behavior rather than something this PR introduces, so handling it as a scoped follow-up:
log_requestalready logs the request body today (it interpolates the decoded body into the message string, not justextra), so request-body logging predates this change on every cluster. This PR adds a now-bounded structured copy; it doesn't turn body logging on.strip_sensitive_items: api_key/token/password/secret/cookie/authorization/acting-user), and messages also run value-levelredact_sensitive_text.Fully satisfying the "never log request bodies" rule means dropping/allowlisting body+headers+query_params in
log_request, which changes established request-logging behavior on all clusters (incl. Datadog) — out of scope for a log-volume mitigation. Filed as a follow-up: AGX1-405. Merging this PR (approved + green) and addressing body logging there.