refactor(trace-utils): replace use_v05_format bool and remove infallible expect#1946
Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 5 commits intoMay 26, 2026
Merged
Conversation
Contributor
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. |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 9830a56 | Docs | Datadog PR Page | Give us feedback! |
Contributor
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
|
10683ae to
7dd1440
Compare
7dd1440 to
b18e13c
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1946 +/- ##
==========================================
+ Coverage 72.74% 72.76% +0.02%
==========================================
Files 458 458
Lines 75790 75818 +28
==========================================
+ Hits 55136 55172 +36
+ Misses 20654 20646 -8
🚀 New features to boost your workflow:
|
Aaalibaba42
reviewed
May 20, 2026
yannham
reviewed
May 20, 2026
yannham
reviewed
May 20, 2026
ekump
reviewed
May 20, 2026
yannham
approved these changes
May 26, 2026
yannham
left a comment
Contributor
There was a problem hiding this comment.
Left a couple doc nits but LGMT 👍
Co-authored-by: Yann Hamdaoui <yann.hamdaoui@gmail.com>
This was referenced May 29, 2026
iunanua
added a commit
that referenced
this pull request
May 29, 2026
# Release proposal for libdd-sampling and its dependencies This PR contains version bumps based on public API changes and commits since last release. ## libdd-common **Next version:** `4.2.0` **Semver bump:** `minor` **Tag:** `libdd-common-v4.2.0` ### Commits - refactor(trace-utils): replace use_v05_format bool and remove infallible expect (#1946) - feat(libdd-common): recognize PCF Garden container IDs (#2025) ## libdd-trace-utils (bumped manually due to breaking in #1946) **Next version:** ~~`5.1.0`~~ `6.0.0` **Semver bump:** ~~`minor`~~ `major` **Tag:** ~~`libdd-trace-utils-v5.1.0`~~ `libdd-trace-utils-v6.0.0` ### Commits - feat(trace-utils)!: introduce VecMap datastructure (#2022) - feat: update test agent version (#2038) - refactor(trace-utils): replace use_v05_format bool and remove infallible expect (#1946) The breaking change is the signature of the public function `libdd_trace_utils::trace_utils::collect_trace_chunks`: - Before: `pub fn collect_trace_chunks<T: TraceData>(traces: ..., use_v05_format: bool)` -> ... - After: `pub fn collect_trace_chunks<T: TraceData>(traces: ..., format: TraceEncoding)` -> ... ## libdd-sampling **Next version:** `2.0.0` **Semver bump:** `major` **Tag:** `libdd-sampling-v2.0.0` ### :warning: major bump forced due to: - `libdd-trace-utils`: ^4.0.0 → ^6.0.0 ### Commits - fix(sampling): disable libdd-common default features (#2057) - feat(trace-utils)!: add from_string to span text (#2011) --------- 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>
iunanua
added a commit
that referenced
this pull request
Jun 8, 2026
# 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>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
Replaces the
use_v05_format: bool parameter incollect_trace_chunkswith the existing TraceEncoding enum, and removes#[allow(clippy::expect_used)] + .expect("infallible...")in the v04 msgpack encoder.Motivation
Follow-up to #1896, addressing review comments:
collect_trace_chunksgave no context at the call site — you had to look up the function signature to understand what true/false meant. Using TraceEncoding makes the intent explicit.collect_and_process_tracesmatch had a catch-all arm that computed a bool from the format — replaced with exhaustive V04/V05 arms..expect("infallible...")with a clippy allow to handle an error that can never occur. Replaced withlet _ = ..., consistent with what was already done in the v1 encoder.Additional Notes
How to test the change?
Existing tests.