Skip to content

feat(sidecar)!: introduce TraceData to unify text and binary data#1247

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 7 commits intomainfrom
bob/tracedata
Jan 22, 2026
Merged

feat(sidecar)!: introduce TraceData to unify text and binary data#1247
gh-worker-dd-mergequeue-cf854d[bot] merged 7 commits intomainfrom
bob/tracedata

Conversation

@bwoebi
Copy link
Copy Markdown
Contributor

@bwoebi bwoebi commented Sep 29, 2025

Also move Span structures to v04, to make space for v1 spans (which will eventually become the new default). TraceData is also going to be used in the V1 implementation, to carry around byte arrays and strings alike, separate from the indexed offsets into the big vector.
This trivially allows directly working on tinybytes data or u8 slices, depending on the input, rather than requiring a copy-conversion at the end for tinybytes input. This is a major performance penalty (benchmarks say about 20% gain - I'm really confused why the regression introduced by #1004 was deemed acceptable).

This also addresses "APMSP-1941 - Replace Bytes with a wrapper that borrows the underlying".

Note that this PR partially reverts #1139 by @shreyamalpani - but instead provides the ability to pass an endpoint directly when sending.
This was done by the deliberate choice to remove Clone from Span, which is quite an expensive operation and should simply never be done. Especially the goal is for v1 spans to possibly store the backing storage for strings alongside the actual TracerPayload (which v1 has), at which point such an operation would be prohibitively expensive.

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Sep 29, 2025

Benchmarks

Comparison

Benchmark execution time: 2026-01-22 13:35:57

Comparing candidate commit 66032bf in PR branch bob/tracedata with baseline commit 0ee8789 in branch main.

Found 10 performance improvements and 12 performance regressions! Performance is the same for 35 metrics, 2 unstable metrics.

scenario:benching deserializing traces from msgpack to their internal representation

  • 🟩 execution_time [-13.318ms; -12.557ms] or [-21.554%; -20.322%]

scenario:credit_card/is_card_number/37828224631000521389798

  • 🟥 execution_time [+7.744µs; +7.797µs] or [+17.149%; +17.267%]
  • 🟥 throughput [-3264319.911op/s; -3238819.791op/s] or [-14.741%; -14.626%]

scenario:credit_card/is_card_number/x371413321323331

  • 🟥 execution_time [+402.351ns; +404.463ns] or [+6.666%; +6.701%]
  • 🟥 throughput [-10406039.003op/s; -10350176.869op/s] or [-6.281%; -6.248%]

scenario:credit_card/is_card_number_no_luhn/ 378282246310005

  • 🟥 execution_time [+5.930µs; +5.990µs] or [+11.181%; +11.295%]
  • 🟥 throughput [-1913348.827op/s; -1895934.942op/s] or [-10.147%; -10.055%]

scenario:credit_card/is_card_number_no_luhn/378282246310005

  • 🟥 execution_time [+5.803µs; +5.856µs] or [+11.646%; +11.752%]
  • 🟥 throughput [-2110307.844op/s; -2092987.630op/s] or [-10.516%; -10.429%]

scenario:credit_card/is_card_number_no_luhn/37828224631000521389798

  • 🟥 execution_time [+7.907µs; +7.960µs] or [+17.489%; +17.606%]
  • 🟥 throughput [-3314912.718op/s; -3289282.719op/s] or [-14.987%; -14.871%]

scenario:credit_card/is_card_number_no_luhn/x371413321323331

  • 🟥 execution_time [+395.013ns; +399.902ns] or [+6.541%; +6.622%]
  • 🟥 throughput [-10291891.617op/s; -10160352.514op/s] or [-6.215%; -6.136%]

scenario:normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo...

  • 🟩 execution_time [-20.520µs; -20.398µs] or [-9.932%; -9.873%]
  • 🟩 throughput [+530451.520op/s; +533562.022op/s] or [+10.959%; +11.023%]

scenario:normalization/normalize_name/normalize_name/bad-name

  • 🟩 execution_time [-822.739ns; -799.790ns] or [-4.399%; -4.276%]
  • 🟩 throughput [+2390680.513op/s; +2456636.623op/s] or [+4.471%; +4.595%]

scenario:normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000...

  • 🟩 execution_time [-41.171µs; -40.767µs] or [-7.674%; -7.599%]
  • 🟩 throughput [+153376.974op/s; +154818.835op/s] or [+8.229%; +8.306%]

scenario:normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters

  • 🟩 execution_time [-22.905µs; -22.787µs] or [-12.028%; -11.966%]
  • 🟩 throughput [+714187.311op/s; +717571.961op/s] or [+13.600%; +13.665%]

scenario:single_flag_killswitch/rules-based

  • 🟩 execution_time [-55.036ns; -53.719ns] or [-22.505%; -21.966%]

Candidate

Candidate benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
credit_card/is_card_number/ execution_time 3.896µs 3.914µs ± 0.002µs 3.914µs ± 0.001µs 3.915µs 3.917µs 3.919µs 3.921µs 0.19% -3.572 38.200 0.05% 0.000µs 1 200
credit_card/is_card_number/ throughput 255015962.443op/s 255480199.856op/s ± 130069.785op/s 255493088.917op/s ± 55405.285op/s 255543735.658op/s 255593031.256op/s 255655072.450op/s 256705424.901op/s 0.47% 3.614 38.637 0.05% 9197.323op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 76.681µs 78.427µs ± 0.789µs 78.384µs ± 0.574µs 78.904µs 79.728µs 80.418µs 80.679µs 2.93% 0.268 -0.335 1.00% 0.056µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12394737.930op/s 12752033.235op/s ± 127990.487op/s 12757775.625op/s ± 93765.700op/s 12856636.376op/s 12936431.556op/s 13003560.879op/s 13041069.384op/s 2.22% -0.221 -0.374 1.00% 9050.294op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 70.724µs 71.879µs ± 0.671µs 71.772µs ± 0.445µs 72.297µs 73.153µs 73.498µs 74.433µs 3.71% 0.610 0.242 0.93% 0.047µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13434923.104op/s 13913548.430op/s ± 129211.022op/s 13933006.621op/s ± 87007.651op/s 14006518.985op/s 14104804.457op/s 14132416.069op/s 14139423.196op/s 1.48% -0.558 0.120 0.93% 9136.599op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.898µs 3.915µs ± 0.003µs 3.915µs ± 0.002µs 3.916µs 3.920µs 3.922µs 3.926µs 0.28% -0.156 5.576 0.07% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 254737494.258op/s 255435969.016op/s ± 187409.725op/s 255456010.475op/s ± 102725.235op/s 255550988.811op/s 255665246.698op/s 255725460.622op/s 256517502.325op/s 0.42% 0.172 5.645 0.07% 13251.869op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 67.250µs 68.677µs ± 0.717µs 68.630µs ± 0.493µs 69.141µs 69.784µs 70.716µs 71.471µs 4.14% 0.580 0.828 1.04% 0.051µs 1 200
credit_card/is_card_number/378282246310005 throughput 13991643.347op/s 14562579.936op/s ± 151176.717op/s 14570847.406op/s ± 104560.241op/s 14658942.771op/s 14786609.957op/s 14846243.855op/s 14869833.955op/s 2.05% -0.504 0.639 1.04% 10689.808op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 52.802µs 52.929µs ± 0.061µs 52.930µs ± 0.031µs 52.955µs 53.013µs 53.162µs 53.221µs 0.55% 1.468 4.824 0.12% 0.004µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 18789407.427op/s 18893432.855op/s ± 21761.866op/s 18892892.494op/s ± 11153.214op/s 18905939.302op/s 18924598.763op/s 18932032.305op/s 18938710.725op/s 0.24% -1.452 4.756 0.11% 1538.796op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.429µs 6.440µs ± 0.004µs 6.441µs ± 0.002µs 6.442µs 6.445µs 6.446µs 6.450µs 0.15% -0.824 0.276 0.06% 0.000µs 1 200
credit_card/is_card_number/x371413321323331 throughput 155033609.072op/s 155287728.635op/s ± 96171.401op/s 155262421.968op/s ± 52525.193op/s 155339891.272op/s 155492818.384op/s 155537378.087op/s 155551008.919op/s 0.19% 0.827 0.280 0.06% 6800.345op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.900µs 3.915µs ± 0.003µs 3.915µs ± 0.002µs 3.917µs 3.919µs 3.921µs 3.930µs 0.38% -0.055 5.523 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 254439947.191op/s 255399921.831op/s ± 192024.134op/s 255397726.963op/s ± 126550.225op/s 255526300.263op/s 255658779.095op/s 255794184.725op/s 256417850.658op/s 0.40% 0.072 5.534 0.07% 13578.157op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 64.856µs 65.166µs ± 0.165µs 65.113µs ± 0.071µs 65.225µs 65.497µs 65.763µs 65.824µs 1.09% 1.709 3.208 0.25% 0.012µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15192037.715op/s 15345481.663op/s ± 38709.169op/s 15357996.647op/s ± 16833.875op/s 15372400.393op/s 15380975.887op/s 15395021.541op/s 15418753.830op/s 0.40% -1.692 3.136 0.25% 2737.152op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 58.674µs 58.995µs ± 0.215µs 58.924µs ± 0.131µs 59.151µs 59.341µs 59.582µs 60.031µs 1.88% 1.211 2.216 0.36% 0.015µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 16658025.724op/s 16950732.549op/s ± 61525.588op/s 16970970.382op/s ± 37621.967op/s 16997983.192op/s 17022038.124op/s 17031559.889op/s 17043305.335op/s 0.43% -1.181 2.063 0.36% 4350.516op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.897µs 3.915µs ± 0.003µs 3.915µs ± 0.002µs 3.916µs 3.919µs 3.920µs 3.925µs 0.26% -0.970 9.551 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 254806645.637op/s 255450390.816op/s ± 169270.169op/s 255458066.569op/s ± 98334.729op/s 255553672.661op/s 255668518.791op/s 255744825.106op/s 256584608.800op/s 0.44% 0.991 9.681 0.07% 11969.208op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 55.418µs 55.660µs ± 0.181µs 55.602µs ± 0.099µs 55.753µs 55.957µs 56.123µs 56.843µs 2.23% 2.039 8.416 0.33% 0.013µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 17592252.059op/s 17966444.568op/s ± 58172.404op/s 17984888.200op/s ± 32200.112op/s 18008677.941op/s 18028197.275op/s 18039410.998op/s 18044642.445op/s 0.33% -1.979 7.921 0.32% 4113.410op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 53.050µs 53.145µs ± 0.044µs 53.140µs ± 0.031µs 53.175µs 53.208µs 53.252µs 53.391µs 0.47% 1.115 4.102 0.08% 0.003µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 18729588.836op/s 18816395.685op/s ± 15586.481op/s 18818239.454op/s ± 11019.022op/s 18827922.946op/s 18836730.625op/s 18845779.073op/s 18850177.097op/s 0.17% -1.103 4.033 0.08% 1102.131op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.428µs 6.437µs ± 0.004µs 6.436µs ± 0.002µs 6.438µs 6.444µs 6.452µs 6.460µs 0.37% 1.546 4.632 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 154802015.295op/s 155361560.029op/s ± 105835.471op/s 155372693.251op/s ± 56848.983op/s 155430262.273op/s 155502038.105op/s 155537309.429op/s 155570193.792op/s 0.13% -1.538 4.587 0.07% 7483.698op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
credit_card/is_card_number/ execution_time [3.914µs; 3.914µs] or [-0.007%; +0.007%] None None None
credit_card/is_card_number/ throughput [255462173.435op/s; 255498226.277op/s] or [-0.007%; +0.007%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [78.317µs; 78.536µs] or [-0.139%; +0.139%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12734294.984op/s; 12769771.486op/s] or [-0.139%; +0.139%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [71.786µs; 71.972µs] or [-0.129%; +0.129%] None None None
credit_card/is_card_number/ 378282246310005 throughput [13895641.025op/s; 13931455.835op/s] or [-0.129%; +0.129%] None None None
credit_card/is_card_number/37828224631 execution_time [3.914µs; 3.915µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/37828224631 throughput [255409995.830op/s; 255461942.201op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/378282246310005 execution_time [68.577µs; 68.776µs] or [-0.145%; +0.145%] None None None
credit_card/is_card_number/378282246310005 throughput [14541628.297op/s; 14583531.575op/s] or [-0.144%; +0.144%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [52.920µs; 52.937µs] or [-0.016%; +0.016%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [18890416.870op/s; 18896448.840op/s] or [-0.016%; +0.016%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.439µs; 6.440µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/x371413321323331 throughput [155274400.204op/s; 155301057.067op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.915µs; 3.916µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ throughput [255373309.133op/s; 255426534.529op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [65.143µs; 65.189µs] or [-0.035%; +0.035%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15340116.944op/s; 15350846.382op/s] or [-0.035%; +0.035%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [58.965µs; 59.025µs] or [-0.051%; +0.051%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [16942205.695op/s; 16959259.404op/s] or [-0.050%; +0.050%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.914µs; 3.915µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255426931.599op/s; 255473850.034op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [55.635µs; 55.685µs] or [-0.045%; +0.045%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [17958382.433op/s; 17974506.704op/s] or [-0.045%; +0.045%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [53.139µs; 53.151µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [18814235.548op/s; 18818555.821op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.436µs; 6.437µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [155346892.251op/s; 155376227.808op/s] or [-0.009%; +0.009%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
concentrator/add_spans_to_concentrator execution_time 10.670ms 10.700ms ± 0.015ms 10.699ms ± 0.009ms 10.708ms 10.721ms 10.733ms 10.794ms 0.89% 1.679 8.126 0.14% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
concentrator/add_spans_to_concentrator execution_time [10.698ms; 10.702ms] or [-0.019%; +0.019%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching string interning on wordpress profile execution_time 161.692µs 162.349µs ± 0.372µs 162.283µs ± 0.157µs 162.486µs 162.991µs 163.306µs 165.376µs 1.91% 3.110 20.990 0.23% 0.026µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching string interning on wordpress profile execution_time [162.298µs; 162.401µs] or [-0.032%; +0.032%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching deserializing traces from msgpack to their internal representation execution_time 48.612ms 48.852ms ± 0.720ms 48.736ms ± 0.058ms 48.795ms 49.007ms 51.278ms 57.157ms 17.28% 8.949 92.095 1.47% 0.051ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching deserializing traces from msgpack to their internal representation execution_time [48.752ms; 48.951ms] or [-0.204%; +0.204%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample_frames_x1000 execution_time 3.904ms 3.911ms ± 0.007ms 3.910ms ± 0.001ms 3.911ms 3.915ms 3.921ms 3.999ms 2.28% 11.011 139.435 0.17% 0.000ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample_frames_x1000 execution_time [3.910ms; 3.912ms] or [-0.024%; +0.024%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
single_flag_killswitch/rules-based execution_time 187.363ns 190.175ns ± 2.361ns 189.955ns ± 1.549ns 191.305ns 194.524ns 198.832ns 199.886ns 5.23% 1.404 2.765 1.24% 0.167ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
single_flag_killswitch/rules-based execution_time [189.848ns; 190.502ns] or [-0.172%; +0.172%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time 185.601µs 186.139µs ± 0.256µs 186.094µs ± 0.163µs 186.294µs 186.557µs 186.951µs 187.097µs 0.54% 0.773 1.027 0.14% 0.018µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 5344818.279op/s 5372345.586op/s ± 7380.920op/s 5373618.639op/s ± 4703.281op/s 5377108.915op/s 5383318.161op/s 5385287.334op/s 5387900.553op/s 0.27% -0.763 1.000 0.14% 521.910op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 17.833µs 17.892µs ± 0.029µs 17.887µs ± 0.016µs 17.904µs 17.939µs 17.984µs 18.011µs 0.69% 0.931 2.250 0.16% 0.002µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 55521314.819op/s 55892561.937op/s ± 89274.361op/s 55906156.770op/s ± 50042.121op/s 55946587.491op/s 56029719.482op/s 56053480.861op/s 56076977.196op/s 0.31% -0.915 2.194 0.16% 6312.651op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.474µs 10.555µs ± 0.033µs 10.554µs ± 0.019µs 10.574µs 10.599µs 10.619µs 10.811µs 2.44% 2.246 16.910 0.31% 0.002µs 1 200
normalization/normalize_name/normalize_name/good throughput 92498054.716op/s 94741906.577op/s ± 293576.809op/s 94751662.154op/s ± 169002.841op/s 94914743.375op/s 95126938.477op/s 95384845.795op/s 95472629.600op/s 0.76% -2.120 15.760 0.31% 20759.015op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time [186.103µs; 186.174µs] or [-0.019%; +0.019%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [5371322.662op/s; 5373368.511op/s] or [-0.019%; +0.019%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [17.888µs; 17.895µs] or [-0.022%; +0.022%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [55880189.369op/s; 55904934.505op/s] or [-0.022%; +0.022%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.551µs; 10.560µs] or [-0.043%; +0.043%] None None None
normalization/normalize_name/normalize_name/good throughput [94701219.654op/s; 94782593.499op/s] or [-0.043%; +0.043%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
two way interface execution_time 18.075µs 26.043µs ± 10.090µs 18.262µs ± 0.140µs 34.667µs 44.041µs 49.065µs 73.703µs 303.59% 1.066 1.135 38.65% 0.713µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [24.645µs; 27.442µs] or [-5.370%; +5.370%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time 494.485µs 495.527µs ± 0.629µs 495.450µs ± 0.272µs 495.750µs 496.241µs 496.697µs 502.157µs 1.35% 5.938 60.012 0.13% 0.044µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1991410.383op/s 2018057.331op/s ± 2541.590op/s 2018368.499op/s ± 1109.252op/s 2019316.671op/s 2020744.276op/s 2021634.321op/s 2022307.399op/s 0.20% -5.837 58.609 0.13% 179.718op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 370.323µs 370.937µs ± 0.282µs 370.925µs ± 0.186µs 371.095µs 371.461µs 371.639µs 371.872µs 0.26% 0.511 0.411 0.08% 0.020µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2689097.953op/s 2695877.550op/s ± 2049.518op/s 2695959.794op/s ± 1349.629op/s 2697382.504op/s 2698781.272op/s 2699897.671op/s 2700347.910op/s 0.16% -0.506 0.402 0.08% 144.923op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 167.264µs 167.583µs ± 0.143µs 167.557µs ± 0.071µs 167.645µs 167.846µs 167.988µs 168.179µs 0.37% 1.028 1.779 0.08% 0.010µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5946061.205op/s 5967198.035op/s ± 5073.968op/s 5968124.529op/s ± 2531.572op/s 5970288.927op/s 5973823.622op/s 5976497.393op/s 5978565.314op/s 0.17% -1.021 1.757 0.08% 358.784op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 37.164µs 37.330µs ± 0.064µs 37.325µs ± 0.044µs 37.377µs 37.441µs 37.468µs 37.481µs 0.42% 0.097 -0.344 0.17% 0.005µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26680405.255op/s 26788505.045op/s ± 46175.428op/s 26791402.907op/s ± 31596.356op/s 26820493.971op/s 26857496.894op/s 26891743.385op/s 26907565.432op/s 0.43% -0.089 -0.343 0.17% 3265.096op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 45.532µs 45.786µs ± 0.086µs 45.797µs ± 0.060µs 45.855µs 45.904µs 45.932µs 45.966µs 0.37% -0.498 -0.338 0.19% 0.006µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21755199.855op/s 21840734.945op/s ± 40917.797op/s 21835266.260op/s ± 28756.860op/s 21867999.777op/s 21909930.516op/s 21941470.883op/s 21962682.961op/s 0.58% 0.506 -0.326 0.19% 2893.325op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time [495.440µs; 495.614µs] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [2017705.091op/s; 2018409.571op/s] or [-0.017%; +0.017%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [370.898µs; 370.976µs] or [-0.011%; +0.011%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2695593.506op/s; 2696161.593op/s] or [-0.011%; +0.011%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [167.563µs; 167.603µs] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5966494.832op/s; 5967901.238op/s] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [37.321µs; 37.338µs] or [-0.024%; +0.024%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [26782105.574op/s; 26794904.515op/s] or [-0.024%; +0.024%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [45.774µs; 45.798µs] or [-0.026%; +0.026%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21835064.131op/s; 21846405.758op/s] or [-0.026%; +0.026%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample2_frames_x1000 execution_time 529.003µs 530.033µs ± 0.408µs 529.999µs ± 0.269µs 530.291µs 530.759µs 530.954µs 532.285µs 0.43% 1.039 3.756 0.08% 0.029µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample2_frames_x1000 execution_time [529.976µs; 530.089µs] or [-0.011%; +0.011%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching serializing traces from their internal representation to msgpack execution_time 14.874ms 14.932ms ± 0.033ms 14.925ms ± 0.014ms 14.940ms 14.981ms 15.044ms 15.135ms 1.41% 2.546 9.894 0.22% 0.002ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching serializing traces from their internal representation to msgpack execution_time [14.927ms; 14.936ms] or [-0.031%; +0.031%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sdk_test_data/rules-based execution_time 144.594µs 147.197µs ± 1.702µs 146.973µs ± 0.647µs 147.649µs 149.175µs 154.083µs 162.263µs 10.40% 4.746 34.116 1.15% 0.120µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sdk_test_data/rules-based execution_time [146.961µs; 147.433µs] or [-0.160%; +0.160%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
tags/replace_trace_tags execution_time 2.447µs 2.477µs ± 0.020µs 2.472µs ± 0.007µs 2.481µs 2.534µs 2.539µs 2.555µs 3.37% 1.885 3.540 0.82% 0.001µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
tags/replace_trace_tags execution_time [2.475µs; 2.480µs] or [-0.113%; +0.113%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sql/obfuscate_sql_string execution_time 89.711µs 89.958µs ± 0.128µs 89.940µs ± 0.042µs 89.994µs 90.083µs 90.190µs 91.416µs 1.64% 7.555 82.731 0.14% 0.009µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sql/obfuscate_sql_string execution_time [89.940µs; 89.975µs] or [-0.020%; +0.020%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
write only interface execution_time 1.228µs 3.135µs ± 1.394µs 2.982µs ± 0.025µs 3.006µs 3.061µs 13.606µs 14.616µs 390.09% 7.554 57.330 44.35% 0.099µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [2.942µs; 3.329µs] or [-6.162%; +6.162%] None None None

Group 16

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
redis/obfuscate_redis_string execution_time 34.503µs 35.084µs ± 0.935µs 34.654µs ± 0.047µs 34.782µs 37.048µs 37.082µs 38.796µs 11.95% 1.778 1.537 2.66% 0.066µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
redis/obfuscate_redis_string execution_time [34.954µs; 35.213µs] or [-0.369%; +0.369%] None None None

Group 17

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_trace/test_trace execution_time 238.525ns 248.446ns ± 12.311ns 242.758ns ± 2.690ns 248.489ns 276.727ns 285.776ns 287.730ns 18.53% 1.737 1.839 4.94% 0.871ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_trace/test_trace execution_time [246.740ns; 250.152ns] or [-0.687%; +0.687%] None None None

Group 18

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
ip_address/quantize_peer_ip_address_benchmark execution_time 4.974µs 5.068µs ± 0.051µs 5.068µs ± 0.035µs 5.087µs 5.160µs 5.161µs 5.165µs 1.90% 0.312 -0.820 1.00% 0.004µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
ip_address/quantize_peer_ip_address_benchmark execution_time [5.061µs; 5.075µs] or [-0.139%; +0.139%] None None None

Group 19

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 66032bf 1769088036 bob/tracedata
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
receiver_entry_point/report/2597 execution_time 9.525ms 9.893ms ± 0.091ms 9.910ms ± 0.030ms 9.941ms 9.987ms 10.023ms 10.051ms 1.42% -1.982 4.249 0.91% 0.006ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
receiver_entry_point/report/2597 execution_time [9.881ms; 9.906ms] or [-0.127%; +0.127%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 29, 2025

Codecov Report

❌ Patch coverage is 92.79412% with 49 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.10%. Comparing base (0390784) to head (c2ae111).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1247      +/-   ##
==========================================
+ Coverage   71.08%   71.10%   +0.02%     
==========================================
  Files         417      419       +2     
  Lines       67035    67067      +32     
==========================================
+ Hits        47650    47691      +41     
+ Misses      19385    19376       -9     
Components Coverage Δ
libdd-crashtracker 61.41% <ø> (+0.02%) ⬆️
libdd-crashtracker-ffi 16.50% <ø> (ø)
libdd-alloc 98.73% <ø> (ø)
libdd-data-pipeline 86.03% <80.00%> (ø)
libdd-data-pipeline-ffi 78.57% <ø> (ø)
libdd-common 80.84% <ø> (ø)
libdd-common-ffi 74.19% <ø> (ø)
libdd-telemetry 59.82% <ø> (ø)
libdd-telemetry-ffi 21.17% <ø> (ø)
libdd-dogstatsd-client 83.75% <ø> (ø)
datadog-ipc 82.60% <ø> (ø)
libdd-profiling 80.68% <ø> (+<0.01%) ⬆️
libdd-profiling-ffi 62.46% <ø> (ø)
datadog-sidecar 35.02% <100.00%> (+0.37%) ⬆️
datdog-sidecar-ffi 10.25% <ø> (+1.77%) ⬆️
spawn-worker 55.18% <ø> (ø)
libdd-tinybytes 93.43% <100.00%> (+0.99%) ⬆️
libdd-trace-normalization 82.33% <ø> (ø)
libdd-trace-obfuscation 94.17% <ø> (ø)
libdd-trace-protobuf 61.18% <ø> (ø)
libdd-trace-utils 89.45% <92.64%> (-0.30%) ⬇️
datadog-tracer-flare 63.49% <ø> (ø)
libdd-log 75.57% <ø> (ø)
🚀 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
Copy Markdown
Contributor

dd-octo-sts bot commented Sep 29, 2025

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 91.23 MB 91.21 MB --.02% (-21.60 KB) 💪
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 8.38 MB 8.38 MB 0% (0 B) 👌
aarch64-apple-darwin
Artifact Baseline Commit Change
/aarch64-apple-darwin/lib/libdatadog_profiling.a 62.36 MB 62.36 MB -0% (-4.03 KB) 👌
/aarch64-apple-darwin/lib/libdatadog_profiling.dylib 9.41 MB 9.41 MB -0% (-320 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.67 MB 10.67 MB -0% (-608 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 105.55 MB 105.53 MB --.01% (-20.28 KB) 💪
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 25.08 MB 25.08 MB --.01% (-3.00 KB) 💪
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 73.49 KB 73.49 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 166.29 MB 165.93 MB --.21% (-368.00 KB) 💪
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 830.26 MB 827.93 MB --.28% (-2.33 MB) 💪
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 9.55 MB 9.54 MB --.05% (-5.50 KB) 💪
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 73.49 KB 73.49 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 22.94 MB 22.94 MB --.03% (-8.00 KB) 💪
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 47.92 MB 47.90 MB --.03% (-17.24 KB) 💪
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 21.15 MB 21.15 MB --.01% (-3.00 KB) 💪
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 74.62 KB 74.62 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 170.25 MB 169.91 MB --.19% (-344.00 KB) 💪
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 817.21 MB 814.89 MB --.28% (-2.31 MB) 💪
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 7.22 MB 7.22 MB --.02% (-1.50 KB) 💪
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 74.62 KB 74.62 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 24.52 MB 24.51 MB --.03% (-8.00 KB) 💪
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 43.63 MB 43.62 MB --.03% (-14.80 KB) 💪
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 79.74 MB 79.72 MB --.02% (-20.42 KB) 💪
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 9.85 MB 9.85 MB 0% (0 B) 👌
x86_64-apple-darwin
Artifact Baseline Commit Change
/x86_64-apple-darwin/lib/libdatadog_profiling.a 64.25 MB 64.24 MB -0% (-3.55 KB) 👌
/x86_64-apple-darwin/lib/libdatadog_profiling.dylib 10.44 MB 10.44 MB -0% (-312 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 99.57 MB 99.56 MB --.01% (-14.52 KB) 💪
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.41 MB 11.41 MB -0% (-368 B) 👌

}
/// TraceData implementation using `Bytes` and `BytesString`.
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TinyData;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't know about the name. If you have better suggestions, feel free.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think BytesData is better.

/// Trait representing a tuple of (Text, Bytes) types used for different underlying data structures.
/// Note: The functions are internal to the msgpack decoder and should not be used directly: they're
/// only exposed here due to the inavailability of min_specialization in stable Rust.
pub trait TraceData: Default + Debug + Clone + PartialEq + Serialize {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why the Clone and PartialEq?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

PartialEq is necessary because v04::Span is PartialEq. And yeah, generic types need to have all these derives of the context they are used in, otherwise #[derive] doesn't work.
I have no idea though why I added Clone. Removing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, Clone is needed for some cases where we have to clone spans (e.g. benchmarks and some tests).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, would be nice to mark PartialEq and Clone as test convenience things.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

How? Like by a comment? or a cfg_attr?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure if there's a best practice for conditional trait requirements. You can of course make some other trait which is defined twice behind a #[cfg(test)] gates, one with and one without the extra requirements.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think it's important enough to warrant conditional trait requirements. Was just an observation that it's only used from tests as far as I can see.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, cfg_attr doesn't work anyway, that'd need at least a feature flag. That's ugly.

@bwoebi bwoebi force-pushed the bob/tracedata branch 3 times, most recently from 9bbe018 to d207172 Compare September 30, 2025 13:48
@datadog-official
Copy link
Copy Markdown

datadog-official bot commented Sep 30, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

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

Copy link
Copy Markdown
Contributor

@VianneyRuhlmann VianneyRuhlmann left a comment

Choose a reason for hiding this comment

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

Thanks for adding the TraceData trait, it's a nice addition and makes even more sense with V1.

The span::Span was supposed to be a common interface for spans regardless of the encoding. It made sense with v04 and v05 as they have basically the same fields but since v1 has different fields (e.g. attributes vs meta/metrics) we probably won't be able to share a common representation. This also means we will have to reimplement all trace utils for v1 span.

Regarding the changes to the decoder I'm not a fan of having unsafe functions implemented on the SpanBytes. Also I think these changes should be addressed in a separate PR as they're not tied to the addition of TraceData.

state.serialize_field("array_value", &wrapped_value)?;
}
}
fn get_mut_slice(buf: &mut Self::Bytes) -> &mut &'static [u8];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I feel like these functions should be implemented on the type of the buffer rather than on the TraceData type. Maybe in Buffer(B) B shouldn't be T::Bytes but a different type that implements a trait to be deserialized to Span<(T::Text,T::Bytes)>

Copy link
Copy Markdown
Contributor Author

@bwoebi bwoebi Oct 1, 2025

Choose a reason for hiding this comment

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

That's mostly for convenience for now, so that Buffer -> T::Text works trivially. I wanted to not overcomplicate it, unless there's a real need for that. But it should not be overly problematic to change that in future if needed (e.g. you could then add a BufferData trait which holds (Out: TraceData, In: BufferInput) or such). Thanks to this already being T, it would be then a simple find T: TraceData & replace by a new T: BufferData operation at most places and returning T::Out::Text/Bytes then.

Comment on lines +64 to +66
/// `T` is the type used to represent strings in the span, it can be either owned (e.g. BytesString)
/// or borrowed (e.g. &str). To define a generic function taking any `Span<T>` you can use the
/// [`SpanValue`] trait:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doc needs to be updated to match the change to TraceData


/// Internal Buffer used to wrap msgpack data for decoding.
/// Provides a couple accessors to extract data from the buffer.
pub struct Buffer<T: TraceData>(T::Bytes);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why can't we use &[u8] for the buffer ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We need to at least store the Bytes reference to construct the Bytes/BytesString object.

@@ -26,7 +26,7 @@ use std::io::Write;
#[cfg(feature = "compression")]
use zstd::stream::write::Encoder;

#[derive(Debug, Clone)]
#[derive(Debug)]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The changes to send_data are not linked to TraceData. Could you put them in a separate PR ?

Copy link
Copy Markdown
Contributor Author

@bwoebi bwoebi Oct 1, 2025

Choose a reason for hiding this comment

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

They are, because it relied on Clone on the Span, and TraceData is not meant to be Clone outside of testing. (but these changes are also relatively minor)

})
#[inline]
fn get_mut_slice<'b>(buf: &'b mut &'a [u8]) -> &'b mut &'static [u8] {
unsafe { std::mem::transmute::<&'b mut &[u8], &'b mut &'static [u8]>(buf) }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This function is unsafe and should at least be marked as such.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, the generic variant on the trait probably should be.

@bwoebi
Copy link
Copy Markdown
Contributor Author

bwoebi commented Oct 1, 2025

This also means we will have to reimplement all trace utils for v1 span.

My plan is to have a projection with some functions which is compatible with all versions of the spans. Meaning that adding a float attribute will reroute to metrics, everything else to string.

That's why moving the span to v04 (and add a new span to v1), then we can add a common projection which routes accordingly, agnostic to the actual backend span used. I definitely want to avoid re-implementing everything.

@bwoebi
Copy link
Copy Markdown
Contributor Author

bwoebi commented Oct 1, 2025

Also I think these changes should be addressed in a separate PR as they're not tied to the addition of TraceData.

They sort of are, because the point of this PR is to also make use of TraceData, especially the meta_struct part making use of TraceData::Bytes.

@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. To override this behavior, add the keep-open label or update the PR.

@github-actions github-actions bot added the stale Used by actions/stale to identify PRs that have been inactive for 90+ days label Jan 10, 2026
@github-actions github-actions bot removed the stale Used by actions/stale to identify PRs that have been inactive for 90+ days label Jan 17, 2026
@bwoebi bwoebi requested a review from a team as a code owner January 19, 2026 12:35
@bwoebi bwoebi force-pushed the bob/tracedata branch 3 times, most recently from a033377 to bc07ed6 Compare January 19, 2026 14:53
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot merged commit d430cbd into main Jan 22, 2026
41 of 42 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot deleted the bob/tracedata branch January 22, 2026 19:31
hoolioh added a commit that referenced this pull request Feb 10, 2026
# Release proposal for libdd-tinybytes and its dependencies

This PR contains version bumps based on public API changes and commits
since last release.

## libdd-tinybytes
**Next version:** `1.1.0`

**Semver bump:** `minor`
**Tag:** `libdd-tinybytes-v1.1.0`

### Commits

- feat(sidecar)!: introduce TraceData to unify text and binary data
(#1247)
- chore: add changelog for every published crate (#1396)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Julio <[email protected]>
paullegranddc pushed a commit that referenced this pull request Feb 23, 2026
# 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-common
**Next version:** `2.0.0`

**Semver bump:** `major`
**Tag:** `libdd-common-v2.0.0`

### Commits

- refactor(ddcommon)!: remove direct dependency on hyper client
everywhere in common (#1604)
- feat!: enable non-blocking DNS for reqwest (#1558)
- feat: unify Azure tags (#1553)
- feat(common): add current thread id API (#1569)
- refactor!: switch from multipart to multer to resolve deprecation
warnings and dependabot alerts (#1540)
- feat: single source of truth for headers (fixes issue in profiling
with missing headers) (#1493)
- refactor!: make reqwest available in common (#1504)
## libdd-ddsketch
**Next version:** `1.0.1`

**Semver bump:** `patch`
**Tag:** `libdd-ddsketch-v1.0.1`

### Commits

- chore: remove manual changelog modifications (#1472)
- build: update `prost` crates (#1426)
- chore: add changelog for every published crate (#1396)
## libdd-trace-protobuf
**Next version:** `1.1.0`

**Semver bump:** `minor`
**Tag:** `libdd-trace-protobuf-v1.1.0`

### Commits

- chore: remove manual changelog modifications (#1472)
- build: update `prost` crates (#1426)
- chore: add changelog for every published crate (#1396)
- Handle null span tag values (#1394)
## libdd-dogstatsd-client
**Next version:** `1.0.1`

**Semver bump:** `patch`
**Tag:** `libdd-dogstatsd-client-v1.0.1`

### Commits

- refactor(ddcommon)!: remove direct dependency on hyper client
everywhere in common (#1604)
- chore: release libddcommon-v1.1.0 (#1456)
- chore: add changelog for every published crate (#1396)
- style: fix recent clippy warnings (#1346)
## libdd-telemetry
**Next version:** `3.0.0`

**Semver bump:** `major`
**Tag:** `libdd-telemetry-v3.0.0`

### Commits

- refactor(ddcommon)!: remove direct dependency on hyper client
everywhere in common (#1604)
- chore(deps): bump tracing-subscriber to remove regex dep duplicate
(#1608)
- feat(telemetry)!: add process_tags to Application in telemetry (#1459)
- fix(telemetry)!: fix logs payload format [APMSP-2590] (#1498)
- feat(appsec): add endpoints collection (#1182)
## libdd-trace-normalization
**Next version:** `1.0.1`

**Semver bump:** `patch`
**Tag:** `libdd-trace-normalization-v1.0.1`

### Commits

- Prevent span start overflow panic (#1373)
- [CHAOSPLT-932] Add support for internal fuzzing infra  (#1372)
- chore: add changelog for every published crate (#1396)
## libdd-trace-utils
**Next version:** `2.0.0`

**Semver bump:** `major`
**Tag:** `libdd-trace-utils-v2.0.0`

### Commits

- refactor(ddcommon)!: remove direct dependency on hyper client
everywhere in common (#1604)
- feat: unify Azure tags (#1553)
- fix(serverless): set hostname on stats from tracer to empty string
(#1530)
- chore: remove manual changelog modifications (#1472)
- feat(sidecar)!: introduce TraceData to unify text and binary data
(#1247)
- chore: release libddcommon-v1.1.0 (#1456)
- fix(test-agent): undo commenting arg in docker cmd (#1439)
- [SLES-2652] Log error details when trace request fails (2) (#1441)
- build: update `prost` crates (#1426)
- chore(trace-utils): bump the test agent version used for integration
tests (#1417)
- [Serverless] Skip AAS metadata tagging when span is from API
Management (#1409)
- chore: add changelog for every published crate (#1396)
- Handle null span tag values (#1394)
- [SVLS-7934] Log error details when trace request fails (#1392)
- Fix trace utils clippy warning (#1397)
- feat(trace_utils): Allow sending trace stats using custom HTTP client
(#1345)
## libdd-trace-stats
**Next version:** `1.0.1`

**Semver bump:** `patch`
**Tag:** `libdd-trace-stats-v1.0.1`

### Commits

- feat(sidecar)!: introduce TraceData to unify text and binary data
(#1247)
- chore: add changelog for every published crate (#1396)
## libdd-data-pipeline
**Next version:** `2.0.0`

**Semver bump:** `major`
**Tag:** `libdd-data-pipeline-v2.0.0`

### Commits

- refactor(ddcommon)!: remove direct dependency on hyper client
everywhere in common (#1604)
- refactor(trace_exporter)!: remove Proxy TraceExporter input mode
(#1583)
- refactor(libdd-data-pipeline): health metrics (#1433)
- feat(data-pipeline)!: include reason for chunks dropped telemetry
(#1449)
- feat(sidecar)!: introduce TraceData to unify text and binary data
(#1247)
- chore: release libddcommon-v1.1.0 (#1456)
- chore: prepare libdd-telemetry-v2.0.0 (#1457)
- Allow submitting Vec<Vec<Span>> asynchronously (#1302)
- test(data-pipeline): handle EINTR in test_health_metrics_disabled
(#1430)
- chore: add changelog for every published crate (#1396)

[APMSP-2590]:
https://datadoghq.atlassian.net/browse/APMSP-2590?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>
dd-octo-sts bot added a commit that referenced this pull request Feb 25, 2026
# 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-common
**Next version:** `2.0.0`

**Semver bump:** `major`
**Tag:** `libdd-common-v2.0.0`

### Commits

- refactor(ddcommon)!: remove direct dependency on hyper client
everywhere in common (#1604)
- feat!: enable non-blocking DNS for reqwest (#1558)
- feat: unify Azure tags (#1553)
- feat(common): add current thread id API (#1569)
- refactor!: switch from multipart to multer to resolve deprecation
warnings and dependabot alerts (#1540)
- feat: single source of truth for headers (fixes issue in profiling
with missing headers) (#1493)
- refactor!: make reqwest available in common (#1504)
## libdd-ddsketch
**Next version:** `1.0.1`

**Semver bump:** `patch`
**Tag:** `libdd-ddsketch-v1.0.1`

### Commits

- chore: remove manual changelog modifications (#1472)
- build: update `prost` crates (#1426)
- chore: add changelog for every published crate (#1396)
## libdd-trace-protobuf
**Next version:** `1.1.0`

**Semver bump:** `minor`
**Tag:** `libdd-trace-protobuf-v1.1.0`

### Commits

- chore: remove manual changelog modifications (#1472)
- build: update `prost` crates (#1426)
- chore: add changelog for every published crate (#1396)
- Handle null span tag values (#1394)
## libdd-dogstatsd-client
**Next version:** `1.0.1`

**Semver bump:** `patch`
**Tag:** `libdd-dogstatsd-client-v1.0.1`

### Commits

- refactor(ddcommon)!: remove direct dependency on hyper client
everywhere in common (#1604)
- chore: release libddcommon-v1.1.0 (#1456)
- chore: add changelog for every published crate (#1396)
- style: fix recent clippy warnings (#1346)
## libdd-telemetry
**Next version:** `3.0.0`

**Semver bump:** `major`
**Tag:** `libdd-telemetry-v3.0.0`

### Commits

- refactor(ddcommon)!: remove direct dependency on hyper client
everywhere in common (#1604)
- chore(deps): bump tracing-subscriber to remove regex dep duplicate
(#1608)
- feat(telemetry)!: add process_tags to Application in telemetry (#1459)
- fix(telemetry)!: fix logs payload format [APMSP-2590] (#1498)
- feat(appsec): add endpoints collection (#1182)
## libdd-trace-normalization
**Next version:** `1.0.1`

**Semver bump:** `patch`
**Tag:** `libdd-trace-normalization-v1.0.1`

### Commits

- Prevent span start overflow panic (#1373)
- [CHAOSPLT-932] Add support for internal fuzzing infra  (#1372)
- chore: add changelog for every published crate (#1396)
## libdd-trace-utils
**Next version:** `2.0.0`

**Semver bump:** `major`
**Tag:** `libdd-trace-utils-v2.0.0`

### Commits

- refactor(ddcommon)!: remove direct dependency on hyper client
everywhere in common (#1604)
- feat: unify Azure tags (#1553)
- fix(serverless): set hostname on stats from tracer to empty string
(#1530)
- chore: remove manual changelog modifications (#1472)
- feat(sidecar)!: introduce TraceData to unify text and binary data
(#1247)
- chore: release libddcommon-v1.1.0 (#1456)
- fix(test-agent): undo commenting arg in docker cmd (#1439)
- [SLES-2652] Log error details when trace request fails (2) (#1441)
- build: update `prost` crates (#1426)
- chore(trace-utils): bump the test agent version used for integration
tests (#1417)
- [Serverless] Skip AAS metadata tagging when span is from API
Management (#1409)
- chore: add changelog for every published crate (#1396)
- Handle null span tag values (#1394)
- [SVLS-7934] Log error details when trace request fails (#1392)
- Fix trace utils clippy warning (#1397)
- feat(trace_utils): Allow sending trace stats using custom HTTP client
(#1345)
## libdd-trace-stats
**Next version:** `1.0.1`

**Semver bump:** `patch`
**Tag:** `libdd-trace-stats-v1.0.1`

### Commits

- feat(sidecar)!: introduce TraceData to unify text and binary data
(#1247)
- chore: add changelog for every published crate (#1396)
## libdd-data-pipeline
**Next version:** `2.0.0`

**Semver bump:** `major`
**Tag:** `libdd-data-pipeline-v2.0.0`

### Commits

- refactor(ddcommon)!: remove direct dependency on hyper client
everywhere in common (#1604)
- refactor(trace_exporter)!: remove Proxy TraceExporter input mode
(#1583)
- refactor(libdd-data-pipeline): health metrics (#1433)
- feat(data-pipeline)!: include reason for chunks dropped telemetry
(#1449)
- feat(sidecar)!: introduce TraceData to unify text and binary data
(#1247)
- chore: release libddcommon-v1.1.0 (#1456)
- chore: prepare libdd-telemetry-v2.0.0 (#1457)
- Allow submitting Vec<Vec<Span>> asynchronously (#1302)
- test(data-pipeline): handle EINTR in test_health_metrics_disabled
(#1430)
- chore: add changelog for every published crate (#1396)

[APMSP-2590]:
https://datadoghq.atlassian.net/browse/APMSP-2590?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>
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.

6 participants