Skip to content

[PROTO] Ruby trace exporter (vibed)#1661

Draft
lloeki wants to merge 1 commit intomainfrom
lloeki/ruby-trace-exporter
Draft

[PROTO] Ruby trace exporter (vibed)#1661
lloeki wants to merge 1 commit intomainfrom
lloeki/ruby-trace-exporter

Conversation

@lloeki
Copy link
Member

@lloeki lloeki commented Mar 5, 2026

What does this PR do?

add necessary bits to build and expose the trace API for Ruby's trace exporter

Motivation

Getting the ball rolling on discussion with actual code

Additional Notes

DO NOT MERGE

How to test the change?

See DataDog/dd-trace-rb#5422

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/lloeki/ruby-trace-exporter

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.

@pr-commenter
Copy link

pr-commenter bot commented Mar 5, 2026

Benchmarks

Comparison

Benchmark execution time: 2026-03-05 15:34:32

Comparing candidate commit 682eca3 in PR branch lloeki/ruby-trace-exporter with baseline commit 959c0cd in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 57 metrics, 2 unstable metrics.

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 682eca3 1772722779 lloeki/ruby-trace-exporter
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 162.359µs 162.945µs ± 0.342µs 162.903µs ± 0.159µs 163.059µs 163.489µs 163.936µs 165.788µs 1.77% 3.382 23.262 0.21% 0.024µ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.898µs; 162.993µs] or [-0.029%; +0.029%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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 3.274ms 3.298ms ± 0.012ms 3.297ms ± 0.007ms 3.304ms 3.320ms 3.340ms 3.342ms 1.38% 1.022 1.914 0.35% 0.001ms 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 [3.297ms; 3.300ms] or [-0.049%; +0.049%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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 4.128ms 4.133ms ± 0.007ms 4.132ms ± 0.001ms 4.133ms 4.137ms 4.148ms 4.223ms 2.20% 9.861 116.562 0.18% 0.001ms 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 [4.132ms; 4.134ms] or [-0.024%; +0.024%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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.930µs 5.008µs ± 0.041µs 5.022µs ± 0.027µs 5.045µs 5.055µs 5.064µs 5.067µs 0.89% -0.445 -1.346 0.83% 0.003µ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.002µs; 5.014µs] or [-0.115%; +0.115%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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.306µs 2.369µs ± 0.016µs 2.369µs ± 0.005µs 2.374µs 2.394µs 2.409µs 2.410µs 1.75% -0.965 3.748 0.67% 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.367µs; 2.371µs] or [-0.094%; +0.094%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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 13.991ms 14.058ms ± 0.030ms 14.054ms ± 0.014ms 14.068ms 14.124ms 14.171ms 14.191ms 0.98% 1.830 4.807 0.21% 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.054ms; 14.062ms] or [-0.030%; +0.030%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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 722.949µs 724.835µs ± 0.853µs 724.791µs ± 0.591µs 725.345µs 726.317µs 726.913µs 727.068µs 0.31% 0.229 -0.182 0.12% 0.060µ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 [724.717µs; 724.953µs] or [-0.016%; +0.016%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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.581ms 10.613ms ± 0.014ms 10.610ms ± 0.008ms 10.622ms 10.639ms 10.660ms 10.670ms 0.57% 0.947 1.495 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.611ms; 10.615ms] or [-0.019%; +0.019%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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.828ms 49.333ms ± 0.895ms 49.232ms ± 0.126ms 49.358ms 49.508ms 54.379ms 58.508ms 18.84% 7.785 66.906 1.81% 0.063ms 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 [49.209ms; 49.458ms] or [-0.252%; +0.252%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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 188.455ns 191.198ns ± 1.960ns 190.749ns ± 1.262ns 192.287ns 194.965ns 197.720ns 200.327ns 5.02% 1.324 2.366 1.02% 0.139ns 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 [190.927ns; 191.470ns] or [-0.142%; +0.142%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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 241.282ns 251.469ns ± 11.861ns 244.876ns ± 2.347ns 259.703ns 279.085ns 279.957ns 284.215ns 16.06% 1.275 0.305 4.70% 0.839ns 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 [249.825ns; 253.113ns] or [-0.654%; +0.654%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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.318µs 146.511µs ± 1.726µs 146.175µs ± 0.426µs 146.756µs 148.280µs 153.066µs 164.542µs 12.56% 6.892 62.704 1.18% 0.122µ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.272µs; 146.750µs] or [-0.163%; +0.163%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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.891µs 3.913µs ± 0.003µs 3.913µs ± 0.002µs 3.914µs 3.916µs 3.918µs 3.920µs 0.19% -2.270 17.512 0.07% 0.000µs 1 200
credit_card/is_card_number/ throughput 255094838.515op/s 255577164.606op/s ± 179893.260op/s 255576492.667op/s ± 115107.384op/s 255692028.801op/s 255801234.652op/s 255906441.305op/s 256993964.612op/s 0.55% 2.301 17.797 0.07% 12720.374op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 79.078µs 79.782µs ± 0.393µs 79.739µs ± 0.260µs 80.004µs 80.368µs 81.064µs 81.506µs 2.22% 1.077 2.284 0.49% 0.028µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12269065.275op/s 12534432.833op/s ± 61409.879op/s 12540875.428op/s ± 41046.267op/s 12581293.820op/s 12618219.006op/s 12631809.055op/s 12645739.640op/s 0.84% -1.031 2.098 0.49% 4342.334op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 72.522µs 72.950µs ± 0.277µs 72.906µs ± 0.169µs 73.104µs 73.500µs 73.758µs 73.901µs 1.36% 0.871 0.758 0.38% 0.020µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13531676.331op/s 13708253.779op/s ± 51953.147op/s 13716367.302op/s ± 31808.356op/s 13745404.636op/s 13780431.925op/s 13787658.888op/s 13788953.669op/s 0.53% -0.848 0.699 0.38% 3673.642op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.891µs 3.914µs ± 0.003µs 3.914µs ± 0.001µs 3.915µs 3.920µs 3.922µs 3.925µs 0.28% -1.321 10.925 0.08% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 254788870.368op/s 255490389.551op/s ± 215710.841op/s 255497797.210op/s ± 86821.632op/s 255573829.956op/s 255801261.100op/s 255921926.754op/s 256988985.239op/s 0.58% 1.349 11.121 0.08% 15253.060op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 69.196µs 69.762µs ± 0.333µs 69.708µs ± 0.220µs 69.956µs 70.442µs 70.695µs 70.902µs 1.71% 0.903 0.582 0.48% 0.024µs 1 200
credit_card/is_card_number/378282246310005 throughput 14103884.709op/s 14334678.054op/s ± 68113.467op/s 14345486.435op/s ± 45338.931op/s 14384838.088op/s 14420112.556op/s 14444342.405op/s 14451670.503op/s 0.74% -0.878 0.518 0.47% 4816.349op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 52.207µs 52.243µs ± 0.022µs 52.238µs ± 0.012µs 52.255µs 52.283µs 52.302µs 52.368µs 0.25% 1.470 4.174 0.04% 0.002µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 19095587.239op/s 19141145.804op/s ± 8198.306op/s 19143014.118op/s ± 4261.977op/s 19146654.548op/s 19150769.309op/s 19154004.913op/s 19154477.469op/s 0.06% -1.465 4.142 0.04% 579.708op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.029µs 6.040µs ± 0.015µs 6.037µs ± 0.003µs 6.039µs 6.071µs 6.078µs 6.188µs 2.50% 5.662 46.619 0.25% 0.001µs 1 200
credit_card/is_card_number/x371413321323331 throughput 161608212.508op/s 165561057.848op/s ± 405282.664op/s 165648236.767op/s ± 73319.998op/s 165722589.144op/s 165806086.188op/s 165842037.341op/s 165877081.076op/s 0.14% -5.542 44.804 0.24% 28657.812op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.896µs 3.913µs ± 0.003µs 3.913µs ± 0.002µs 3.915µs 3.917µs 3.919µs 3.919µs 0.15% -1.382 7.899 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 255150323.071op/s 255541051.889op/s ± 177254.477op/s 255535132.414op/s ± 105509.234op/s 255641426.700op/s 255793759.989op/s 255945611.550op/s 256704651.456op/s 0.46% 1.399 8.022 0.07% 12533.784op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 64.195µs 64.451µs ± 0.136µs 64.431µs ± 0.090µs 64.525µs 64.692µs 64.837µs 64.914µs 0.75% 0.692 0.389 0.21% 0.010µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15404904.586op/s 15515752.874op/s ± 32716.513op/s 15520596.628op/s ± 21685.177op/s 15539012.103op/s 15560949.797op/s 15572689.640op/s 15577596.301op/s 0.37% -0.680 0.363 0.21% 2313.407op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 57.827µs 58.072µs ± 0.140µs 58.034µs ± 0.073µs 58.134µs 58.354µs 58.487µs 58.680µs 1.11% 1.377 2.455 0.24% 0.010µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 17041529.419op/s 17220047.636op/s ± 41305.631op/s 17231184.681op/s ± 21554.030op/s 17246117.955op/s 17270680.343op/s 17282767.198op/s 17292975.593op/s 0.36% -1.359 2.383 0.24% 2920.749op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.891µs 3.912µs ± 0.003µs 3.913µs ± 0.002µs 3.914µs 3.916µs 3.918µs 3.921µs 0.21% -1.671 13.611 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 255046897.521op/s 255593234.656op/s ± 186314.989op/s 255588194.080op/s ± 116731.625op/s 255710501.329op/s 255827043.478op/s 255866722.633op/s 256974785.931op/s 0.54% 1.700 13.845 0.07% 13174.459op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 54.637µs 55.010µs ± 0.268µs 54.967µs ± 0.196µs 55.163µs 55.491µs 55.716µs 55.951µs 1.79% 0.704 -0.027 0.49% 0.019µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 17872746.438op/s 18178960.461op/s ± 88210.024op/s 18192744.734op/s ± 64925.770op/s 18257658.599op/s 18291219.409op/s 18299216.267op/s 18302736.923op/s 0.60% -0.683 -0.082 0.48% 6237.391op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 52.204µs 52.251µs ± 0.028µs 52.245µs ± 0.013µs 52.261µs 52.297µs 52.336µs 52.437µs 0.37% 2.211 10.096 0.05% 0.002µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 19070467.662op/s 19138457.843op/s ± 10142.953op/s 19140554.224op/s ± 4805.876op/s 19145013.129op/s 19149884.561op/s 19152948.657op/s 19155622.170op/s 0.08% -2.200 10.002 0.05% 717.215op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.029µs 6.038µs ± 0.012µs 6.035µs ± 0.003µs 6.039µs 6.067µs 6.078µs 6.120µs 1.41% 3.404 14.955 0.19% 0.001µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 163393214.596op/s 165605728.314op/s ± 317843.440op/s 165700273.434op/s ± 74930.489op/s 165761696.504op/s 165837917.447op/s 165857179.200op/s 165869618.272op/s 0.10% -3.374 14.644 0.19% 22474.925op/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.912µs; 3.913µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ throughput [255552233.130op/s; 255602096.082op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [79.728µs; 79.837µs] or [-0.068%; +0.068%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12525922.014op/s; 12542943.651op/s] or [-0.068%; +0.068%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [72.911µs; 72.988µs] or [-0.053%; +0.053%] None None None
credit_card/is_card_number/ 378282246310005 throughput [13701053.572op/s; 13715453.985op/s] or [-0.053%; +0.053%] None None None
credit_card/is_card_number/37828224631 execution_time [3.914µs; 3.915µs] or [-0.012%; +0.012%] None None None
credit_card/is_card_number/37828224631 throughput [255460494.103op/s; 255520284.999op/s] or [-0.012%; +0.012%] None None None
credit_card/is_card_number/378282246310005 execution_time [69.716µs; 69.809µs] or [-0.066%; +0.066%] None None None
credit_card/is_card_number/378282246310005 throughput [14325238.182op/s; 14344117.925op/s] or [-0.066%; +0.066%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [52.240µs; 52.247µs] or [-0.006%; +0.006%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [19140009.598op/s; 19142282.010op/s] or [-0.006%; +0.006%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.038µs; 6.042µs] or [-0.034%; +0.034%] None None None
credit_card/is_card_number/x371413321323331 throughput [165504889.568op/s; 165617226.127op/s] or [-0.034%; +0.034%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.913µs; 3.914µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ throughput [255516486.123op/s; 255565617.654op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [64.432µs; 64.470µs] or [-0.029%; +0.029%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15511218.680op/s; 15520287.068op/s] or [-0.029%; +0.029%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [58.053µs; 58.092µs] or [-0.033%; +0.033%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [17214323.073op/s; 17225772.199op/s] or [-0.033%; +0.033%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.912µs; 3.913µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255567413.190op/s; 255619056.121op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [54.973µs; 55.047µs] or [-0.067%; +0.067%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [18166735.401op/s; 18191185.522op/s] or [-0.067%; +0.067%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [52.247µs; 52.255µs] or [-0.007%; +0.007%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [19137052.127op/s; 19139863.559op/s] or [-0.007%; +0.007%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.037µs; 6.040µs] or [-0.027%; +0.027%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [165561678.270op/s; 165649778.358op/s] or [-0.027%; +0.027%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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.392µs 185.727µs ± 0.159µs 185.706µs ± 0.111µs 185.833µs 185.977µs 186.170µs 186.249µs 0.29% 0.409 -0.004 0.09% 0.011µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 5369160.669op/s 5384258.287op/s ± 4603.292op/s 5384847.658op/s ± 3226.641op/s 5387575.262op/s 5391031.606op/s 5393301.351op/s 5393976.735op/s 0.17% -0.405 -0.012 0.09% 325.502op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 17.847µs 17.948µs ± 0.058µs 17.932µs ± 0.028µs 17.968µs 18.062µs 18.113µs 18.264µs 1.85% 1.645 4.548 0.32% 0.004µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 54752997.266op/s 55716575.419op/s ± 178619.312op/s 55767573.881op/s ± 87491.979op/s 55817738.669op/s 55916403.005op/s 56017881.965op/s 56031034.601op/s 0.47% -1.608 4.337 0.32% 12630.293op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.321µs 10.425µs ± 0.061µs 10.415µs ± 0.039µs 10.457µs 10.543µs 10.622µs 10.657µs 2.32% 1.043 1.250 0.59% 0.004µs 1 200
normalization/normalize_name/normalize_name/good throughput 93836171.996op/s 95927279.004op/s ± 559455.552op/s 96013930.832op/s ± 358925.090op/s 96347147.630op/s 96632783.104op/s 96777366.179op/s 96893463.435op/s 0.92% -1.006 1.134 0.58% 39559.481op/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 [185.705µs; 185.749µs] or [-0.012%; +0.012%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [5383620.315op/s; 5384896.259op/s] or [-0.012%; +0.012%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [17.940µs; 17.956µs] or [-0.045%; +0.045%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [55691820.500op/s; 55741330.338op/s] or [-0.044%; +0.044%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.416µs; 10.433µs] or [-0.081%; +0.081%] None None None
normalization/normalize_name/normalize_name/good throughput [95849743.845op/s; 96004814.162op/s] or [-0.081%; +0.081%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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 90.948µs 91.129µs ± 0.233µs 91.098µs ± 0.058µs 91.160µs 91.321µs 91.464µs 94.101µs 3.30% 10.462 129.827 0.26% 0.017µ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 [91.096µs; 91.161µs] or [-0.036%; +0.036%] None None None

Group 16

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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 17.891µs 25.530µs ± 9.388µs 18.163µs ± 0.202µs 34.042µs 42.641µs 50.075µs 67.709µs 272.79% 0.952 0.652 36.68% 0.664µ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.229µs; 26.831µs] or [-5.096%; +5.096%] None None None

Group 17

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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.179µs 3.256µs ± 1.465µs 3.041µs ± 0.034µs 3.073µs 3.708µs 13.956µs 15.606µs 413.23% 7.378 55.738 44.90% 0.104µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [3.052µs; 3.459µs] or [-6.238%; +6.238%] None None None

Group 18

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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 534.130µs 535.334µs ± 0.707µs 535.151µs ± 0.303µs 535.552µs 536.759µs 537.803µs 539.422µs 0.80% 2.339 7.626 0.13% 0.050µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1853835.739op/s 1867994.575op/s ± 2460.508op/s 1868630.341op/s ± 1056.884op/s 1869418.891op/s 1870608.636op/s 1871072.886op/s 1872202.571op/s 0.19% -2.323 7.521 0.13% 173.984op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 380.932µs 381.654µs ± 0.270µs 381.659µs ± 0.175µs 381.829µs 382.054µs 382.215µs 382.931µs 0.33% 0.448 1.990 0.07% 0.019µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2611436.229op/s 2620174.682op/s ± 1849.734op/s 2620139.072op/s ± 1201.993op/s 2621350.432op/s 2623096.920op/s 2624212.336op/s 2625141.943op/s 0.19% -0.440 1.963 0.07% 130.796op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 189.882µs 190.287µs ± 0.203µs 190.262µs ± 0.114µs 190.387µs 190.640µs 190.918µs 191.401µs 0.60% 1.329 4.432 0.11% 0.014µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5224639.399op/s 5255216.007op/s ± 5608.781op/s 5255902.125op/s ± 3158.627op/s 5258591.933op/s 5263228.675op/s 5265599.762op/s 5266422.935op/s 0.20% -1.314 4.354 0.11% 396.601op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 37.364µs 37.526µs ± 0.070µs 37.523µs ± 0.044µs 37.561µs 37.648µs 37.688µs 37.724µs 0.53% 0.378 -0.156 0.19% 0.005µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26508528.567op/s 26648605.421op/s ± 49392.038op/s 26650177.398op/s ± 30933.067op/s 26685669.617op/s 26722560.099op/s 26741183.454op/s 26763439.867op/s 0.42% -0.368 -0.164 0.18% 3492.545op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 45.805µs 45.913µs ± 0.110µs 45.898µs ± 0.044µs 45.945µs 46.028µs 46.110µs 47.179µs 2.79% 7.784 86.210 0.24% 0.008µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21195806.151op/s 21780485.588op/s ± 51212.663op/s 21787217.564op/s ± 20928.902op/s 21806648.085op/s 21820231.874op/s 21829794.052op/s 21831677.764op/s 0.20% -7.588 83.155 0.23% 3621.282op/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 [535.236µs; 535.432µs] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1867653.573op/s; 1868335.578op/s] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [381.617µs; 381.691µs] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2619918.327op/s; 2620431.037op/s] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [190.259µs; 190.316µs] or [-0.015%; +0.015%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5254438.683op/s; 5255993.330op/s] or [-0.015%; +0.015%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [37.516µs; 37.535µs] or [-0.026%; +0.026%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [26641760.159op/s; 26655450.682op/s] or [-0.026%; +0.026%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [45.898µs; 45.928µs] or [-0.033%; +0.033%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21773388.005op/s; 21787583.170op/s] or [-0.033%; +0.033%] None None None

Group 19

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 682eca3 1772722779 lloeki/ruby-trace-exporter
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.131µs 34.493µs ± 0.563µs 34.255µs ± 0.051µs 34.365µs 35.529µs 35.591µs 38.665µs 12.87% 2.993 14.114 1.63% 0.040µ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.415µs; 34.571µs] or [-0.226%; +0.226%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 60.85106% with 184 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.22%. Comparing base (959c0cd) to head (682eca3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1661      +/-   ##
==========================================
- Coverage   71.24%   71.22%   -0.03%     
==========================================
  Files         427      428       +1     
  Lines       62805    63275     +470     
==========================================
+ Hits        44748    45065     +317     
- Misses      18057    18210     +153     
Components Coverage Δ
libdd-crashtracker 62.90% <ø> (ø)
libdd-crashtracker-ffi 15.63% <ø> (ø)
libdd-alloc 98.77% <ø> (ø)
libdd-data-pipeline 85.34% <60.85%> (-2.04%) ⬇️
libdd-data-pipeline-ffi 69.96% <60.85%> (-2.87%) ⬇️
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.36% <ø> (ø)
datdog-sidecar-ffi 12.41% <ø> (ø)
spawn-worker 54.69% <ø> (ø)
libdd-tinybytes 93.80% <ø> (+0.64%) ⬆️
libdd-trace-normalization 81.71% <ø> (ø)
libdd-trace-obfuscation 94.67% <ø> (ø)
libdd-trace-protobuf 68.00% <ø> (ø)
libdd-trace-utils 88.97% <ø> (ø)
datadog-tracer-flare 90.45% <ø> (ø)
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 5, 2026

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 97.32 MB 98.06 MB +.76% (+761.17 KB) 🔍
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 8.51 MB 8.57 MB +.73% (+64.00 KB) 🔍
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 112.92 MB 113.72 MB +.70% (+815.97 KB) 🔍
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.12 MB 11.21 MB +.76% (+86.96 KB) 🔍
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 27.16 MB 27.36 MB +.70% (+197.50 KB) 🔍
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 76.26 KB 81.97 KB +7.48% (+5.71 KB) 🚨
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 185.99 MB 187.19 MB +.64% (+1.19 MB) 🔍
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 916.65 MB 932.56 MB +1.73% (+15.91 MB) ⚠️
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 9.93 MB 10.04 MB +1.08% (+110.00 KB) ⚠️
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 76.26 KB 81.97 KB +7.48% (+5.71 KB) 🚨
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 24.76 MB 24.98 MB +.88% (+224.00 KB) 🔍
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 51.43 MB 51.88 MB +.87% (+460.38 KB) 🔍
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 22.97 MB 23.14 MB +.75% (+176.50 KB) 🔍
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 77.44 KB 83.26 KB +7.50% (+5.81 KB) 🚨
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 190.17 MB 191.44 MB +.66% (+1.27 MB) 🔍
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 900.31 MB 916.34 MB +1.78% (+16.03 MB) ⚠️
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 7.53 MB 7.60 MB +.97% (+75.00 KB) 🔍
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 77.44 KB 83.26 KB +7.50% (+5.81 KB) 🚨
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 26.52 MB 26.76 MB +.91% (+248.00 KB) 🔍
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 47.06 MB 47.47 MB +.87% (+424.01 KB) 🔍
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 85.27 MB 85.94 MB +.79% (+692.58 KB) 🔍
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 10.04 MB 10.12 MB +.73% (+76.00 KB) 🔍
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 105.90 MB 106.62 MB +.67% (+735.66 KB) 🔍
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.79 MB 11.88 MB +.77% (+94.01 KB) 🔍

@lloeki lloeki force-pushed the lloeki/ruby-trace-exporter branch from 81de782 to 682eca3 Compare March 5, 2026 15:17
Copy link
Contributor

@paullegranddc paullegranddc left a comment

Choose a reason for hiding this comment

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

The code is a bit verbose but LGTM overall

// Macros (local copies, matching trace_exporter.rs pattern)
// ---------------------------------------------------------------------------

macro_rules! gen_error {
Copy link
Contributor

Choose a reason for hiding this comment

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

There are better ways to share the defs than copying the macros, but I guess it doesn't matter if we're going to throw away the code

Copy link
Member Author

Choose a reason for hiding this comment

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

What would you suggest?

Comment on lines +335 to +336
out_low: &mut u64,
out_high: &mut u64,
Copy link
Contributor

Choose a reason for hiding this comment

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

The doc should point out that out_low and out_high should be initialized memory so people don't do this

uint64_t high, low;
// should be this so the refs are initialized
// uint64_t high = 0, low = 0;
ddog_tracer_span_get_trace_id(handle, &low, &high)

Comment on lines +240 to +242
// ---------------------------------------------------------------------------
// Span getters (for reading field values back to C / Ruby)
// ---------------------------------------------------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

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

will we need these?

Copy link
Member Author

Choose a reason for hiding this comment

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

I added those for some tests: https://github.com/DataDog/dd-trace-rb/pull/5422/changes#diff-41c54aacdd9cf0c9f8adf9d5610bda1b5abadf1a09e629ffb8ff3578b0b178b3R195

While full black box testing works, these help a lot to identify where and how things break.

From experience with libddwaf which lacked getters for the longest time and needed some gnarly gdb inspection, getters definitely come handy a lot at a minimum for logging/debugging/testing, even when unused in production codepaths.

I do think we might need them in the future in a couple of actual production codepath places but I'll have to check. Not an immediate need though.

///
/// Returns an error if the slice is not valid UTF-8.
#[inline]
fn charslice_to_bytesstring(s: CharSlice) -> Result<BytesString, Box<ExporterError>> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure BytesString is the right type here because it's kind of inneficient but this is a refactor for us common component rather than for you

Copy link
Member Author

Choose a reason for hiding this comment

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

As long as it doesn't structurally compromise a future evolution I'm fine with using something a bit slower.

Make it work, make it right, make it fast!

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.

3 participants