feat(native-spans)!: change buffer foundation#2046
Conversation
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: fa24219 | 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. |
Codecov Report❌ Patch coverage is 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
🚀 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
|
8962592 to
66fb3e6
Compare
3dc15ea to
57b3ec4
Compare
66fb3e6 to
8431f28
Compare
There was a problem hiding this comment.
💡 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)] |
There was a problem hiding this comment.
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 👍 / 👎.
7439489 to
54592a2
Compare
54592a2 to
cc56cd2
Compare
70b40a4 to
a2b962e
Compare
Add the supporting types for the change-buffer module behind a `change-buffer` feature flag: ChangeBuffer (raw memory wrapper), OpCode/BufferedOperation, SpanHeader (repr(C)), SmallTraceMap, Trace, and error types. These are the building blocks for ChangeBufferState which follows in the next commit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Edmund Kump <edmund.kump@datadoghq.com>
42a7a66 to
24c7734
Compare
|
/merge |
|
View all feedbacks in Devflow UI.
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.
The expected merge time in
|
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.