feat!: add encoder from v04 to v1#1896
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. |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: e6ef917 | Docs | Datadog PR Page | Give us feedback! |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1896 +/- ##
==========================================
+ Coverage 72.68% 72.81% +0.12%
==========================================
Files 452 456 +4
Lines 74930 75744 +814
==========================================
+ Hits 54463 55151 +688
- Misses 20467 20593 +126
🚀 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
|
Aaalibaba42
left a comment
There was a problem hiding this comment.
I'm not learnt in the data-flow etc, I mostly just commented on the code, which do have a few smells but nothing blocking I'd say
|
I've gotten @anais-raison 's approval for me doing this |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
# 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:** `5.0.0` **Semver bump:** `major` **Tag:** `libdd-trace-utils-v5.0.0` ### Commits - feat(trace-utils)!: add from_string to span text (#2011) - feat!: add encoder from v04 to v1 (#1896) ## libdd-trace-obfuscation **Next version:** `3.1.0` **Semver bump:** `minor` **Tag:** `libdd-trace-obfuscation-v3.1.0` ### Commits - fix(libdd-trace-obfuscation): cargo clippy fix with all lints (#1947) ## libdd-trace-stats (bumped manually) **Next version:** ~~`3.1.0`~~`4.0.0` **Semver bump:** ~~`minor`~~`major` **Tag:** ~~`libdd-trace-stats-v3.1.0`~~`libdd-trace-stats-v4.0.0` ### Commits - feat(trace-utils)!: add from_string to span text (#2011) - feat!: add encoder from v04 to v1 (#1896) ## libdd-data-pipeline **Next version:** `5.0.0` **Semver bump:** `major` **Tag:** `libdd-data-pipeline-v5.0.0` ### Commits - feat(trace-utils)!: add from_string to span text (#2011) - feat!: add encoder from v04 to v1 (#1896) - fix(data-pipeline): allow old PascalCase fields in obfuscation config scheme (#2008) - feat(trace_buffer)!: flush based on size of chunks in bytes (#1953) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: iunanua <[email protected]> Co-authored-by: iunanua <[email protected]>
…ble expect (#1946) # What does this PR do? Replaces the `use_v05_format`: bool parameter in `collect_trace_chunks` with the existing TraceEncoding enum, and removes `#[allow(clippy::expect_used)] + .expect("infallible...")` in the v04 msgpack encoder. # Motivation Follow-up to [#1896](#1896), addressing review comments: - Passing a bare bool to `collect_trace_chunks` gave 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. - The `collect_and_process_traces` match had a catch-all arm that computed a bool from the format — replaced with exhaustive V04/V05 arms. - The v04 encoder used `.expect("infallible...")` with a clippy allow to handle an error that can never occur. Replaced with `let _ = ...`, consistent with what was already done in the v1 encoder. # Additional Notes⚠️ Should be merged after [#1896](#1896). # How to test the change? Existing tests. Co-authored-by: anais.raison <[email protected]>
# What does this PR do? Adds the canonical V1 trace payload data model (`v1::Span`, `TracerPayload`, `TraceChunk`, typed `AttributeValue`, `SpanKind`, 128-bit `trace_id`, `error: bool`) and a matching msgpack encoder that serializes this model into the V1 wire format. New public APIs: `to_vec_from_payload`, `to_vec_from_payload_with_capacity`, `write_payload_to_slice`, `to_encoded_byte_len_from_payload`. # Motivation [APMSP-2810](https://datadoghq.atlassian.net/browse/APMSP-2810), M3 of the V1 trace payload rollout. Tracers will eventually produce V1 payloads natively rather than going through the v0.4→V1 conversion path implemented in [#1896](#1896), so libdatadog needs a canonical V1 data model and a corresponding encoder. # Additional Notes - The V1 wire format keys (`SpanKey`, `SpanLinkKey`, `SpanEventKey`, `AnyValueKey`, plus the `trace_key` and `chunk_key` modules) live in `msgpack_encoder/v1/mod.rs` and are shared between the v0.4→V1 encoder and the v1::Span encoder. - Output is byte-identical to the M1 v0.4→V1 encoder for equivalent inputs. [APMSP-2810]: https://datadoghq.atlassian.net/browse/APMSP-2810?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ Co-authored-by: anais.raison <[email protected]>
What does this PR do?
Implements the v0.4 to V1 encoder for the Trace Exporter.
Key additions:
ID
Motivation
APMSP-2808
Additional Notes
How to test the change?
Added unit tests.