Skip to content

feat(native-spans)!: change buffer foundation#2046

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 16 commits into
mainfrom
yannham/change-buffer-foundation
Jun 10, 2026
Merged

feat(native-spans)!: change buffer foundation#2046
gh-worker-dd-mergequeue-cf854d[bot] merged 16 commits into
mainfrom
yannham/change-buffer-foundation

Conversation

@yannham

@yannham yannham commented May 27, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Add foundation types for dd-trace-js change buffer: buffer, opcodes and trace. Follow up of #2043.

Motivation

See #2022. Required for the integration of native spans into dd-trace-js.

Additional Notes

This PR just introduces the types and doesn't use them yet, hence the allow(unused).

How to test the change?

Unit tests provided.

@yannham yannham changed the title Yannham/change buffer foundation feat(native-spans)!: change buffer foundation May 27, 2026
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented May 27, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 67.58%
Overall Coverage: 73.36% (-0.20%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: fa24219 | Docs | Datadog PR Page | Give us feedback!

@github-actions

github-actions Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/yannham/change-buffer-foundation

Summary by Rule

Rule Base Branch PR Branch Change

Annotation Counts by File

File Base Branch PR Branch Change

Annotation Stats by Crate

Crate Base Branch PR Branch Change
clippy-annotation-reporter 5 5 No change (0%)
datadog-ffe-ffi 1 1 No change (0%)
datadog-ipc 21 21 No change (0%)
datadog-live-debugger 4 4 No change (0%)
datadog-live-debugger-ffi 10 10 No change (0%)
datadog-profiling-replayer 4 4 No change (0%)
datadog-sidecar 46 46 No change (0%)
libdd-common 13 13 No change (0%)
libdd-common-ffi 12 12 No change (0%)
libdd-data-pipeline 5 5 No change (0%)
libdd-ddsketch 2 2 No change (0%)
libdd-dogstatsd-client 1 1 No change (0%)
libdd-profiling 13 13 No change (0%)
libdd-remote-config 4 4 No change (0%)
libdd-telemetry 20 20 No change (0%)
libdd-tinybytes 4 4 No change (0%)
libdd-trace-normalization 2 2 No change (0%)
libdd-trace-obfuscation 3 3 No change (0%)
libdd-trace-stats 1 1 No change (0%)
libdd-trace-utils 11 11 No change (0%)
Total 182 182 No change (0%)

About This Report

This 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.

@codecov-commenter

codecov-commenter commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.36905% with 113 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.00%. Comparing base (e93e908) to head (0444fb8).

Additional details and impacted files
@@                           Coverage Diff                           @@
##           yannham/span-vec-fields-integration    #2046      +/-   ##
=======================================================================
+ Coverage                                72.91%   73.00%   +0.09%     
=======================================================================
  Files                                      460      465       +5     
  Lines                                    76558    76894     +336     
=======================================================================
+ Hits                                     55824    56139     +315     
- Misses                                   20734    20755      +21     
Components Coverage Δ
libdd-crashtracker 65.39% <ø> (+0.18%) ⬆️
libdd-crashtracker-ffi 38.78% <ø> (+1.95%) ⬆️
libdd-alloc 98.77% <ø> (ø)
libdd-data-pipeline 85.52% <ø> (-0.09%) ⬇️
libdd-data-pipeline-ffi 75.28% <ø> (-0.41%) ⬇️
libdd-common 79.89% <ø> (ø)
libdd-common-ffi 74.41% <ø> (ø)
libdd-telemetry 73.34% <ø> (ø)
libdd-telemetry-ffi 31.36% <ø> (ø)
libdd-dogstatsd-client 82.64% <ø> (ø)
datadog-ipc 76.22% <ø> (ø)
libdd-profiling 81.68% <ø> (-0.02%) ⬇️
libdd-profiling-ffi 64.79% <ø> (ø)
libdd-sampling 97.46% <ø> (ø)
datadog-sidecar 30.22% <ø> (+1.24%) ⬆️
datdog-sidecar-ffi 15.32% <ø> (+6.08%) ⬆️
spawn-worker 48.86% <ø> (ø)
libdd-tinybytes 93.80% <ø> (ø)
libdd-trace-normalization 81.71% <ø> (ø)
libdd-trace-obfuscation 87.30% <ø> (ø)
libdd-trace-protobuf 68.25% <ø> (ø)
libdd-trace-utils 88.15% <66.36%> (-0.88%) ⬇️
libdd-tracer-flare 86.88% <ø> (ø)
libdd-log 74.83% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dd-octo-sts

dd-octo-sts Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 83.68 MB 83.68 MB -0% (-5.25 KB) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.70 MB 7.70 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.34 MB 10.34 MB +0% (+96 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 94.78 MB 94.79 MB +0% (+3.03 KB) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 24.83 MB 24.82 MB --.06% (-16.00 KB) 💪
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 86.89 KB 86.89 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 180.83 MB 180.80 MB --.01% (-32.00 KB) 💪
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 925.68 MB 925.69 MB +0% (+15.65 KB) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 8.09 MB 8.09 MB +0% (+512 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 86.89 KB 86.89 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 23.93 MB 23.93 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 47.78 MB 47.78 MB +0% (+1.09 KB) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 21.52 MB 21.52 MB -0% (-512 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 88.26 KB 88.26 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 184.90 MB 184.91 MB +0% (+16.00 KB) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 918.35 MB 918.57 MB +.02% (+221.99 KB) 🔍
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 6.24 MB 6.24 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 88.26 KB 88.26 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 25.66 MB 25.66 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 45.41 MB 45.41 MB -0% (-946 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 74.60 MB 74.60 MB +0% (+2.64 KB) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.58 MB 8.58 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 90.02 MB 90.02 MB -0% (-1.77 KB) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.44 MB 10.44 MB --.04% (-4.36 KB) 💪

@yannham yannham force-pushed the yannham/change-buffer-foundation branch from 8962592 to 66fb3e6 Compare May 27, 2026 12:13
@yannham yannham force-pushed the yannham/span-vec-fields-integration branch 5 times, most recently from 3dc15ea to 57b3ec4 Compare May 28, 2026 13:30
@yannham yannham force-pushed the yannham/change-buffer-foundation branch from 66fb3e6 to 8431f28 Compare May 28, 2026 17:27
@yannham yannham marked this pull request as ready for review May 28, 2026 17:28
@yannham yannham requested review from a team as code owners May 28, 2026 17:28

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8431f288d1

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

//!
//! The change buffer is currently designed and used for dd-trace-js, but the idea could be extended
//! to other runtime where the FFI cost is high.
#[allow(unused)]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Make the unused allow cover the module

With the change-buffer feature enabled, this outer attribute only applies to the following ChangeBufferError enum, so the rest of the new module still emits unused-import and dead-code warnings. I checked RUSTFLAGS='-D warnings' cargo check -p libdd-trace-utils --features change-buffer, and it fails on the unused imports/helpers and BufferedOperation; the required all-features clippy invocation also promotes these warnings to errors. Make this an inner module attribute (or remove the unused items) so the feature can pass CI.

Useful? React with 👍 / 👎.

Comment thread libdd-trace-utils/src/change_buffer/buffer.rs Outdated
Comment thread libdd-trace-utils/build.rs Outdated
Comment thread libdd-trace-utils/Cargo.toml
Comment thread libdd-trace-utils/src/change_buffer/buffer.rs Outdated
Comment thread libdd-trace-utils/src/change_buffer/buffer.rs Outdated
Comment thread libdd-trace-utils/src/change_buffer/span_header.rs
Comment thread libdd-trace-utils/src/change_buffer/mod.rs Outdated
@yannham yannham force-pushed the yannham/span-vec-fields-integration branch from 7439489 to 54592a2 Compare June 5, 2026 13:04
@yannham yannham requested review from a team as code owners June 5, 2026 13:04
@yannham yannham force-pushed the yannham/span-vec-fields-integration branch from 54592a2 to cc56cd2 Compare June 5, 2026 15:52
@yannham yannham force-pushed the yannham/span-vec-fields-integration branch from 70b40a4 to a2b962e Compare June 9, 2026 15:36
Base automatically changed from yannham/span-vec-fields-integration to main June 9, 2026 17:05
@yannham yannham force-pushed the yannham/change-buffer-foundation branch from 42a7a66 to 24c7734 Compare June 10, 2026 13:45
@yannham

yannham commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Jun 10, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-06-10 13:49:00 UTC ℹ️ Start processing command /merge


2026-06-10 13:49:08 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-06-10 14:35:09 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in main is approximately 48m (p90).


2026-06-10 15:20:14 UTC ℹ️ MergeQueue: This merge request was merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants