Skip to content

In-process log submission in sidecar (for appsec helper) #1051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cataphract
Copy link
Contributor

What does this PR do?

Adds a task for receiving telemetry log messages in process and a corresponding ffi function for sending them.

Motivation

The appsec helper (loaded in the sidecar process) at this point sends telemetry data by first sending it to the appsec php extension (via unix sockets), that then calls a ddtracer function to send them back to sidecar. This eliminates this roundtrip for telemetry log messages.

If the approach is validated, the same one will likely be taken for telemetry metrics.

How to test the change?

The only tests now are integration tests on the appsec side, in a PR that will link to. Let me know if I should include other tests.

@cataphract cataphract requested review from a team as code owners May 7, 2025 08:21
@cataphract cataphract force-pushed the glopes/in-process-log-submission-ffi branch from 293a4fc to c305218 Compare May 7, 2025 08:23
@pr-commenter
Copy link

pr-commenter bot commented May 7, 2025

Benchmarks

Comparison

Benchmark execution time: 2025-05-12 16:16:30

Comparing candidate commit 166dca5 in PR branch glopes/in-process-log-submission-ffi with baseline commit 6058321 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 52 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 166dca5 1747065873 glopes/in-process-log-submission-ffi
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.378µs 2.427µs ± 0.017µs 2.426µs ± 0.012µs 2.438µs 2.458µs 2.470µs 2.473µs 1.97% 0.292 0.258 0.70% 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.424µs; 2.429µs] or [-0.098%; +0.098%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 166dca5 1747065873 glopes/in-process-log-submission-ffi
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.888µs 3.913µs ± 0.004µs 3.913µs ± 0.002µs 3.914µs 3.918µs 3.921µs 3.923µs 0.26% -1.289 9.920 0.09% 0.000µs 1 200
credit_card/is_card_number/ throughput 254904086.354op/s 255591162.985op/s ± 235284.533op/s 255577100.294op/s ± 132867.778op/s 255744214.173op/s 255904461.054op/s 255968482.757op/s 257210601.343op/s 0.64% 1.317 10.128 0.09% 16637.129op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 81.699µs 82.079µs ± 0.205µs 82.054µs ± 0.135µs 82.213µs 82.420µs 82.608µs 82.985µs 1.14% 0.771 1.248 0.25% 0.015µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12050316.988op/s 12183427.444op/s ± 30415.700op/s 12187138.304op/s ± 20026.511op/s 12204643.867op/s 12227328.391op/s 12237668.538op/s 12240108.387op/s 0.43% -0.751 1.180 0.25% 2150.715op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 76.317µs 76.726µs ± 0.305µs 76.666µs ± 0.177µs 76.863µs 77.185µs 77.616µs 78.743µs 2.71% 2.257 9.955 0.40% 0.022µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 12699526.773op/s 13033605.777op/s ± 51398.892op/s 13043606.632op/s ± 30100.597op/s 13070983.732op/s 13087053.634op/s 13096005.224op/s 13103309.896op/s 0.46% -2.178 9.306 0.39% 3634.451op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.896µs 3.912µs ± 0.003µs 3.911µs ± 0.002µs 3.914µs 3.917µs 3.919µs 3.919µs 0.20% -0.350 4.031 0.07% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 255156461.523op/s 255631761.222op/s ± 186339.914op/s 255659555.894op/s ± 112607.440op/s 255759689.965op/s 255850489.152op/s 255971719.071op/s 256682558.691op/s 0.40% 0.363 4.098 0.07% 13176.222op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 71.795µs 72.187µs ± 0.287µs 72.103µs ± 0.190µs 72.350µs 72.694µs 72.864µs 73.629µs 2.12% 1.158 2.109 0.40% 0.020µs 1 200
credit_card/is_card_number/378282246310005 throughput 13581656.829op/s 13853184.156op/s ± 54859.206op/s 13869036.000op/s ± 36719.594op/s 13898403.082op/s 13914369.788op/s 13921955.539op/s 13928476.771op/s 0.43% -1.126 1.928 0.40% 3879.132op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 51.833µs 52.121µs ± 0.081µs 52.111µs ± 0.049µs 52.173µs 52.266µs 52.320µs 52.361µs 0.48% 0.296 0.566 0.15% 0.006µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 19098060.284op/s 19186260.008op/s ± 29727.347op/s 19189814.052op/s ± 18087.120op/s 19206392.368op/s 19227820.273op/s 19243175.085op/s 19292778.974op/s 0.54% -0.284 0.571 0.15% 2102.041op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.426µs 6.562µs ± 0.071µs 6.558µs ± 0.050µs 6.612µs 6.682µs 6.716µs 6.761µs 3.09% 0.251 -0.396 1.08% 0.005µs 1 200
credit_card/is_card_number/x371413321323331 throughput 147915275.298op/s 152408437.110op/s ± 1651516.701op/s 152487256.906op/s ± 1160104.729op/s 153631901.105op/s 155297314.718op/s 155504626.606op/s 155626629.600op/s 2.06% -0.201 -0.439 1.08% 116779.866op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.891µs 3.912µs ± 0.003µs 3.912µs ± 0.002µs 3.914µs 3.917µs 3.920µs 3.929µs 0.43% -0.311 8.130 0.09% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 254519031.693op/s 255615800.331op/s ± 222907.470op/s 255616988.392op/s ± 137065.228op/s 255762297.316op/s 255881834.771op/s 255967313.380op/s 256976556.743op/s 0.53% 0.338 8.209 0.09% 15761.938op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 64.160µs 64.268µs ± 0.091µs 64.248µs ± 0.040µs 64.291µs 64.460µs 64.600µs 64.666µs 0.65% 2.103 5.065 0.14% 0.006µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15464121.404op/s 15559791.621op/s ± 22044.929op/s 15564669.757op/s ± 9775.859op/s 15574166.740op/s 15580284.553op/s 15583739.381op/s 15586078.515op/s 0.14% -2.092 5.010 0.14% 1558.812op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 58.147µs 58.259µs ± 0.122µs 58.231µs ± 0.037µs 58.272µs 58.484µs 58.673µs 59.282µs 1.81% 4.382 27.702 0.21% 0.009µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 16868501.888op/s 17164926.466op/s ± 35546.073op/s 17173065.764op/s ± 10906.766op/s 17183057.077op/s 17192925.112op/s 17196934.217op/s 17197755.693op/s 0.14% -4.317 26.920 0.21% 2513.487op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.893µs 3.913µs ± 0.003µs 3.912µs ± 0.002µs 3.914µs 3.918µs 3.920µs 3.930µs 0.46% 0.096 7.293 0.09% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 254432713.597op/s 255583757.991op/s ± 222963.921op/s 255602824.418op/s ± 118150.199op/s 255714988.638op/s 255887996.824op/s 255936211.459op/s 256850115.196op/s 0.49% -0.071 7.329 0.09% 15765.930op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 54.543µs 54.782µs ± 0.248µs 54.671µs ± 0.067µs 54.893µs 55.191µs 55.565µs 56.039µs 2.50% 1.853 3.945 0.45% 0.018µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 17844746.609op/s 18254388.588op/s ± 81904.564op/s 18291229.356op/s ± 22445.465op/s 18306993.730op/s 18325934.863op/s 18330234.953op/s 18334015.098op/s 0.23% -1.819 3.737 0.45% 5791.527op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 51.855µs 52.103µs ± 0.088µs 52.094µs ± 0.054µs 52.160µs 52.239µs 52.352µs 52.389µs 0.57% 0.302 0.716 0.17% 0.006µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 19087978.381op/s 19192797.254op/s ± 32375.366op/s 19196121.425op/s ± 19949.937op/s 19213408.558op/s 19247374.623op/s 19263323.948op/s 19284570.556op/s 0.46% -0.288 0.704 0.17% 2289.284op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.428µs 6.560µs ± 0.069µs 6.555µs ± 0.044µs 6.595µs 6.679µs 6.717µs 6.762µs 3.16% 0.303 -0.249 1.06% 0.005µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 147881805.443op/s 152466964.833op/s ± 1609713.591op/s 152553797.459op/s ± 1033328.821op/s 153596274.786op/s 155053410.811op/s 155510178.421op/s 155559879.516op/s 1.97% -0.251 -0.301 1.05% 113823.940op/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.013%; +0.013%] None None None
credit_card/is_card_number/ throughput [255558554.812op/s; 255623771.159op/s] or [-0.013%; +0.013%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [82.051µs; 82.108µs] or [-0.035%; +0.035%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12179212.120op/s; 12187642.767op/s] or [-0.035%; +0.035%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [76.684µs; 76.768µs] or [-0.055%; +0.055%] None None None
credit_card/is_card_number/ 378282246310005 throughput [13026482.385op/s; 13040729.169op/s] or [-0.055%; +0.055%] None None None
credit_card/is_card_number/37828224631 execution_time [3.911µs; 3.912µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/37828224631 throughput [255605936.302op/s; 255657586.142op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/378282246310005 execution_time [72.147µs; 72.226µs] or [-0.055%; +0.055%] None None None
credit_card/is_card_number/378282246310005 throughput [13845581.198op/s; 13860787.114op/s] or [-0.055%; +0.055%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [52.110µs; 52.132µs] or [-0.021%; +0.021%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [19182140.084op/s; 19190379.933op/s] or [-0.021%; +0.021%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.552µs; 6.572µs] or [-0.151%; +0.151%] None None None
credit_card/is_card_number/x371413321323331 throughput [152179552.778op/s; 152637321.441op/s] or [-0.150%; +0.150%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.912µs; 3.913µs] or [-0.012%; +0.012%] None None None
credit_card/is_card_number_no_luhn/ throughput [255584907.499op/s; 255646693.162op/s] or [-0.012%; +0.012%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [64.256µs; 64.281µs] or [-0.020%; +0.020%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15556736.406op/s; 15562846.837op/s] or [-0.020%; +0.020%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [58.242µs; 58.275µs] or [-0.029%; +0.029%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [17160000.122op/s; 17169852.810op/s] or [-0.029%; +0.029%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.912µs; 3.913µs] or [-0.012%; +0.012%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255552857.336op/s; 255614658.647op/s] or [-0.012%; +0.012%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [54.748µs; 54.817µs] or [-0.063%; +0.063%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [18243037.403op/s; 18265739.773op/s] or [-0.062%; +0.062%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [52.091µs; 52.115µs] or [-0.023%; +0.023%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [19188310.340op/s; 19197284.168op/s] or [-0.023%; +0.023%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.550µs; 6.569µs] or [-0.147%; +0.147%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [152243874.011op/s; 152690055.655op/s] or [-0.146%; +0.146%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 166dca5 1747065873 glopes/in-process-log-submission-ffi
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 215.719µs 216.126µs ± 0.214µs 216.093µs ± 0.132µs 216.231µs 216.526µs 216.738µs 216.839µs 0.35% 0.891 0.776 0.10% 0.015µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 4611717.135op/s 4626941.471op/s ± 4582.594op/s 4627635.339op/s ± 2818.028op/s 4630083.451op/s 4633204.276op/s 4634127.917op/s 4635669.490op/s 0.17% -0.885 0.763 0.10% 324.038op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 19.753µs 19.862µs ± 0.061µs 19.850µs ± 0.040µs 19.896µs 19.971µs 20.020µs 20.063µs 1.07% 0.792 0.336 0.31% 0.004µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 49844013.798op/s 50347368.383op/s ± 154874.323op/s 50378332.667op/s ± 101388.703op/s 50463640.089op/s 50549241.272op/s 50595673.996op/s 50625988.180op/s 0.49% -0.777 0.302 0.31% 10951.268op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 12.002µs 12.148µs ± 0.102µs 12.134µs ± 0.032µs 12.171µs 12.260µs 12.307µs 13.327µs 9.83% 7.733 86.201 0.84% 0.007µs 1 200
normalization/normalize_name/normalize_name/good throughput 75038237.258op/s 82323738.029op/s ± 653012.433op/s 82415972.732op/s ± 219450.459op/s 82597271.210op/s 82961841.442op/s 83223027.963op/s 83317928.196op/s 1.09% -7.040 75.710 0.79% 46174.952op/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 [216.096µs; 216.155µs] or [-0.014%; +0.014%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [4626306.368op/s; 4627576.575op/s] or [-0.014%; +0.014%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [19.854µs; 19.871µs] or [-0.043%; +0.043%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [50325904.292op/s; 50368832.475op/s] or [-0.043%; +0.043%] None None None
normalization/normalize_name/normalize_name/good execution_time [12.134µs; 12.162µs] or [-0.117%; +0.117%] None None None
normalization/normalize_name/normalize_name/good throughput [82233236.787op/s; 82414239.272op/s] or [-0.110%; +0.110%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 166dca5 1747065873 glopes/in-process-log-submission-ffi
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 250.627ns 261.343ns ± 11.139ns 255.324ns ± 2.023ns 267.478ns 286.356ns 290.448ns 291.668ns 14.23% 1.302 0.342 4.25% 0.788ns 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 [259.799ns; 262.886ns] or [-0.591%; +0.591%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 166dca5 1747065873 glopes/in-process-log-submission-ffi
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 72.057ms 73.019ms ± 0.654ms 72.958ms ± 0.093ms 73.068ms 73.306ms 74.026ms 80.797ms 10.74% 9.315 102.895 0.89% 0.046ms 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 [72.928ms; 73.110ms] or [-0.124%; +0.124%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 166dca5 1747065873 glopes/in-process-log-submission-ffi
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.896µs 535.843µs ± 0.594µs 535.821µs ± 0.315µs 536.106µs 536.659µs 536.908µs 540.510µs 0.88% 3.271 21.733 0.11% 0.042µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1850104.330op/s 1866220.254op/s ± 2061.693op/s 1866294.798op/s ± 1097.398op/s 1867509.639op/s 1868779.082op/s 1869276.381op/s 1869521.066op/s 0.17% -3.228 21.322 0.11% 145.784op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 450.623µs 451.350µs ± 0.886µs 451.251µs ± 0.223µs 451.489µs 451.981µs 452.385µs 462.712µs 2.54% 10.635 133.598 0.20% 0.063µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2161173.163op/s 2215582.913op/s ± 4261.479op/s 2216059.484op/s ± 1094.776op/s 2217058.386op/s 2218437.519op/s 2218972.680op/s 2219149.686op/s 0.14% -10.502 131.317 0.19% 301.332op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 185.210µs 185.790µs ± 0.302µs 185.798µs ± 0.225µs 186.016µs 186.282µs 186.413µs 186.563µs 0.41% 0.107 -0.767 0.16% 0.021µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5360130.412op/s 5382436.178op/s ± 8734.008op/s 5382194.329op/s ± 6528.246op/s 5389183.780op/s 5395974.701op/s 5397915.134op/s 5399283.785op/s 0.32% -0.101 -0.771 0.16% 617.588op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 40.184µs 40.375µs ± 0.073µs 40.372µs ± 0.051µs 40.425µs 40.500µs 40.539µs 40.613µs 0.60% 0.247 -0.026 0.18% 0.005µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 24622453.288op/s 24767583.411op/s ± 44593.653op/s 24769468.071op/s ± 31236.856op/s 24800476.316op/s 24828776.371op/s 24866691.635op/s 24885343.357op/s 0.47% -0.237 -0.033 0.18% 3153.247op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 46.542µs 46.675µs ± 0.126µs 46.662µs ± 0.040µs 46.703µs 46.784µs 46.830µs 48.241µs 3.38% 9.731 118.401 0.27% 0.009µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 20729173.120op/s 21425066.813op/s ± 56310.460op/s 21430582.911op/s ± 18453.352op/s 21448813.100op/s 21466795.764op/s 21479963.307op/s 21485824.426op/s 0.26% -9.525 114.957 0.26% 3981.751op/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.761µs; 535.925µs] or [-0.015%; +0.015%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1865934.523op/s; 1866505.985op/s] or [-0.015%; +0.015%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [451.227µs; 451.473µs] or [-0.027%; +0.027%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2214992.313op/s; 2216173.513op/s] or [-0.027%; +0.027%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [185.748µs; 185.832µs] or [-0.022%; +0.022%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5381225.729op/s; 5383646.628op/s] or [-0.022%; +0.022%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [40.365µs; 40.386µs] or [-0.025%; +0.025%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [24761403.160op/s; 24773763.663op/s] or [-0.025%; +0.025%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [46.657µs; 46.692µs] or [-0.037%; +0.037%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21417262.724op/s; 21432870.901op/s] or [-0.036%; +0.036%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 166dca5 1747065873 glopes/in-process-log-submission-ffi
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 65.816µs 66.044µs ± 0.192µs 66.027µs ± 0.074µs 66.104µs 66.184µs 66.306µs 68.195µs 3.28% 7.669 79.420 0.29% 0.014µ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 [66.017µs; 66.071µs] or [-0.040%; +0.040%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 166dca5 1747065873 glopes/in-process-log-submission-ffi
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 5.073µs 5.144µs ± 0.038µs 5.154µs ± 0.031µs 5.172µs 5.199µs 5.209µs 5.242µs 1.71% -0.081 -1.039 0.73% 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.139µs; 5.149µs] or [-0.101%; +0.101%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 166dca5 1747065873 glopes/in-process-log-submission-ffi
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.855µs 26.052µs ± 11.264µs 18.317µs ± 0.227µs 35.343µs 45.034µs 52.763µs 98.234µs 436.29% 2.028 8.016 43.13% 0.796µ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.491µs; 27.613µs] or [-5.992%; +5.992%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 166dca5 1747065873 glopes/in-process-log-submission-ffi
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.225µs 3.144µs ± 1.420µs 2.981µs ± 0.025µs 3.003µs 3.139µs 13.912µs 14.911µs 400.12% 7.526 57.004 45.06% 0.100µ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.947µs; 3.341µs] or [-6.260%; +6.260%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 166dca5 1747065873 glopes/in-process-log-submission-ffi
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 5.920ms 5.933ms ± 0.009ms 5.931ms ± 0.005ms 5.936ms 5.943ms 5.973ms 6.009ms 1.31% 3.924 26.213 0.15% 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 [5.931ms; 5.934ms] or [-0.021%; +0.021%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 166dca5 1747065873 glopes/in-process-log-submission-ffi
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 33.627µs 34.249µs ± 1.075µs 33.753µs ± 0.062µs 33.862µs 36.566µs 36.611µs 37.342µs 10.63% 1.698 0.955 3.13% 0.076µ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.100µs; 34.398µs] or [-0.435%; +0.435%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 166dca5 1747065873 glopes/in-process-log-submission-ffi
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 148.712µs 149.585µs ± 0.348µs 149.562µs ± 0.230µs 149.815µs 150.115µs 150.355µs 151.161µs 1.07% 0.446 1.365 0.23% 0.025µ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 [149.537µs; 149.634µs] or [-0.032%; +0.032%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

codecov-commenter commented May 7, 2025

Codecov Report

Attention: Patch coverage is 0% with 190 lines in your changes missing coverage. Please review.

Project coverage is 70.81%. Comparing base (6058321) to head (166dca5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1051      +/-   ##
==========================================
- Coverage   71.19%   70.81%   -0.38%     
==========================================
  Files         322      324       +2     
  Lines       49254    49450     +196     
==========================================
- Hits        35067    35019      -48     
- Misses      14187    14431     +244     
Components Coverage Δ
datadog-crashtracker 42.45% <ø> (+0.02%) ⬆️
datadog-crashtracker-ffi 6.30% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 90.48% <ø> (-0.34%) ⬇️
data-pipeline-ffi 89.26% <ø> (ø)
ddcommon 78.28% <ø> (ø)
ddcommon-ffi 66.37% <ø> (ø)
ddtelemetry 60.56% <ø> (ø)
ddtelemetry-ffi 21.32% <ø> (ø)
dogstatsd-client 83.26% <ø> (ø)
datadog-ipc 82.68% <ø> (+0.10%) ⬆️
datadog-profiling 77.49% <ø> (ø)
datadog-profiling-ffi 62.12% <ø> (ø)
datadog-sidecar 40.19% <0.00%> (-2.45%) ⬇️
datdog-sidecar-ffi 4.96% <ø> (-7.89%) ⬇️
spawn-worker 54.37% <ø> (ø)
tinybytes 88.94% <ø> (ø)
datadog-trace-normalization 98.24% <ø> (ø)
datadog-trace-obfuscation 94.16% <ø> (ø)
datadog-trace-protobuf 77.10% <ø> (ø)
datadog-trace-utils 89.44% <ø> (+0.16%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@r1viollet
Copy link
Contributor

r1viollet commented May 7, 2025

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 66.02 MB 66.03 MB +0% (+3.59 KB) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so.debug 20.31 MB 20.31 MB +.01% (+2.25 KB) 🔍
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 8.03 MB 8.03 MB +0% (+224 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so.debug 22.70 MB 22.70 MB +.02% (+4.71 KB) 🔍
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 72.62 MB 72.62 MB +0% (+2.17 KB) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 8.00 MB 8.00 MB -0% (-208 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 16.71 MB 16.70 MB --.03% (-5.50 KB) 💪
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 62.31 KB 62.31 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 112.66 MB 112.64 MB --.02% (-24.00 KB) 💪
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 631.94 MB 632.51 MB +.09% (+589.63 KB) 🔍
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 4.99 MB 4.99 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 62.31 KB 62.31 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 15.88 MB 15.88 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 26.43 MB 26.43 MB +0% (+1.64 KB) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 14.15 MB 14.15 MB --.01% (-1.50 KB) 💪
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 63.26 KB 63.26 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 114.51 MB 114.52 MB +0% (+8.00 KB) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 624.51 MB 625.19 MB +.10% (+695.07 KB) 🔍
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 3.78 MB 3.78 MB +.01% (+512 B) 🔍
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 63.26 KB 63.26 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 16.50 MB 16.50 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 24.34 MB 24.35 MB +.03% (+7.83 KB) 🔍
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 57.50 MB 57.51 MB +.02% (+13.39 KB) 🔍
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.43 MB 8.43 MB +0% (+592 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so.debug 18.71 MB 18.71 MB +.04% (+8.11 KB) 🔍
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 68.60 MB 68.59 MB --.01% (-8.64 KB) 💪
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 8.43 MB 8.43 MB -0% (-200 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so.debug 20.90 MB 20.89 MB --.01% (-4.00 KB) 💪

@cataphract cataphract force-pushed the glopes/in-process-log-submission-ffi branch from 175db0d to 166dca5 Compare May 12, 2025 16:04
@Anilm3 Anilm3 requested a review from Copilot May 12, 2025 16:14
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements in-process log submission within the sidecar to eliminate an extra roundtrip between the appsec helper and the PHP extension. Key changes include adding FFI functions for telemetry log submission, introducing an in-process telemetry action receiver task, and minor visibility adjustments in internal modules.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
datadog-sidecar/src/windows.rs Added cbindgen ignore comment for FFI symbol export
datadog-sidecar/src/unix.rs Added cbindgen ignore comment for FFI symbol export
datadog-sidecar/src/shm_remote_config.rs Added cbindgen ignore comment for an unsafe FFI function
datadog-sidecar/src/service/telemetry/mod.rs Reorganized telemetry modules and re-exported in-process receiver functions
datadog-sidecar/src/service/telemetry/in_proc_receiver.rs Introduced asynchronous in-process telemetry action receiver task
datadog-sidecar/src/service/telemetry/ffi.rs Added new FFI functionality for enqueuing telemetry log actions
datadog-sidecar/src/service/sidecar_server.rs Adjusted visibility modifiers for internal fields and methods
datadog-sidecar/src/service/queue_id.rs Adjusted visibility for the inner field of QueueId
datadog-sidecar/src/entry.rs Spawned telemetry action receiver task during sidecar startup
datadog-sidecar/include/sidecar_ffi.h Updated autogenerated FFI header
datadog-sidecar/cbindgen.toml Added configuration for cbindgen
datadog-sidecar/Cargo.toml Added build dependency for cbindgen
Comments suppressed due to low confidence (1)

datadog-sidecar/src/service/telemetry/ffi.rs:159

  • Typo in field name 'indentifier'; consider renaming it to 'identifier' for clarity.
        indentifier: hasher.finish(),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants