Repository navigation
fix(saluki-io): report HTTP/2 retry errors - #2572
Conversation
Walk retry error source chains and report structured HTTP/2 details for GOAWAY, stream reset, and protocol failures. Add tracing fields for the error kind, reason code, and remote origin.
There was a problem hiding this comment.
More details
The bounded source-chain walk keeps the existing TLS and client error messages. It adds structured fields for HTTP/2 GOAWAY, reset, reason code, and remote origin.
🤖 Datadog Autotest · Commit 389401d · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
Binary Size Analysis (Agent Data Plane)Baseline: 1eaf546 · Comparison: 1713ab7 · diff ✅ Binary size difference within thresholdChanges by Module
Detailed Symbol Changes |
| http2_error_kind = http2_details.map(|details| details.kind.as_str()), | ||
| http2_reason_code = http2_details.and_then(|details| details.reason).map(u32::from), | ||
| http2_received_from_remote = http2_details.map(|details| details.received_from_remote), |
There was a problem hiding this comment.
We should dot separate these for a little more structure: http2.error_kind instead of http2_error_kind, etc.
Dot separate the HTTP/2 tracing fields for a little more structure.
Regression Detector (Agent Data Plane)Run ID: Optimization Goals: ✅ No significant changes detectedFine details of change detection per experiment (5)Experiments configured
Bounds Checks: ✅ Passed (5)
ExplanationA change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression ( |
## Human Summary TODO ## AI Summary Walk HTTP retry error source chains and report structured HTTP/2 details for GOAWAY, stream reset, and other protocol failures. Add optional tracing fields for the error kind, reason code, and remote origin while preserving URI sanitization and existing HTTP, TLS, and client error messages. Fixes #2568. ## Log output Ignoring timestamp and target metadata, a retry warning previously reduced an HTTP/2 failure to: ```text Request failed: http2 error. Retrying after 1s. error_count=4 request_uri=https://example.com/api/v1/series ``` A remote GOAWAY now produces: ```text Request failed due to an HTTP/2 GOAWAY received from the remote peer (reason: detected excessive load generating behavior, code 11). Retrying after 1s. error_count=4 request_uri=https://example.com/api/v1/series http2.error_kind="go_away" http2.reason_code=11 http2.received_from_remote=true ``` A remote stream reset now produces: ```text Request failed due to an HTTP/2 stream reset received from the remote peer (reason: refused stream before processing any application logic, code 7). Retrying after 1s. error_count=4 request_uri=https://example.com/api/v1/series http2.error_kind="reset" http2.reason_code=7 http2.received_from_remote=true ``` The exact field placement depends on the tracing formatter. The request URI remains sanitized. `CategorizedError`'s `Display` implementation is covered with these exact outputs: ```text Request failed due to an HTTP/2 GOAWAY received from the remote peer (reason: detected excessive load generating behavior, code 11) Request failed due to an HTTP/2 stream reset received from the remote peer (reason: refused stream before processing any application logic, code 7) Request failed due to an HTTP/2 error (reason: unexpected internal error encountered, code 2) Request failed due to an HTTP/2 error (reason: unknown reason, code 9001) ``` ## Change Type - [x] Bug fix ## How did you test this PR? - `make fmt` - `make check-docs` - `cargo check --workspace` - `cargo check --workspace --tests` - Focused `cargo nextest` tests for the retry lifecycle - `make check-all` - `make check-release-notes` - `.venv/bin/reno lint` `make test-all` was started but stopped at operator request. ## References - Closes: #2568 Co-authored-by: matt.briggs <[email protected]> 18270ca
…#2573) <!-- dd-meta {"pullId":"ed245921-f5c2-4751-b9d1-5eb9d95e524b","source":"chat","resourceId":"429d2498-2012-4d3b-8f35-b2da00020d05","workflowId":"23c4de37-41d1-4534-8dbb-5c448aec7b20","codeChangeId":"23c4de37-41d1-4534-8dbb-5c448aec7b20","sourceType":"slack"} --> ## Summary Bump `h2` to 0.4.19 to pick up the fix for hyperium/h2#939: h2 `0.4.16` added a small-DATA-frame protection that spuriously terminates legitimate HTTP/2 client connections with a `too_many_data_frames` `ENHANCE_YOUR_CALM` GOAWAY error. When testing ADP 1.6.0 in staging, we observed an elevated rate of HTTP retries, specifically for HTTP/2. We debugged the issue and landed on `h2` as being the proximate cause. We further wittled down the search by checking our logs for instances of the "too many small DATA frames" debug log that was added in the aforementioned `h2` PR, which then completely confirmed the aforementioned PR as being the root cause. ## Change Type - [x] Bug fix - [ ] New feature - [ ] Non-functional (chore, refactoring, docs) - [ ] Performance ## How did you test this PR? Existing tests. ## References - Upstream issue: hyperium/h2#939 - Related error-logging enrichment: #2572 Co-authored-by: datadog-prod-us1-5[bot] <266081015+datadog-prod-us1-5[bot]@users.noreply.github.com> Co-authored-by: toby.lawrence <[email protected]>
…#2573) <!-- dd-meta {"pullId":"ed245921-f5c2-4751-b9d1-5eb9d95e524b","source":"chat","resourceId":"429d2498-2012-4d3b-8f35-b2da00020d05","workflowId":"23c4de37-41d1-4534-8dbb-5c448aec7b20","codeChangeId":"23c4de37-41d1-4534-8dbb-5c448aec7b20","sourceType":"slack"} --> ## Summary Bump `h2` to 0.4.19 to pick up the fix for hyperium/h2#939: h2 `0.4.16` added a small-DATA-frame protection that spuriously terminates legitimate HTTP/2 client connections with a `too_many_data_frames` `ENHANCE_YOUR_CALM` GOAWAY error. When testing ADP 1.6.0 in staging, we observed an elevated rate of HTTP retries, specifically for HTTP/2. We debugged the issue and landed on `h2` as being the proximate cause. We further wittled down the search by checking our logs for instances of the "too many small DATA frames" debug log that was added in the aforementioned `h2` PR, which then completely confirmed the aforementioned PR as being the root cause. ## Change Type - [x] Bug fix - [ ] New feature - [ ] Non-functional (chore, refactoring, docs) - [ ] Performance ## How did you test this PR? Existing tests. ## References - Upstream issue: hyperium/h2#939 - Related error-logging enrichment: #2572 Co-authored-by: datadog-prod-us1-5[bot] <266081015+datadog-prod-us1-5[bot]@users.noreply.github.com> Co-authored-by: toby.lawrence <[email protected]> 6680c5c
…#2573) <!-- dd-meta {"pullId":"ed245921-f5c2-4751-b9d1-5eb9d95e524b","source":"chat","resourceId":"429d2498-2012-4d3b-8f35-b2da00020d05","workflowId":"23c4de37-41d1-4534-8dbb-5c448aec7b20","codeChangeId":"23c4de37-41d1-4534-8dbb-5c448aec7b20","sourceType":"slack"} --> ## Summary Bump `h2` to 0.4.19 to pick up the fix for hyperium/h2#939: h2 `0.4.16` added a small-DATA-frame protection that spuriously terminates legitimate HTTP/2 client connections with a `too_many_data_frames` `ENHANCE_YOUR_CALM` GOAWAY error. When testing ADP 1.6.0 in staging, we observed an elevated rate of HTTP retries, specifically for HTTP/2. We debugged the issue and landed on `h2` as being the proximate cause. We further wittled down the search by checking our logs for instances of the "too many small DATA frames" debug log that was added in the aforementioned `h2` PR, which then completely confirmed the aforementioned PR as being the root cause. ## Change Type - [x] Bug fix - [ ] New feature - [ ] Non-functional (chore, refactoring, docs) - [ ] Performance ## How did you test this PR? Existing tests. ## References - Upstream issue: hyperium/h2#939 - Related error-logging enrichment: #2572 Co-authored-by: datadog-prod-us1-5[bot] <266081015+datadog-prod-us1-5[bot]@users.noreply.github.com> Co-authored-by: toby.lawrence <[email protected]>
Human Summary
TODO
AI Summary
Walk HTTP retry error source chains and report structured HTTP/2 details for GOAWAY, stream reset, and other protocol failures. Add optional tracing fields for the error kind, reason code, and remote origin while preserving URI sanitization and existing HTTP, TLS, and client error messages.
Fixes #2568.
Log output
Ignoring timestamp and target metadata, a retry warning previously reduced an HTTP/2 failure to:
A remote GOAWAY now produces:
A remote stream reset now produces:
The exact field placement depends on the tracing formatter. The request URI remains sanitized.
CategorizedError'sDisplayimplementation is covered with these exact outputs:Change Type
How did you test this PR?
make fmtmake check-docscargo check --workspacecargo check --workspace --testscargo nextesttests for the retry lifecyclemake check-allmake check-release-notes.venv/bin/reno lintmake test-allwas started but stopped at operator request.References