fix(send_with_retry): follow max retries of the strategy#2047
Conversation
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 13a1614 | Docs | Datadog PR Page | Give us feedback! |
Clippy Allow Annotation ReportComparing clippy allow annotations between branches:
Summary by Rule
Annotation Counts by File
Annotation Stats by Crate
About This ReportThis report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality. |
1c1e007 to
b71cfaf
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b71cfaf68a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
81b23f4 to
4da486c
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2047 +/- ##
==========================================
- Coverage 72.90% 72.86% -0.05%
==========================================
Files 460 460
Lines 76396 76394 -2
==========================================
- Hits 55696 55662 -34
- Misses 20700 20732 +32
🚀 New features to boost your workflow:
|
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
0172960
into
main
# Release proposal for libdd-sampling and its dependencies This PR contains version bumps based on public API changes and commits since last release. ## libdd-trace-utils **Next version:** `7.0.0` **Semver bump:** `major` **Tag:** `libdd-trace-utils-v7.0.0` ### Commits - feat(trace-utils)!: add dedup convenience to VecMap (#2049) - fix(trace-utils): match the Go trace agent when parsing `datadog-client-computed-*` bool headers (#2071) - revert!: add from_string to span text (#2011) (#2073) - fix(send_with_retry): follow max retries of the strategy (#2047) ## libdd-sampling (manually bumped due to breaking in #2073) **Next version:** ~~`2.1.1`~~ `3.0.0` **Semver bump:** ~~`patch`~~ `major` **Tag:** ~~`libdd-sampling-v2.1.1`~~ `libdd-sampling-v3.0.0` ### Commits - fix(sampling): format _dd.p.ksr to 6 decimal places, not 6 significant digits (#2086) - revert!: add from_string to span text (#2011) (#2073) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: iunanua <18325288+iunanua@users.noreply.github.com> Co-authored-by: iunanua <igor.unanua@datadoghq.com>
# Release proposal for libdd-data-pipeline and its dependencies This PR contains version bumps based on public API changes and commits since last release. ## libdd-trace-utils **Next version:** `8.0.0` **Semver bump:** `major` **Tag:** `libdd-trace-utils-v8.0.0` ### Commits - refactor(vecmap)!: avoid Clone bound from dedup (#2069) ## libdd-telemetry **Next version:** `5.0.1` **Semver bump:** `patch` **Tag:** `libdd-telemetry-v5.0.1` ### Commits - fix(libdd-telemetry): serialize Method::Other as "*" per OpenAPI spec (#1998) ## libdd-trace-obfuscation **Next version:** `4.0.0` **Semver bump:** `major` **Tag:** `libdd-trace-obfuscation-v4.0.0` ###⚠️ major bump forced due to: - `libdd-trace-utils`: ^5.0.0 → ^7.0.0 ### Commits - ci: bump msrv to 1.87.0 (#2017) ## libdd-trace-stats **Next version:** `5.0.0` **Semver bump:** `major` **Tag:** `libdd-trace-stats-v5.0.0` ###⚠️ major bump forced due to: - `libdd-trace-utils`: ^5.0.0 → ^7.0.0 ### Commits - revert!: add from_string to span text (#2011) (#2073) - fix(send_with_retry): follow max retries of the strategy (#2047) - ci: bump msrv to 1.87.0 (#2017) ## libdd-data-pipeline **Next version:** `6.0.0` **Semver bump:** `major` **Tag:** `libdd-data-pipeline-v6.0.0` ###⚠️ major bump forced due to: - `libdd-trace-utils`: ^5.0.0 → ^7.0.0 ### Commits - feat(data-pipeline)!: add fork safety hooks and cancellation token for trace exporter FFI (#2051) - revert!: add from_string to span text (#2011) (#2073) - feat(data-pipeline): move the async boundary up (#2064) - feat(trace-exporter): add fail-closed fallback to v04 (#2037) - fix(send_with_retry): follow max retries of the strategy (#2047) - refactor(trace-utils): replace use_v05_format bool and remove infallible expect (#1946) - ci: bump msrv to 1.87.0 (#2017) ## libdd-sampling (manually bumped as it wasn't included in the proposal) **Next version:** `4.0.0` **Semver bump:** `major` **Tag:** `libdd-sampling-v4.0.0` ###⚠️ major bump forced due to: - `libdd-trace-utils`: ^7.0.0 → ^8.0.0 --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: iunanua <18325288+iunanua@users.noreply.github.com> Co-authored-by: iunanua <igor.unanua@datadoghq.com>
What does this PR do?
Fix an off-by 1 error in
send_with_retryin the number of retries. Themax_retriesfield of the RetryStrategy was effectively used asmax_attempts.The default strategy has not been modified and will no do up to 5 retries so 6 attempts (previously 5 attempts). However the OTLP code indicates that the intent was to have 5 total attempts so the strategy has ben updated to keep the same total of attempts.
Motivation
There's an off by 1 error in the send_with_retry count of retries.
Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.