Skip to content

feat(trace-utils): serialize v04 spans to OTLP#1644

Draft
paullegranddc wants to merge 6 commits intomainfrom
paullgdc/proto_codec/serialize_span_to_otlp
Draft

feat(trace-utils): serialize v04 spans to OTLP#1644
paullegranddc wants to merge 6 commits intomainfrom
paullgdc/proto_codec/serialize_span_to_otlp

Conversation

@paullegranddc
Copy link
Contributor

@paullegranddc paullegranddc commented Mar 3, 2026

What does this PR do?

Add a a manual serializer from v04 span model to OTLP spans, using a new proto encoding lib I wrote beforehand.

Motivation

Usually we would use prost to do such a thing, but it forces you to transform into it's own struct data model before serialization. This is fine if fields map 1:1 but this is not the case here.
Furthermore prost only works with String data, no borrowed slices which is another issue as it would basically require copying all of the data.

Additional Notes

Anything else we should know when reviewing?

How to test the change?

Describe here in detail how the change can be validated.

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/paullgdc/proto_codec/serialize_span_to_otlp

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 27 27 No change (0%)
datadog-live-debugger 6 6 No change (0%)
datadog-live-debugger-ffi 10 10 No change (0%)
datadog-profiling-replayer 4 4 No change (0%)
datadog-remote-config 3 3 No change (0%)
datadog-sidecar 59 59 No change (0%)
libdd-common 10 10 No change (0%)
libdd-common-ffi 12 12 No change (0%)
libdd-crashtracker 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-telemetry 19 19 No change (0%)
libdd-tinybytes 4 4 No change (0%)
libdd-trace-normalization 2 2 No change (0%)
libdd-trace-obfuscation 9 9 No change (0%)
libdd-trace-utils 15 15 No change (0%)
Total 219 219 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.

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

📚 Documentation Check Results

⚠️ 539 documentation warning(s) found

📦 libdd-proto-codec - 33 warning(s)

📦 libdd-trace-utils - 506 warning(s)


Updated: 2026-03-03 16:08:29 UTC | Commit: 37b9406 | missing-docs job results

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

🔒 Cargo Deny Results

No issues found!

📦 libdd-proto-codec - ✅ No issues

📦 libdd-trace-utils - ✅ No issues


Updated: 2026-03-03 16:10:56 UTC | Commit: 37b9406 | dependency-check job results

@paullegranddc paullegranddc changed the title Paullgdc/proto codec/serialize span to otlp feat(trace-utils): serialze v04 spans to OTLP Mar 3, 2026
@paullegranddc paullegranddc changed the title feat(trace-utils): serialze v04 spans to OTLP feat(trace-utils): serialize v04 spans to OTLP Mar 3, 2026
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 92.08174% with 62 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.48%. Comparing base (8fb3175) to head (66c2d71).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1644      +/-   ##
==========================================
+ Coverage   71.19%   71.48%   +0.28%     
==========================================
  Files         425      429       +4     
  Lines       62666    63461     +795     
==========================================
+ Hits        44615    45364     +749     
- Misses      18051    18097      +46     
Components Coverage Δ
libdd-crashtracker 63.04% <ø> (-0.02%) ⬇️
libdd-crashtracker-ffi 15.63% <ø> (ø)
libdd-alloc 98.77% <ø> (ø)
libdd-data-pipeline 88.10% <ø> (+0.72%) ⬆️
libdd-data-pipeline-ffi 76.20% <ø> (+3.36%) ⬆️
libdd-common 79.73% <ø> (ø)
libdd-common-ffi 73.40% <ø> (ø)
libdd-telemetry 62.48% <ø> (ø)
libdd-telemetry-ffi 16.75% <ø> (ø)
libdd-dogstatsd-client 82.64% <ø> (ø)
datadog-ipc 80.74% <ø> (ø)
libdd-profiling 81.60% <ø> (ø)
libdd-profiling-ffi 63.65% <ø> (ø)
datadog-sidecar 33.53% <ø> (+0.08%) ⬆️
datdog-sidecar-ffi 12.79% <ø> (+0.38%) ⬆️
spawn-worker 54.69% <ø> (ø)
libdd-tinybytes 93.16% <ø> (ø)
libdd-trace-normalization 81.71% <ø> (ø)
libdd-trace-obfuscation 94.67% <ø> (ø)
libdd-trace-protobuf 68.00% <ø> (ø)
libdd-trace-utils 89.54% <97.64%> (+0.56%) ⬆️
datadog-tracer-flare 88.28% <ø> (-2.17%) ⬇️
libdd-log 74.69% <ø> (ø)
🚀 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
Copy link
Contributor

dd-octo-sts bot commented Mar 3, 2026

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 8.51 MB 8.51 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 97.30 MB 97.30 MB -0% (-408 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.12 MB 11.12 MB +0% (+16 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 112.92 MB 112.92 MB +0% (+1.79 KB) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 27.16 MB 27.16 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 76.26 KB 76.26 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 185.98 MB 185.95 MB --.01% (-24.00 KB) 💪
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 916.65 MB 916.72 MB +0% (+77.83 KB) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 9.93 MB 9.93 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 76.26 KB 76.26 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 24.76 MB 24.76 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 51.43 MB 51.43 MB -0% (-56 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 22.97 MB 22.97 MB -0% (-512 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 77.44 KB 77.44 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 190.16 MB 190.16 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 900.31 MB 900.39 MB +0% (+85.72 KB) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 7.53 MB 7.53 MB +0% (+512 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 77.44 KB 77.44 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 26.52 MB 26.52 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 47.06 MB 47.06 MB +0% (+1.91 KB) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 85.27 MB 85.27 MB +0% (+344 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 10.04 MB 10.04 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 105.90 MB 105.90 MB -0% (-1.56 KB) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.79 MB 11.79 MB 0% (0 B) 👌

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.

2 participants