Skip to content

[crashtracker] API to enable/disable crash report collection #1017

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

Closed
wants to merge 2 commits into from

Conversation

danielsn
Copy link
Contributor

@danielsn danielsn commented Apr 10, 2025

What does this PR do?

Adds new ddog_crasht_enable and ddog_crasht_disable functions.

Motivation

@ivoanjo wanted a way to do this, which had been removed in a previous PR as being unsound. This new mechanism is safer.

Additional Notes

Anything else we should know when reviewing?

How to test the change?

Describe here in detail how the change can be validated.

@danielsn danielsn force-pushed the dsn/crashtracker-disable branch from 590d994 to 0bf8b51 Compare April 10, 2025 20:03
@pr-commenter
Copy link

pr-commenter bot commented Apr 10, 2025

Benchmarks

Comparison

Benchmark execution time: 2025-04-16 13:29:31

Comparing candidate commit 49ffd7b in PR branch dsn/crashtracker-disable with baseline commit 3dab0be 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 49ffd7b 1744809460 dsn/crashtracker-disable
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.027µs 33.982µs ± 1.213µs 33.262µs ± 0.101µs 35.363µs 36.254µs 36.675µs 36.720µs 10.40% 1.042 -0.670 3.56% 0.086µ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 [33.814µs; 34.150µs] or [-0.495%; +0.495%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 49ffd7b 1744809460 dsn/crashtracker-disable
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 245.338ns 256.538ns ± 12.293ns 250.023ns ± 3.654ns 265.073ns 285.003ns 289.612ns 292.796ns 17.11% 1.227 0.469 4.78% 0.869ns 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 [254.834ns; 258.242ns] or [-0.664%; +0.664%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 49ffd7b 1744809460 dsn/crashtracker-disable
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.171µs 3.198µs ± 1.452µs 3.001µs ± 0.023µs 3.024µs 3.664µs 13.859µs 15.519µs 417.13% 7.443 56.412 45.30% 0.103µ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.997µs; 3.399µs] or [-6.294%; +6.294%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 49ffd7b 1744809460 dsn/crashtracker-disable
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.301µs 2.376µs ± 0.019µs 2.376µs ± 0.006µs 2.384µs 2.410µs 2.415µs 2.415µs 1.64% -1.248 3.760 0.78% 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.373µs; 2.378µs] or [-0.109%; +0.109%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 49ffd7b 1744809460 dsn/crashtracker-disable
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 74.050ms 74.286ms ± 0.182ms 74.248ms ± 0.091ms 74.366ms 74.539ms 75.078ms 75.322ms 1.45% 2.562 10.132 0.24% 0.013ms 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 [74.261ms; 74.311ms] or [-0.034%; +0.034%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 49ffd7b 1744809460 dsn/crashtracker-disable
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 208.603µs 209.037µs ± 0.156µs 209.041µs ± 0.090µs 209.127µs 209.278µs 209.435µs 209.508µs 0.22% -0.015 0.595 0.07% 0.011µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 4773089.955op/s 4783839.498op/s ± 3563.338op/s 4783754.370op/s ± 2059.620op/s 4785995.539op/s 4790549.619op/s 4792325.724op/s 4793805.764op/s 0.21% 0.021 0.594 0.07% 251.966op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 18.611µs 18.685µs ± 0.037µs 18.678µs ± 0.011µs 18.696µs 18.743µs 18.809µs 19.007µs 1.76% 3.856 28.795 0.20% 0.003µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 52612195.507op/s 53520029.860op/s ± 104812.853op/s 53539930.920op/s ± 31696.277op/s 53567529.361op/s 53648589.497op/s 53681691.251op/s 53730514.151op/s 0.36% -3.763 27.736 0.20% 7411.388op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.904µs 10.963µs ± 0.033µs 10.958µs ± 0.024µs 10.985µs 11.020µs 11.037µs 11.053µs 0.87% 0.296 -0.542 0.30% 0.002µs 1 200
normalization/normalize_name/normalize_name/good throughput 90469774.744op/s 91217916.601op/s ± 276351.058op/s 91256311.638op/s ± 200746.560op/s 91398600.723op/s 91618609.844op/s 91648958.933op/s 91707135.379op/s 0.49% -0.283 -0.557 0.30% 19540.971op/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 [209.016µs; 209.059µs] or [-0.010%; +0.010%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [4783345.653op/s; 4784333.342op/s] or [-0.010%; +0.010%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [18.680µs; 18.690µs] or [-0.027%; +0.027%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [53505503.807op/s; 53534555.914op/s] or [-0.027%; +0.027%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.958µs; 10.967µs] or [-0.042%; +0.042%] None None None
normalization/normalize_name/normalize_name/good throughput [91179617.002op/s; 91256216.200op/s] or [-0.042%; +0.042%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 49ffd7b 1744809460 dsn/crashtracker-disable
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 67.111µs 67.282µs ± 0.188µs 67.260µs ± 0.048µs 67.309µs 67.408µs 67.812µs 69.441µs 3.24% 8.402 88.500 0.28% 0.013µ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 [67.256µs; 67.308µs] or [-0.039%; +0.039%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 49ffd7b 1744809460 dsn/crashtracker-disable
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.892µs 3.913µs ± 0.003µs 3.913µs ± 0.001µs 3.914µs 3.918µs 3.919µs 3.923µs 0.26% -1.187 7.132 0.09% 0.000µs 1 200
credit_card/is_card_number/ throughput 254907492.814op/s 255589098.217op/s ± 218120.471op/s 255575579.760op/s ± 92854.471op/s 255675788.696op/s 255951267.523op/s 256052605.702op/s 256960632.244op/s 0.54% 1.206 7.251 0.09% 15423.446op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 76.670µs 77.578µs ± 0.430µs 77.539µs ± 0.277µs 77.834µs 78.347µs 78.653µs 79.119µs 2.04% 0.536 0.239 0.55% 0.030µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12639238.604op/s 12890657.977op/s ± 71307.023op/s 12896690.257op/s ± 46072.645op/s 12940863.736op/s 12990754.467op/s 13021780.747op/s 13042946.784op/s 1.13% -0.504 0.177 0.55% 5042.168op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 70.812µs 71.336µs ± 0.251µs 71.331µs ± 0.183µs 71.502µs 71.761µs 71.906µs 72.054µs 1.01% 0.311 -0.293 0.35% 0.018µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13878504.618op/s 14018290.181op/s ± 49301.361op/s 14019095.112op/s ± 35950.849op/s 14057316.717op/s 14094726.742op/s 14107733.672op/s 14121992.178op/s 0.73% -0.294 -0.311 0.35% 3486.133op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.889µ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% -2.373 16.892 0.08% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 255137232.088op/s 255601732.103op/s ± 194155.856op/s 255594658.072op/s ± 85190.747op/s 255675667.214op/s 255898273.798op/s 256036492.128op/s 257112567.523op/s 0.59% 2.403 17.175 0.08% 13728.892op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 67.069µs 67.953µs ± 0.386µs 67.903µs ± 0.273µs 68.221µs 68.616µs 68.880µs 68.904µs 1.47% 0.260 -0.365 0.57% 0.027µs 1 200
credit_card/is_card_number/378282246310005 throughput 14513050.861op/s 14716468.779op/s ± 83439.407op/s 14726834.879op/s ± 59501.810op/s 14767380.026op/s 14844557.723op/s 14881672.489op/s 14910124.690op/s 1.24% -0.233 -0.378 0.57% 5900.057op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 51.738µs 51.831µs ± 0.035µs 51.824µs ± 0.014µs 51.842µs 51.904µs 51.933µs 51.946µs 0.24% 0.808 1.355 0.07% 0.002µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 19250593.352op/s 19293590.872op/s ± 12990.839op/s 19296042.382op/s ± 5272.550op/s 19300551.513op/s 19314233.722op/s 19323099.123op/s 19328327.597op/s 0.17% -0.803 1.348 0.07% 918.591op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.026µs 6.050µs ± 0.023µs 6.039µs ± 0.004µs 6.067µs 6.111µs 6.122µs 6.152µs 1.86% 1.717 2.627 0.38% 0.002µs 1 200
credit_card/is_card_number/x371413321323331 throughput 162560929.616op/s 165282491.535op/s ± 627553.941op/s 165587459.832op/s ± 114906.942op/s 165682635.763op/s 165738773.976op/s 165886184.347op/s 165946311.098op/s 0.22% -1.698 2.528 0.38% 44374.765op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.894µs 3.913µs ± 0.003µs 3.913µs ± 0.001µs 3.914µs 3.917µs 3.919µs 3.920µs 0.19% -1.176 6.328 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 255088012.849op/s 255585683.051op/s ± 195599.316op/s 255576831.962op/s ± 87851.203op/s 255664516.941op/s 255901421.180op/s 256015918.410op/s 256782947.683op/s 0.47% 1.192 6.422 0.08% 13830.960op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 65.906µs 66.371µs ± 0.227µs 66.333µs ± 0.124µs 66.482µs 66.771µs 67.174µs 67.236µs 1.36% 1.204 2.113 0.34% 0.016µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 14873000.825op/s 15066883.434op/s ± 51251.234op/s 15075443.615op/s ± 28343.660op/s 15100753.905op/s 15129480.221op/s 15154526.369op/s 15173067.423op/s 0.65% -1.177 2.022 0.34% 3624.009op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 59.523µs 59.681µs ± 0.059µs 59.675µs ± 0.037µs 59.715µs 59.781µs 59.823µs 59.867µs 0.32% 0.358 0.224 0.10% 0.004µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 16703678.239op/s 16755760.543op/s ± 16543.985op/s 16757538.910op/s ± 10343.329op/s 16767210.044op/s 16781303.279op/s 16788992.758op/s 16800144.481op/s 0.25% -0.352 0.218 0.10% 1169.836op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.897µs 3.913µs ± 0.003µs 3.913µs ± 0.001µs 3.914µs 3.918µs 3.921µs 3.925µs 0.31% -0.057 3.279 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 254809326.659op/s 255589057.583op/s ± 209649.792op/s 255589469.720op/s ± 89452.855op/s 255679810.456op/s 255906385.202op/s 256027882.579op/s 256615118.084op/s 0.40% 0.070 3.304 0.08% 14824.479op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 56.182µs 56.399µs ± 0.105µs 56.386µs ± 0.075µs 56.468µs 56.572µs 56.671µs 56.758µs 0.66% 0.508 0.010 0.19% 0.007µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 17618506.479op/s 17730864.402op/s ± 32952.019op/s 17734835.125op/s ± 23530.392op/s 17756799.040op/s 17778481.637op/s 17788172.682op/s 17799391.261op/s 0.36% -0.498 -0.010 0.19% 2330.060op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 51.738µs 51.829µs ± 0.033µs 51.825µs ± 0.018µs 51.849µs 51.888µs 51.902µs 52.000µs 0.34% 0.672 3.339 0.06% 0.002µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 19230663.842op/s 19294166.086op/s ± 12232.671op/s 19295716.351op/s ± 6570.005op/s 19300430.882op/s 19311298.100op/s 19321542.435op/s 19328223.071op/s 0.17% -0.663 3.304 0.06% 864.980op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.025µs 6.055µs ± 0.030µs 6.039µs ± 0.008µs 6.073µs 6.114µs 6.151µs 6.178µs 2.29% 1.581 2.178 0.50% 0.002µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 161863111.984op/s 165152723.508op/s ± 822577.914op/s 165576836.289op/s ± 223981.891op/s 165700390.138op/s 165839002.464op/s 165922495.198op/s 165968304.572op/s 0.24% -1.556 2.064 0.50% 58165.042op/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.012%; +0.012%] None None None
credit_card/is_card_number/ throughput [255558868.817op/s; 255619327.616op/s] or [-0.012%; +0.012%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [77.518µs; 77.638µs] or [-0.077%; +0.077%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12880775.509op/s; 12900540.444op/s] or [-0.077%; +0.077%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [71.301µs; 71.371µs] or [-0.049%; +0.049%] None None None
credit_card/is_card_number/ 378282246310005 throughput [14011457.487op/s; 14025122.876op/s] or [-0.049%; +0.049%] None None None
credit_card/is_card_number/37828224631 execution_time [3.912µs; 3.913µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/37828224631 throughput [255574823.968op/s; 255628640.237op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/378282246310005 execution_time [67.900µs; 68.007µs] or [-0.079%; +0.079%] None None None
credit_card/is_card_number/378282246310005 throughput [14704904.880op/s; 14728032.679op/s] or [-0.079%; +0.079%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [51.826µs; 51.836µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [19291790.466op/s; 19295391.277op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.047µs; 6.054µs] or [-0.053%; +0.053%] None None None
credit_card/is_card_number/x371413321323331 throughput [165195518.595op/s; 165369464.476op/s] or [-0.053%; +0.053%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.912µs; 3.913µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/ throughput [255558574.867op/s; 255612791.235op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [66.340µs; 66.403µs] or [-0.047%; +0.047%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15059780.506op/s; 15073986.362op/s] or [-0.047%; +0.047%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [59.673µs; 59.689µs] or [-0.014%; +0.014%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [16753467.706op/s; 16758053.380op/s] or [-0.014%; +0.014%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.912µs; 3.913µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255560002.138op/s; 255618113.027op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [56.384µs; 56.414µs] or [-0.026%; +0.026%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [17726297.569op/s; 17735431.235op/s] or [-0.026%; +0.026%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [51.825µs; 51.834µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [19292470.755op/s; 19295861.416op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.051µs; 6.059µs] or [-0.070%; +0.070%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [165038722.120op/s; 165266724.896op/s] or [-0.069%; +0.069%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 49ffd7b 1744809460 dsn/crashtracker-disable
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 503.859µs 505.127µs ± 0.619µs 505.102µs ± 0.264µs 505.372µs 505.767µs 506.148µs 511.352µs 1.24% 4.996 49.598 0.12% 0.044µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1955600.056op/s 1979704.486op/s ± 2410.158op/s 1979796.398op/s ± 1035.754op/s 1980788.824op/s 1982706.122op/s 1984308.039op/s 1984682.660op/s 0.25% -4.899 48.371 0.12% 170.424op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 453.767µs 455.406µs ± 1.274µs 455.286µs ± 0.355µs 455.666µs 456.138µs 456.690µs 467.732µs 2.73% 7.571 67.286 0.28% 0.090µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2137975.726op/s 2195857.746op/s ± 6014.607op/s 2196420.956op/s ± 1714.398op/s 2197938.536op/s 2200530.996op/s 2201988.891op/s 2203775.973op/s 0.33% -7.471 66.064 0.27% 425.297op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 176.878µs 177.779µs ± 0.242µs 177.803µs ± 0.133µs 177.934µs 178.117µs 178.280µs 178.480µs 0.38% -0.634 1.566 0.14% 0.017µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5602865.606op/s 5624958.774op/s ± 7666.430op/s 5624203.609op/s ± 4211.185op/s 5628526.388op/s 5638933.342op/s 5647433.245op/s 5653615.135op/s 0.52% 0.647 1.588 0.14% 542.098op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 37.536µs 37.617µs ± 0.133µs 37.605µs ± 0.021µs 37.626µs 37.668µs 37.731µs 38.929µs 3.52% 9.007 84.224 0.35% 0.009µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 25687563.185op/s 26584052.317op/s ± 91257.919op/s 26592382.274op/s ± 15177.182op/s 26608672.792op/s 26626467.421op/s 26631226.573op/s 26641271.665op/s 0.18% -8.953 83.522 0.34% 6452.909op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 48.085µs 48.286µs ± 0.235µs 48.143µs ± 0.055µs 48.517µs 48.617µs 48.680µs 49.809µs 3.46% 1.637 6.790 0.49% 0.017µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 20076684.108op/s 20710481.473op/s ± 100154.994op/s 20771380.855op/s ± 23778.032op/s 20793396.017op/s 20794966.905op/s 20795771.732op/s 20796705.802op/s 0.12% -1.552 6.043 0.48% 7082.028op/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 [505.041µs; 505.212µs] or [-0.017%; +0.017%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1979370.462op/s; 1980038.511op/s] or [-0.017%; +0.017%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [455.230µs; 455.583µs] or [-0.039%; +0.039%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2195024.179op/s; 2196691.313op/s] or [-0.038%; +0.038%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [177.746µs; 177.813µs] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5623896.281op/s; 5626021.268op/s] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [37.599µs; 37.635µs] or [-0.049%; +0.049%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [26571404.847op/s; 26596699.786op/s] or [-0.048%; +0.048%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [48.253µs; 48.318µs] or [-0.068%; +0.068%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [20696600.954op/s; 20724361.992op/s] or [-0.067%; +0.067%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 49ffd7b 1744809460 dsn/crashtracker-disable
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.948µs 5.045µs ± 0.048µs 5.045µs ± 0.042µs 5.072µs 5.118µs 5.121µs 5.126µs 1.60% -0.020 -1.055 0.95% 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.038µs; 5.051µs] or [-0.132%; +0.132%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 49ffd7b 1744809460 dsn/crashtracker-disable
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.288µs 149.074µs ± 0.360µs 149.044µs ± 0.177µs 149.187µs 149.645µs 150.496µs 151.508µs 1.65% 2.735 13.383 0.24% 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.024µs; 149.123µs] or [-0.033%; +0.033%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 49ffd7b 1744809460 dsn/crashtracker-disable
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.990ms 6.002ms ± 0.006ms 6.002ms ± 0.003ms 6.004ms 6.009ms 6.012ms 6.051ms 0.83% 3.404 28.988 0.09% 0.000ms 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 [6.001ms; 6.003ms] or [-0.013%; +0.013%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 49ffd7b 1744809460 dsn/crashtracker-disable
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.734µs 26.394µs ± 12.158µs 18.161µs ± 0.228µs 36.305µs 43.081µs 55.103µs 115.378µs 535.32% 2.538 13.448 45.95% 0.860µ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.709µs; 28.079µs] or [-6.384%; +6.384%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

codecov-commenter commented Apr 10, 2025

Codecov Report

Attention: Patch coverage is 22.22222% with 14 lines in your changes missing coverage. Please review.

Project coverage is 71.54%. Comparing base (3dab0be) to head (49ffd7b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1017      +/-   ##
==========================================
+ Coverage   71.52%   71.54%   +0.01%     
==========================================
  Files         339      339              
  Lines       50628    50646      +18     
==========================================
+ Hits        36214    36233      +19     
+ Misses      14414    14413       -1     
Components Coverage Δ
crashtracker 42.74% <22.22%> (-0.08%) ⬇️
crashtracker-ffi 6.23% <0.00%> (-0.08%) ⬇️
datadog-alloc 98.73% <ø> (ø)
data-pipeline 91.00% <ø> (ø)
data-pipeline-ffi 90.35% <ø> (ø)
ddcommon 78.57% <ø> (ø)
ddcommon-ffi 66.37% <ø> (ø)
ddtelemetry 60.29% <ø> (ø)
ddtelemetry-ffi 21.43% <ø> (ø)
dogstatsd-client 82.57% <ø> (ø)
ipc 82.41% <ø> (ø)
profiling 77.49% <ø> (ø)
profiling-ffi 62.12% <ø> (ø)
serverless 0.00% <ø> (ø)
sidecar 41.18% <ø> (ø)
sidecar-ffi 2.05% <ø> (ø)
spawn-worker 54.37% <ø> (ø)
tinybytes 89.86% <ø> (ø)
trace-mini-agent 73.80% <ø> (ø)
trace-normalization 98.24% <ø> (ø)
trace-obfuscation 96.00% <ø> (ø)
trace-protobuf 78.50% <ø> (ø)
trace-utils 93.13% <ø> (ø)
🚀 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 Apr 10, 2025

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so.debug 24.05 MB 24.05 MB +0% (+896 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 77.58 MB 77.58 MB +0% (+2.63 KB) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.77 MB 7.77 MB +0% (+352 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 7.70 MB 7.70 MB -0% (-536 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 71.95 MB 71.94 MB --.01% (-8.02 KB) 💪
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so.debug 22.66 MB 22.66 MB --.01% (-2.64 KB) 💪
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 16.87 MB 16.87 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 61.83 KB 61.83 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 113.66 MB 113.66 MB +0% (+8.00 KB) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 633.16 MB 633.16 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 5.02 MB 5.02 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 61.83 KB 61.83 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 16.02 MB 16.02 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 26.62 MB 26.62 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 14.28 MB 14.28 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 62.78 KB 62.78 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 115.66 MB 115.65 MB --.01% (-16.00 KB) 💪
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 624.89 MB 624.89 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 3.80 MB 3.80 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 62.78 KB 62.78 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 16.64 MB 16.64 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 24.54 MB 24.54 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 66.89 MB 66.89 MB +0% (+2.32 KB) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.22 MB 8.22 MB +0% (+248 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so.debug 23.21 MB 23.21 MB +0% (+792 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 67.85 MB 67.84 MB -0% (-4.26 KB) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 8.11 MB 8.11 MB -0% (-408 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so.debug 20.85 MB 20.85 MB -0% (-1.44 KB) 👌

@ivoanjo
Copy link
Member

ivoanjo commented May 27, 2025

I've included a rebased version of @danielsn's work in #1066 so I'm going ahead and close this one.

@ivoanjo ivoanjo closed this May 27, 2025
ivoanjo added a commit that referenced this pull request May 27, 2025
…#1066)

# What does this PR do?

This PR adds the following new APIs to the crashtracker:
* `ddog_crasht_enable`
* `ddog_crasht_disable`
* `ddog_crasht_reconfigure`

# Motivation

Prior to #1000, it was possible to:

* reconfigure the crashtracker by calling init again
* stop the crashtracker

Both features were removed as it could cause issues with signal handlers and chaining.

But, we still need to be able to update the configuration as for instance the following can change at run-time for Ruby and need to be updated:
    
* Endpoint
* Tags

This PR restores some of the behavior removed in #1000, without the unsafety of touching signal handlers:

* `enable`/`disable` just skip the crashtracker signal handling code, but never uninstall it
* `reconfigure` does the same as `init` BUT without touching the signal handlers

# Additional Notes

This PR supercedes #1017 .

# How to test the change?

I've validated this branch with DataDog/dd-trace-rb#4577 on the Ruby side, and I'm able to get a green test suite for the Ruby crashtracker.

---------

Co-authored-by: Daniel Schwartz-Narbonne <[email protected]>
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.

5 participants