refactor(otel-thread-ctx): doc and style fixes for ThreadContextRecord#2019
Conversation
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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2019 +/- ##
==========================================
- Coverage 72.90% 72.86% -0.05%
==========================================
Files 457 457
Lines 75769 75768 -1
==========================================
- Hits 55240 55207 -33
- Misses 20529 20561 +32
🚀 New features to boost your workflow:
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: bd39020 | Docs | Datadog PR Page | Give us feedback! |
74944b0 to
219bb7d
Compare
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
|
4c6affb to
cc8f8fd
Compare
- Add SAFETY comment for the unsafe dereference in `update()` - Fix `set_attrs` doc comment: "record.attrs_data" -> "self.attrs_data" - Use `u8::try_from` for val_len capping, making the u8 invariant statically guaranteed instead of relying on a comment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
219bb7d to
bd39020
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
|
321ffb6
into
main
What does this PR do?
Follow-up to #2018. Minor doc and style improvements in
libdd-otel-thread-ctx.unsafedereference inThreadContext::update()set_attrsdoc comment referencingrecord.attrs_datainstead ofself.attrs_datau8::try_from(val_len).unwrap_or_else(...)for value length capping inset_attrs, making theu8invariant statically guaranteed instead of relying on a manualif+ a commentMotivation
The
unsafeblock inupdate()lacked a safety justification. Thetry_frompattern eliminates theas u8cast and the stale comment that referenced amin()that didn't exist.Additional Notes
N/A
How to test the change?
All 8 existing tests pass unchanged.