Skip to content

feat(sidecar): implement thread listener module#1447

Open
Leiyks wants to merge 14 commits intomainfrom
leiyks/sidecar-threaded-fallback
Open

feat(sidecar): implement thread listener module#1447
Leiyks wants to merge 14 commits intomainfrom
leiyks/sidecar-threaded-fallback

Conversation

@Leiyks
Copy link
Contributor

@Leiyks Leiyks commented Jan 14, 2026

What does this PR do?

A brief description of the change being made with this pull request.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

How to test the change?

Describe here in detail how the change can be validated.

@codecov-commenter
Copy link

codecov-commenter commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 5.44747% with 243 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.78%. Comparing base (8fb3175) to head (a66093e).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1447      +/-   ##
==========================================
- Coverage   71.19%   70.78%   -0.41%     
==========================================
  Files         425      428       +3     
  Lines       62666    63224     +558     
==========================================
+ Hits        44615    44755     +140     
- Misses      18051    18469     +418     
Components Coverage Δ
libdd-crashtracker 62.29% <ø> (-0.77%) ⬇️
libdd-crashtracker-ffi 16.09% <ø> (+0.46%) ⬆️
libdd-alloc 98.77% <ø> (ø)
libdd-data-pipeline 87.82% <ø> (+0.44%) ⬆️
libdd-data-pipeline-ffi 75.36% <ø> (+2.52%) ⬆️
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.29% <58.33%> (-0.45%) ⬇️
libdd-profiling 81.60% <ø> (-0.01%) ⬇️
libdd-profiling-ffi 63.65% <ø> (ø)
datadog-sidecar 31.81% <2.85%> (-1.64%) ⬇️
datdog-sidecar-ffi 9.39% <0.00%> (-3.02%) ⬇️
spawn-worker 54.69% <ø> (ø)
libdd-tinybytes 93.16% <ø> (ø)
libdd-trace-normalization 81.71% <ø> (ø)
libdd-trace-obfuscation 94.69% <ø> (+0.01%) ⬆️
libdd-trace-protobuf 68.25% <ø> (+0.25%) ⬆️
libdd-trace-utils 88.98% <ø> (+<0.01%) ⬆️
datadog-tracer-flare 86.86% <ø> (-3.59%) ⬇️
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.

@Leiyks Leiyks force-pushed the leiyks/sidecar-threaded-fallback branch from df12cb3 to 917aceb Compare January 14, 2026 14:11
@pr-commenter
Copy link

pr-commenter bot commented Jan 14, 2026

Benchmarks

Comparison

Benchmark execution time: 2026-03-09 16:49:15

Comparing candidate commit a66093e in PR branch leiyks/sidecar-threaded-fallback with baseline commit 79f879e in branch main.

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

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:benching serializing traces from their internal representation to msgpack

  • 🟥 execution_time [+827.747µs; +841.048µs] or [+5.886%; +5.980%]

scenario:single_flag_killswitch/rules-based

  • 🟩 execution_time [-9.085ns; -8.232ns] or [-4.555%; -4.128%]

scenario:sql/obfuscate_sql_string

  • 🟥 execution_time [+3.670µs; +3.732µs] or [+4.246%; +4.318%]

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 a66093e 1773073710 leiyks/sidecar-threaded-fallback
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.868µs 90.130µs ± 0.162µs 90.117µs ± 0.063µs 90.182µs 90.269µs 90.432µs 91.918µs 2.00% 6.795 72.695 0.18% 0.011µ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 [90.107µs; 90.152µs] or [-0.025%; +0.025%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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.258µs 3.145µs ± 1.404µs 2.975µs ± 0.025µs 3.000µs 3.322µs 13.557µs 14.910µs 401.18% 7.542 57.360 44.51% 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.951µs; 3.340µs] or [-6.185%; +6.185%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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.798µs 34.474µs ± 1.097µs 34.000µs ± 0.093µs 34.085µs 36.818µs 36.857µs 37.868µs 11.38% 1.693 0.985 3.17% 0.078µ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.322µs; 34.627µs] or [-0.441%; +0.441%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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.471µs 186.095µs ± 0.404µs 186.056µs ± 0.229µs 186.265µs 186.738µs 187.028µs 189.296µs 1.74% 2.854 18.393 0.22% 0.029µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 5282739.481op/s 5373618.858op/s ± 11583.911op/s 5374720.473op/s ± 6608.574op/s 5382195.959op/s 5386340.272op/s 5387806.722op/s 5391668.309op/s 0.32% -2.776 17.576 0.22% 819.106op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 17.850µs 17.943µs ± 0.049µs 17.934µs ± 0.033µs 17.976µs 18.026µs 18.071µs 18.152µs 1.22% 0.766 0.818 0.27% 0.003µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 55090348.171op/s 55731594.604op/s ± 152413.029op/s 55759865.310op/s ± 101388.488op/s 55842406.168op/s 55944171.668op/s 56004787.448op/s 56022619.957op/s 0.47% -0.748 0.758 0.27% 10777.229op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.250µs 10.344µs ± 0.113µs 10.330µs ± 0.023µs 10.356µs 10.411µs 10.472µs 11.832µs 14.54% 11.579 149.953 1.09% 0.008µs 1 200
normalization/normalize_name/normalize_name/good throughput 84514400.742op/s 96687654.114op/s ± 939547.586op/s 96801694.044op/s ± 212296.204op/s 97000142.102op/s 97243880.089op/s 97479777.896op/s 97559461.383op/s 0.78% -10.984 139.424 0.97% 66436.047op/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.039µs; 186.151µs] or [-0.030%; +0.030%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [5372013.439op/s; 5375224.276op/s] or [-0.030%; +0.030%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [17.936µs; 17.950µs] or [-0.038%; +0.038%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [55710471.624op/s; 55752717.584op/s] or [-0.038%; +0.038%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.328µs; 10.359µs] or [-0.151%; +0.151%] None None None
normalization/normalize_name/normalize_name/good throughput [96557441.854op/s; 96817866.373op/s] or [-0.135%; +0.135%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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.413µs 2.452µs ± 0.018µs 2.451µs ± 0.013µs 2.464µs 2.490µs 2.498µs 2.514µs 2.54% 0.668 0.301 0.73% 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.450µs; 2.455µs] or [-0.101%; +0.101%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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.448µs 146.219µs ± 1.742µs 145.961µs ± 0.522µs 146.488µs 147.996µs 151.242µs 162.898µs 11.60% 6.331 51.960 1.19% 0.123µ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 [145.977µs; 146.460µs] or [-0.165%; +0.165%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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.415ns 190.773ns ± 2.014ns 190.619ns ± 1.384ns 191.561ns 194.962ns 197.284ns 198.644ns 4.21% 1.257 1.775 1.05% 0.142ns 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.494ns; 191.052ns] or [-0.146%; +0.146%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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.707ms ± 0.015ms 10.706ms ± 0.009ms 10.714ms 10.728ms 10.739ms 10.788ms 0.77% 1.443 6.467 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.705ms; 10.709ms] or [-0.020%; +0.020%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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 160.841µs 161.414µs ± 0.297µs 161.370µs ± 0.118µs 161.506µs 161.778µs 162.300µs 164.114µs 1.70% 4.323 34.141 0.18% 0.021µ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 [161.373µs; 161.456µ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 a66093e 1773073710 leiyks/sidecar-threaded-fallback
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.002µs 5.070µs ± 0.043µs 5.076µs ± 0.036µs 5.109µs 5.136µs 5.148µs 5.151µs 1.47% 0.069 -1.292 0.85% 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.064µs; 5.076µs] or [-0.118%; +0.118%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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 533.993µs 534.813µs ± 0.822µs 534.742µs ± 0.243µs 535.012µs 535.354µs 536.212µs 544.969µs 1.91% 9.626 115.308 0.15% 0.058µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1834967.552op/s 1869817.627op/s ± 2831.381op/s 1870060.908op/s ± 849.408op/s 1870836.924op/s 1871934.621op/s 1872575.935op/s 1872684.962op/s 0.14% -9.513 113.399 0.15% 200.209op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 380.059µs 380.767µs ± 0.312µs 380.734µs ± 0.200µs 380.947µs 381.353µs 381.605µs 382.024µs 0.34% 0.712 1.073 0.08% 0.022µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2617638.376op/s 2626276.953op/s ± 2153.513op/s 2626508.044op/s ± 1377.452op/s 2627622.857op/s 2629360.688op/s 2630248.830op/s 2631173.735op/s 0.18% -0.706 1.058 0.08% 152.276op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 190.170µs 190.501µs ± 0.158µs 190.477µs ± 0.112µs 190.606µs 190.771µs 190.862µs 191.186µs 0.37% 0.503 0.915 0.08% 0.011µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5230500.794op/s 5249322.974op/s ± 4354.601op/s 5249972.387op/s ± 3079.232op/s 5252243.898op/s 5255805.479op/s 5257921.714op/s 5258450.836op/s 0.16% -0.497 0.895 0.08% 307.917op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 37.333µs 37.551µs ± 0.069µs 37.550µs ± 0.047µs 37.596µs 37.668µs 37.706µs 37.746µs 0.52% 0.000 0.084 0.18% 0.005µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26493144.978op/s 26630829.767op/s ± 48790.611op/s 26631257.666op/s ± 33639.261op/s 26666295.244op/s 26711121.817op/s 26744893.317op/s 26786273.757op/s 0.58% 0.011 0.087 0.18% 3450.017op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 45.709µs 45.898µs ± 0.046µs 45.894µs ± 0.025µs 45.921µs 45.976µs 46.024µs 46.037µs 0.31% 0.274 1.436 0.10% 0.003µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21721842.157op/s 21787416.414op/s ± 21630.681op/s 21789480.451op/s ± 11850.996op/s 21800651.452op/s 21816524.557op/s 21830664.725op/s 21877396.638op/s 0.40% -0.264 1.448 0.10% 1529.520op/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 [534.699µs; 534.927µs] or [-0.021%; +0.021%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1869425.225op/s; 1870210.029op/s] or [-0.021%; +0.021%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [380.724µs; 380.811µs] or [-0.011%; +0.011%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2625978.497op/s; 2626575.409op/s] or [-0.011%; +0.011%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [190.479µs; 190.523µs] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5248719.468op/s; 5249926.480op/s] or [-0.011%; +0.011%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [37.541µs; 37.560µs] or [-0.025%; +0.025%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [26624067.857op/s; 26637591.676op/s] or [-0.025%; +0.025%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [45.892µs; 45.904µs] or [-0.014%; +0.014%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21784418.610op/s; 21790414.218op/s] or [-0.014%; +0.014%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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 730.563µs 731.577µs ± 0.435µs 731.528µs ± 0.223µs 731.745µs 732.474µs 732.668µs 733.175µs 0.23% 0.769 0.797 0.06% 0.031µ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 [731.517µs; 731.638µs] or [-0.008%; +0.008%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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.922µs 25.388µs ± 9.143µs 18.271µs ± 0.274µs 33.178µs 42.781µs 43.611µs 66.465µs 263.78% 0.933 0.508 35.92% 0.647µ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.121µs; 26.656µs] or [-4.991%; +4.991%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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 49.425ms 49.720ms ± 1.359ms 49.535ms ± 0.047ms 49.585ms 49.720ms 59.516ms 61.720ms 24.60% 7.989 62.638 2.73% 0.096ms 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.531ms; 49.908ms] or [-0.379%; +0.379%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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.115ms 3.138ms ± 0.016ms 3.135ms ± 0.007ms 3.142ms 3.165ms 3.192ms 3.248ms 3.58% 3.136 16.668 0.49% 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.136ms; 3.140ms] or [-0.069%; +0.069%] None None None

Group 16

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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.895µs 3.912µs ± 0.003µs 3.913µs ± 0.002µs 3.914µs 3.916µs 3.918µs 3.920µs 0.19% -1.182 7.254 0.07% 0.000µs 1 200
credit_card/is_card_number/ throughput 255108816.141op/s 255598280.935op/s ± 177688.430op/s 255586464.902op/s ± 104365.009op/s 255695191.318op/s 255859295.614op/s 255954575.070op/s 256733604.972op/s 0.45% 1.199 7.362 0.07% 12564.469op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 79.455µs 79.761µs ± 0.193µs 79.732µs ± 0.103µs 79.834µs 80.079µs 80.405µs 80.734µs 1.26% 1.695 4.638 0.24% 0.014µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12386356.409op/s 12537456.875op/s ± 30258.909op/s 12542000.152op/s ± 16131.348op/s 12558219.125op/s 12571879.722op/s 12581377.146op/s 12585801.957op/s 0.35% -1.668 4.493 0.24% 2139.628op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 72.929µs 73.228µs ± 0.156µs 73.205µs ± 0.087µs 73.298µs 73.536µs 73.633µs 73.910µs 0.96% 1.009 1.626 0.21% 0.011µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13529944.829op/s 13656035.625op/s ± 29000.237op/s 13660244.593op/s ± 16320.612op/s 13676520.492op/s 13694105.921op/s 13709562.063op/s 13712055.639op/s 0.38% -0.992 1.568 0.21% 2050.626op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.896µs 3.912µs ± 0.003µs 3.911µs ± 0.001µs 3.913µs 3.916µs 3.918µs 3.926µs 0.36% -0.010 7.504 0.07% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 254741636.489op/s 255644938.139op/s ± 181543.803op/s 255667146.772op/s ± 96757.615op/s 255744653.017op/s 255873534.723op/s 255953750.287op/s 256698840.860op/s 0.40% 0.031 7.546 0.07% 12837.085op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 69.803µs 70.094µs ± 0.136µs 70.071µs ± 0.096µs 70.183µs 70.323µs 70.445µs 70.518µs 0.64% 0.537 0.064 0.19% 0.010µs 1 200
credit_card/is_card_number/378282246310005 throughput 14180822.946op/s 14266572.790op/s ± 27580.903op/s 14271151.581op/s ± 19478.769op/s 14286457.510op/s 14304786.241op/s 14314975.784op/s 14326090.676op/s 0.38% -0.527 0.047 0.19% 1950.264op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 52.141µs 52.211µs ± 0.035µs 52.208µs ± 0.022µs 52.232µs 52.273µs 52.295µs 52.396µs 0.36% 0.948 2.807 0.07% 0.003µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 19085424.471op/s 19152920.759op/s ± 12986.750op/s 19153998.799op/s ± 7985.769op/s 19161713.937op/s 19171419.153op/s 19176902.591op/s 19178749.945op/s 0.13% -0.940 2.768 0.07% 918.302op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 5.771µs 5.899µs ± 0.052µs 5.895µs ± 0.033µs 5.929µs 5.996µs 6.003µs 6.032µs 2.32% 0.118 -0.332 0.87% 0.004µs 1 200
credit_card/is_card_number/x371413321323331 throughput 165777074.655op/s 169544551.758op/s ± 1484392.001op/s 169627148.593op/s ± 955548.340op/s 170586914.296op/s 171704137.309op/s 172735590.675op/s 173294180.170op/s 2.16% -0.074 -0.333 0.87% 104962.365op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.893µs 3.912µs ± 0.003µs 3.912µs ± 0.001µs 3.914µs 3.916µs 3.918µs 3.919µs 0.18% -1.802 14.712 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 255142259.022op/s 255605823.466op/s ± 167042.218op/s 255612976.563op/s ± 92258.185op/s 255702883.053op/s 255817494.433op/s 255922468.588op/s 256864933.848op/s 0.49% 1.828 14.937 0.07% 11811.669op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 64.158µs 64.265µs ± 0.056µs 64.257µs ± 0.030µs 64.288µs 64.373µs 64.448µs 64.520µs 0.41% 1.267 2.680 0.09% 0.004µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15499019.240op/s 15560680.198op/s ± 13631.638op/s 15562391.924op/s ± 7154.645op/s 15568944.626op/s 15578948.562op/s 15583691.760op/s 15586461.599op/s 0.15% -1.259 2.649 0.09% 963.902op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 57.408µs 57.537µs ± 0.096µs 57.514µs ± 0.045µs 57.573µs 57.737µs 57.874µs 58.011µs 0.86% 1.793 4.311 0.17% 0.007µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 17238104.890op/s 17380150.672op/s ± 29062.672op/s 17386983.235op/s ± 13589.554op/s 17399017.825op/s 17413664.939op/s 17418323.606op/s 17419168.053op/s 0.19% -1.778 4.230 0.17% 2055.041op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.892µs 3.914µs ± 0.003µs 3.914µs ± 0.002µs 3.916µs 3.918µs 3.920µs 3.921µs 0.17% -1.509 9.014 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 255032681.486op/s 255497858.531op/s ± 214049.602op/s 255469604.750op/s ± 142356.993op/s 255636480.732op/s 255801422.707op/s 255913401.347op/s 256952101.897op/s 0.58% 1.531 9.189 0.08% 15135.592op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 54.567µs 54.779µs ± 0.151µs 54.734µs ± 0.085µs 54.856µs 55.064µs 55.212µs 55.600µs 1.58% 1.512 3.736 0.28% 0.011µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 17985549.643op/s 18255233.082op/s ± 50245.347op/s 18270328.075op/s ± 28248.421op/s 18291667.688op/s 18310194.475op/s 18321234.568op/s 18326120.219op/s 0.31% -1.484 3.558 0.27% 3552.883op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 52.145µs 52.221µs ± 0.034µs 52.222µs ± 0.018µs 52.237µs 52.270µs 52.292µs 52.459µs 0.45% 1.774 11.307 0.06% 0.002µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 19062483.246op/s 19149440.214op/s ± 12338.281op/s 19149181.901op/s ± 6741.768op/s 19156692.466op/s 19167847.087op/s 19171468.599op/s 19177370.703op/s 0.15% -1.754 11.146 0.06% 872.448op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 5.736µs 5.891µs ± 0.054µs 5.894µs ± 0.036µs 5.931µs 5.972µs 6.010µs 6.031µs 2.32% -0.012 -0.245 0.91% 0.004µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 165821287.892op/s 169777493.870op/s ± 1556001.908op/s 169660549.833op/s ± 1044087.234op/s 170683086.220op/s 172460228.972op/s 172885860.704op/s 174333321.608op/s 2.75% 0.061 -0.234 0.91% 110025.950op/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 [255573655.027op/s; 255622906.842op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [79.735µs; 79.788µs] or [-0.034%; +0.034%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12533263.282op/s; 12541650.469op/s] or [-0.033%; +0.033%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [73.206µs; 73.250µs] or [-0.029%; +0.029%] None None None
credit_card/is_card_number/ 378282246310005 throughput [13652016.471op/s; 13660054.779op/s] or [-0.029%; +0.029%] 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 [255619777.914op/s; 255670098.364op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/378282246310005 execution_time [70.075µs; 70.113µs] or [-0.027%; +0.027%] None None None
credit_card/is_card_number/378282246310005 throughput [14262750.342op/s; 14270395.238op/s] or [-0.027%; +0.027%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [52.206µs; 52.216µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [19151120.920op/s; 19154720.597op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/x371413321323331 execution_time [5.891µs; 5.906µs] or [-0.121%; +0.121%] None None None
credit_card/is_card_number/x371413321323331 throughput [169338829.303op/s; 169750274.213op/s] or [-0.121%; +0.121%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.912µs; 3.913µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/ throughput [255582673.021op/s; 255628973.911op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [64.257µs; 64.272µs] or [-0.012%; +0.012%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15558790.984op/s; 15562569.412op/s] or [-0.012%; +0.012%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [57.524µs; 57.550µs] or [-0.023%; +0.023%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [17376122.865op/s; 17384178.479op/s] or [-0.023%; +0.023%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.913µs; 3.914µs] or [-0.012%; +0.012%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255468193.315op/s; 255527523.747op/s] or [-0.012%; +0.012%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [54.758µs; 54.800µs] or [-0.038%; +0.038%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [18248269.560op/s; 18262196.604op/s] or [-0.038%; +0.038%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [52.216µs; 52.226µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [19147730.247op/s; 19151150.181op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [5.883µs; 5.898µs] or [-0.127%; +0.127%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [169561846.971op/s; 169993140.770op/s] or [-0.127%; +0.127%] None None None

Group 17

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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 240.709ns 250.763ns ± 11.788ns 245.688ns ± 2.902ns 252.633ns 279.715ns 282.731ns 289.098ns 17.67% 1.686 1.556 4.69% 0.834ns 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.129ns; 252.397ns] or [-0.651%; +0.651%] None None None

Group 18

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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.824ms 14.898ms ± 0.035ms 14.894ms ± 0.016ms 14.912ms 14.961ms 15.010ms 15.088ms 1.31% 1.793 5.702 0.23% 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.894ms; 14.903ms] or [-0.032%; +0.032%] None None None

Group 19

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a66093e 1773073710 leiyks/sidecar-threaded-fallback
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.174ms 4.179ms ± 0.007ms 4.178ms ± 0.001ms 4.180ms 4.184ms 4.197ms 4.264ms 2.06% 9.533 110.814 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 [4.178ms; 4.180ms] or [-0.023%; +0.023%] None None None

Baseline

Omitted due to size.

@Leiyks Leiyks force-pushed the leiyks/sidecar-threaded-fallback branch from 917aceb to d87edf1 Compare January 15, 2026 12:56
@dd-octo-sts
Copy link
Contributor

dd-octo-sts bot commented Jan 15, 2026

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 97.30 MB 97.32 MB +.01% (+14.55 KB) 🔍
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 8.51 MB 8.51 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.12 MB 11.12 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 112.92 MB 112.92 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 27.16 MB 27.16 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 76.26 KB 76.26 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 185.98 MB 186.01 MB +.01% (+32.00 KB) 🔍
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 916.65 MB 916.65 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 9.93 MB 9.93 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 76.26 KB 76.26 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 24.76 MB 24.76 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 51.43 MB 51.43 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 22.97 MB 22.97 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 77.44 KB 77.44 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 190.16 MB 190.16 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 900.31 MB 900.31 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 7.53 MB 7.53 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 77.44 KB 77.44 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 26.52 MB 26.52 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 47.06 MB 47.06 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 85.27 MB 85.27 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 10.04 MB 10.04 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 105.90 MB 105.90 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.79 MB 11.79 MB 0% (0 B) 👌

@Leiyks Leiyks force-pushed the leiyks/sidecar-threaded-fallback branch from d87edf1 to 34adc5d Compare January 15, 2026 13:47
@Leiyks Leiyks force-pushed the leiyks/sidecar-threaded-fallback branch 6 times, most recently from 31a48ff to 801ac3e Compare January 26, 2026 12:35
@Leiyks Leiyks marked this pull request as ready for review January 26, 2026 12:36
@Leiyks Leiyks requested review from a team as code owners January 26, 2026 12:36
@Leiyks Leiyks force-pushed the leiyks/sidecar-threaded-fallback branch from 801ac3e to b7d89dd Compare January 26, 2026 16:02
@Leiyks Leiyks force-pushed the leiyks/sidecar-threaded-fallback branch from b7d89dd to cc2fb3d Compare February 18, 2026 13:25
@github-actions
Copy link

github-actions bot commented Feb 18, 2026

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/leiyks/sidecar-threaded-fallback

Summary by Rule

Rule Base Branch PR Branch Change
panic 1 1 No change (0%)
unwrap_used 11 11 No change (0%)
Total 12 12 No change (0%)

Annotation Counts by File

File Base Branch PR Branch Change
datadog-ipc/src/platform/unix/mem_handle.rs 2 2 No change (0%)
datadog-ipc/src/platform/unix/mem_handle_macos.rs 6 6 No change (0%)
datadog-sidecar/src/unix.rs 4 4 No change (0%)

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 28 27 ✅ -1 (-3.6%)
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 0 12 ⚠️ +12 (N/A)
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 208 219 ⚠️ +11 (+5.3%)

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.

Leiyks added 3 commits March 2, 2026 15:38
Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
@Leiyks Leiyks force-pushed the leiyks/sidecar-threaded-fallback branch from cc2fb3d to 8beb392 Compare March 2, 2026 14:38
@bwoebi
Copy link
Contributor

bwoebi commented Mar 3, 2026

So, on Linux connect_to_master() does not use the pid for connections to master. (= it connects to a "random" (first to spawn) PHP process.)
On windows it does.

However the primary_sidecar_identifier is unchanged - it would need to incorporate the pid instead of the euid (linux)/user terminal id (windows) in threaded mode. Otherwise multiple processes are going to interfere and use the same resources.

Leiyks added 2 commits March 4, 2026 14:08
…interference

In thread mode on Linux, primary_sidecar_identifier() returned geteuid(),
causing all PHP processes with the same euid to share the same Unix socket
and sidecar resources (SHM, rate limiters, crash tracker, etc.).

- Add set_sidecar_master_pid(pid) and update primary_sidecar_identifier()
  to return the stored PID instead of euid when in thread mode
- Add SharedDirLiaison::ipc_for_pid(pid) to build per-master socket paths
- Use ipc_for_pid(pid) in both run_listener and connect_to_master so the
  socket path is always pid-specific, matching Windows named-pipe behavior
- Call set_sidecar_master_pid from ddog_sidecar_connect_master so all shared
  resources use the master PID as their identifier key
… compatibility

Thread-mode sockets are placed in /tmp/libdatadog/ with the master's effective
uid encoded in the socket name (libdd.<ver>@<uid>-<pid>.sock). This ensures that
a worker process that has since dropped privileges via setuid() (e.g. www-data
under PHP-FPM) still computes the same socket path as the master listener.

Also fix ensure_dir_exists to always attempt chmod 0o777 (best-effort, ignoring
EPERM) so that even pre-existing directories get the world-writable bit set when
the process has sufficient permissions.

Also fix socket/lock path construction: remove spurious .with_extension(".sock")
(which produced a double-dot suffix on Rust >=1.87) and use "sock.lock" without
a leading dot for the lock file.
Leiyks added 2 commits March 4, 2026 14:41
…untime

- Switch thread mode IPC to AbstractUnixSocketLiaison on Linux: abstract
  sockets have no filesystem permissions, so PHP-FPM workers running as
  a different user (e.g. www-data) can connect to a sidecar thread running
  in the master process without any chmod/chown workarounds
- Use new_current_thread() Tokio runtime in run_listener to avoid spawning
  extra OS worker threads that trigger LSan "Running thread was not
  suspended" warnings at process exit under ASAN
- Move UnixListener::from_std() inside block_on so it runs with an active
  Tokio reactor (required by the tokio::net API)
- Remove unused SIDECAR_MASTER_UID tracking (replaced by abstract sockets)
- Keep SharedDirLiaison::attempt_listen chmod 0o777 for non-Linux platforms
@Leiyks Leiyks force-pushed the leiyks/sidecar-threaded-fallback branch from 873d390 to 0ce3cd6 Compare March 4, 2026 15:56
Leiyks added 2 commits March 5, 2026 14:51
In thread mode under PHP-FPM, the sidecar runs as a thread inside the
master process (possibly root). Named SHM objects (/ddlimiters-*, /ddrc*,
/ddcfg*) were created with 0600 (owner-only), preventing PHP worker
processes running as a different user (e.g. www-data) from opening them.

Add a global SHM_OPEN_MODE atomic in datadog-ipc that defaults to 0600.
NamedShmHandle::create() now reads this global instead of hardcoding the
mode. Expose ddog_sidecar_set_shm_open_mode() via FFI so the PHP
extension can set 0644 before starting the sidecar master listener when
running as root.
@Leiyks Leiyks force-pushed the leiyks/sidecar-threaded-fallback branch from edbbab1 to ccb5c11 Compare March 6, 2026 12:38
@Leiyks Leiyks force-pushed the leiyks/sidecar-threaded-fallback branch from d148ca6 to 69a98fb Compare March 6, 2026 14:02
Leiyks added 2 commits March 9, 2026 16:25
In PHP-FPM thread mode the master process runs as root and spawns worker
processes as www-data. Named POSIX SHM objects were created with 0600
(owner-only), so workers could not open them for writing.

The correct fix is to fchown() the SHM to the worker's UID after creation.
The worker UID is obtained via SO_PEERCRED (peer_cred()) on the first
accepted Unix socket connection in the thread listener, before the SHM
lazy-lock is initialized.

Changes:
- Replace set_shm_open_mode/SHM_OPEN_MODE with set_shm_owner_uid/SHM_OWNER_UID
  in both mem_handle.rs and mem_handle_macos.rs
- Call fchown(fd, worker_uid, None) in NamedShmHandle::create_mode() when
  SHM_OWNER_UID is set; restore default mode to S_IWUSR|S_IRUSR (0600)
- Add nix "user" feature to datadog-ipc for fchown/Uid support
- Add init_shm_eagerly field to MainLoopConfig (default true); thread mode
  sets it false to defer SHM initialization to first connection
- In accept_socket_loop_thread: use FIRST_CONNECTION_INIT OnceLock to call
  set_shm_owner_uid(peer_uid) then init SHM_LIMITER exactly once on first
  worker connection
- Remove ddog_sidecar_set_shm_open_mode FFI function (no longer needed)
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