Skip to content

fix(saluki-io): report HTTP/2 retry errors - #2572

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
m/http-error-telem
Sep 9, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
m/http-error-telem

Conversation

@webern

@webern webern commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

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:

Request failed: http2 error. Retrying after 1s. error_count=4 request_uri=https://example.com/api/v1/series

A remote GOAWAY now produces:

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:

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:

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

  • 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

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.
@webern
webern requested a review from a team as a code owner September 9, 2026 14:02
@dd-octo-sts dd-octo-sts Bot added the area/io General I/O and networking. label Sep 9, 2026

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: PASS

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.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 389401d · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@pr-commenter

pr-commenter Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Binary Size Analysis (Agent Data Plane)

Baseline: 1eaf546 · Comparison: 1713ab7 · diff
Analysis Configuration: stripped binaries · Pass/Fail Threshold: +5%
Sizes: 39.31 MiB (baseline) vs 39.34 MiB (comparison)
Size Change: +25.41 KiB (+0.06%)

✅ Binary size difference within threshold

Changes by Module
Module File Size Symbols
anon.6ea03a47f0fd2bab8e6361dbfa58842c.0.llvm.4130789982535965397 +16.91 KiB 1
anon.496c07a01609e3b9f6c71b378f031bcd.0.llvm.998220799909278879 -16.90 KiB 1
anon.6ea03a47f0fd2bab8e6361dbfa58842c.483.llvm.4130789982535965397 +12.01 KiB 1
anon.496c07a01609e3b9f6c71b378f031bcd.483.llvm.998220799909278879 -12.00 KiB 1
anon.6ea03a47f0fd2bab8e6361dbfa58842c.101.llvm.4130789982535965397 +9.99 KiB 1
anon.496c07a01609e3b9f6c71b378f031bcd.101.llvm.998220799909278879 -9.90 KiB 1
anon.6ea03a47f0fd2bab8e6361dbfa58842c.4.llvm.4130789982535965397 +9.42 KiB 1
anon.496c07a01609e3b9f6c71b378f031bcd.4.llvm.998220799909278879 -9.32 KiB 1
anon.2f6e434b2ca2beb7bbda60457f0e41d7.13.llvm.2964114037520922902 -8.66 KiB 1
anon.e2781b9226cae3715e5b69ed0229f72c.13.llvm.9401793905610249070 +8.49 KiB 1
tokio_util +7.58 KiB 50
h2 -7.08 KiB 489
anon.177fa80ec7639942eb46cf4d308968ee.73.llvm.7294570049593095522 +7.04 KiB 1
anon.96507b76acc3f021941314f4a294bca9.73.llvm.5978121613126325554 -6.94 KiB 1
anon.177fa80ec7639942eb46cf4d308968ee.577.llvm.7294570049593095522 +6.54 KiB 1
anon.96507b76acc3f021941314f4a294bca9.577.llvm.5978121613126325554 -6.54 KiB 1
prost +4.84 KiB 466
saluki_io::net::server +4.44 KiB 120
anon.6ea03a47f0fd2bab8e6361dbfa58842c.203.llvm.4130789982535965397 +4.29 KiB 1
anon.496c07a01609e3b9f6c71b378f031bcd.203.llvm.998220799909278879 -4.29 KiB 1
Detailed Symbol Changes
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [NEW] +61.0Ki  [NEW] +60.8Ki    saluki_components::common::datadog::io::run_endpoint_io_loop::_{{closure}}::h3d40f7ba2ddb4657
  [NEW] +42.9Ki  [NEW] +42.7Ki    _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::hd7743aa9fe7a65d7
  [NEW] +39.1Ki  [NEW] +39.0Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::hb315b346cf731719
  [NEW] +37.9Ki  [NEW] +37.8Ki    agent_data_plane::cli::run::create_topology::_{{closure}}::h3c12b3b2d15fce04
  [NEW] +31.3Ki  [NEW] +31.1Ki    agent_data_plane::cli::dogstatsd::run_dogstatsd_command::_{{closure}}::hfc9330b18ba1d070
  [NEW] +30.6Ki  [NEW] +30.4Ki    _<saluki_components::transforms::aggregate::Aggregate as saluki_core::components::transforms::Transform>::run::_{{closure}}::hf8615634f4a598e9
  [NEW] +28.5Ki  [NEW] +28.4Ki    agent_data_plane::dogstatsd_contexts::artifact::for_each_record::h6a8e32c6d5e6dd2d
  [NEW] +27.6Ki  [NEW] +27.4Ki    datadog_agent_commons::ipc::client::RemoteAgentClient::connect::_{{closure}}::_{{closure}}::_{{closure}}::hba0d61c2b894edcc
  [NEW] +27.1Ki  [NEW] +26.9Ki    core::ptr::drop_in_place<agent_data_plane::cli::run::handle_run_command::{{closure}}>::h2e91e98acc8da82e
  [NEW] +26.4Ki  [NEW] +26.3Ki    saluki_components::destinations::dogstatsd_client_telemetry::DogStatsDClientTelemetry::record_metric::hb37b1a3a06be3af0
  +0.2% +25.9Ki  +0.1% +16.5Ki    [39794 Others]
  [DEL] -26.4Ki  [DEL] -26.2Ki    saluki_components::destinations::dogstatsd_client_telemetry::DogStatsDClientTelemetry::record_metric::h9800750e771bce20
  [DEL] -27.1Ki  [DEL] -26.9Ki    core::ptr::drop_in_place<agent_data_plane::cli::run::handle_run_command::{{closure}}>::h904b6e772bf766c8
  [DEL] -27.5Ki  [DEL] -27.3Ki    datadog_agent_commons::ipc::client::RemoteAgentClient::connect::_{{closure}}::_{{closure}}::_{{closure}}::hbae7a6a5b7601622
  [DEL] -28.5Ki  [DEL] -28.4Ki    agent_data_plane::dogstatsd_contexts::artifact::for_each_record::h0588566375a62d1d
  [DEL] -31.2Ki  [DEL] -31.0Ki    _<saluki_components::transforms::aggregate::Aggregate as saluki_core::components::transforms::Transform>::run::_{{closure}}::h6cfac0b28db1b32b
  [DEL] -31.3Ki  [DEL] -31.1Ki    agent_data_plane::cli::dogstatsd::run_dogstatsd_command::_{{closure}}::h99f0031354aa9e46
  [DEL] -37.9Ki  [DEL] -37.8Ki    agent_data_plane::cli::run::create_topology::_{{closure}}::he5e84186b941532c
  [DEL] -39.1Ki  [DEL] -39.0Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::h20ba3597eeead1bf
  [DEL] -43.0Ki  [DEL] -42.8Ki    _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::h11486289a8e7fde1
  [DEL] -61.1Ki  [DEL] -60.9Ki    saluki_components::common::datadog::io::run_endpoint_io_loop::_{{closure}}::hd39fdf3070681c3d
  +0.1% +25.4Ki  +0.0% +16.0Ki    TOTAL

@tobz tobz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one non-blocking nit.

Comment on lines +32 to +34
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),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should dot separate these for a little more structure: http2.error_kind instead of http2_error_kind, etc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, makes sense: 1713ab7

Dot separate the HTTP/2 tracing fields for a little more structure.
@pr-commenter

pr-commenter Bot commented Sep 9, 2026

Copy link
Copy Markdown

Regression Detector (Agent Data Plane)

Run ID: 84c27754-704a-4a04-9201-2ae1d543c04b
Baseline: 1eaf5466 · Comparison: 1713ab79 · diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment (5)

Experiments configured erratic: true are tagged (ignored) and skipped when determining which experiments regressed or improved. Experiments which are detected as erratic at runtime are tagged (erratic) to flag that the run's sample dispersion was high, but their regression / improvement signal still counts.

experiment goal Δ mean % links
quality_gates_rss_dsd_heavy memory ⚪ +0.16 metrics profiles logs
quality_gates_rss_idle memory ⚪ +0.04 metrics profiles logs
quality_gates_rss_dsd_low memory ⚪ -0.02 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ -0.16 metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory ⚪ -0.24 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 232 MiB ≤ 250 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 51.5 MiB ≤ 60 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 92.2 MiB ≤ 100 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 395 MiB ≤ 420 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 33.5 MiB ≤ 40 MiB metrics profiles logs
Explanation

A 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 (is_regression: true). Improvements use the matching criteria for the improving direction. Experiments configured erratic: true (tagged (ignored)) are skipped outright; experiments detected as erratic at runtime (tagged (erratic)) still count, since that flag describes sample dispersion rather than directional certainty. The Δ mean % cell is colored accordingly: 🟢 = improvement, 🔴 = regression, ⚪ = neutral. Reduction in CPU or memory is an improvement; reduction in ingress throughput is a regression. Experiments tagged (no analysis) show ⚠️ n/a: SMP ran them but produced no analysis, usually because a replicate failed and exhausted its retries. Check the SMP report for that experiment's replicate failures.

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 18270ca into main Sep 9, 2026
114 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the m/http-error-telem branch September 9, 2026 15:27
dd-octo-sts Bot pushed a commit that referenced this pull request Sep 9, 2026
## 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
gh-worker-dd-mergequeue-cf854d Bot pushed a commit that referenced this pull request Sep 9, 2026
…#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]>
dd-octo-sts Bot pushed a commit that referenced this pull request Sep 9, 2026
…#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
jszwedko pushed a commit that referenced this pull request Sep 9, 2026
…#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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/io General I/O and networking. mergequeue-status: done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Report structured HTTP/2 details in retry errors

2 participants