Skip to content

Conversation

anais-raison
Copy link
Contributor

@anais-raison anais-raison commented Aug 20, 2025

What does this PR do?

Fix the use of the AGENT_CONFIG product in the tracer flare design.
Remove the state field.
Added an argument log_level for the zip_and_send function to let the language tell us what log level is on when creating the flare.

We're now returning a list of action to perform from the function that listen the RC.

Motivation

What inspired you to submit this pull request?

Additional Notes

How to test the change?

Describe here in detail how the change can be validated.

@anais-raison anais-raison self-assigned this Aug 20, 2025
@anais-raison anais-raison requested a review from a team as a code owner August 20, 2025 14:12
@codecov-commenter
Copy link

codecov-commenter commented Aug 20, 2025

Codecov Report

❌ Patch coverage is 12.63158% with 83 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.76%. Comparing base (f65f27b) to head (d1b051f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1186      +/-   ##
==========================================
- Coverage   71.85%   71.76%   -0.09%     
==========================================
  Files         356      356              
  Lines       56685    56680       -5     
==========================================
- Hits        40731    40679      -52     
- Misses      15954    16001      +47     
Components Coverage Δ
datadog-crashtracker 49.28% <ø> (-0.05%) ⬇️
datadog-crashtracker-ffi 5.93% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 88.01% <ø> (ø)
data-pipeline-ffi 88.19% <ø> (ø)
ddcommon 84.54% <ø> (ø)
ddcommon-ffi 73.84% <ø> (ø)
ddtelemetry 59.49% <ø> (+0.03%) ⬆️
ddtelemetry-ffi 21.24% <ø> (ø)
dogstatsd-client 83.26% <ø> (ø)
datadog-ipc 82.39% <ø> (ø)
datadog-profiling 76.90% <ø> (ø)
datadog-profiling-ffi 62.12% <ø> (ø)
datadog-sidecar 37.01% <ø> (ø)
datdog-sidecar-ffi 11.03% <ø> (ø)
spawn-worker 55.35% <ø> (ø)
tinybytes 92.22% <ø> (ø)
datadog-trace-normalization 98.24% <ø> (ø)
datadog-trace-obfuscation 94.17% <ø> (ø)
datadog-trace-protobuf 59.65% <ø> (ø)
datadog-trace-utils 89.84% <ø> (ø)
datadog-tracer-flare 45.52% <12.63%> (-9.01%) ⬇️
datadog-log 76.31% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

RemoteConfigData::TracerFlareConfig(agent_config) => {
if agent_config.name.starts_with("flare-log-level.") {
if let Some(log_level) = &agent_config.config.log_level {
if let State::Collecting { log_level: _ } = tracer_flare.state {
Copy link
Contributor

Choose a reason for hiding this comment

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

So what is supposed to happen in the SDK if a flare is already in progress when we receive an agent task to start a new one? We just pass it along, and with it pass along the responsibility to the SDK to know what to do. Shouldn't this crate encapsulate that logic?

If we receive two tasks in the same listener batch, we only return the first one. 👍
If we receive two tasks in different listener batches we will pass both to the caller and they either ignore it, or stop the current flare and start a new one. This opens the potential for inconsistent behavior between the SDKs. If we receive a task to start a flare while one is already in progress, why don't we just ignore it? That's what dd-trace-py does today.

I don't have an opinion on what the correct behavior should be, but I do think we should try to encapsulate whatever we can and put the minimum burden on the SDK to make decisions.

@pr-commenter
Copy link

pr-commenter bot commented Aug 22, 2025

Benchmarks

Comparison

Benchmark execution time: 2025-10-07 21:12:56

Comparing candidate commit d1b051f in PR branch anais/fix-tracer-flare-design with baseline commit f65f27b in branch main.

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

scenario:credit_card/is_card_number/378282246310005

  • 🟩 execution_time [-9.399µs; -9.121µs] or [-12.030%; -11.674%]
  • 🟩 throughput [+1695280.951op/s; +1748017.118op/s] or [+13.244%; +13.656%]

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 d1b051f 1759870765 anais/fix-tracer-flare-design
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 88.673µs 88.950µs ± 0.142µs 88.940µs ± 0.041µs 88.983µs 89.055µs 89.177µs 90.657µs 1.93% 8.809 103.183 0.16% 0.010µ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 [88.930µs; 88.970µs] or [-0.022%; +0.022%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d1b051f 1759870765 anais/fix-tracer-flare-design
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 243.798ns 254.488ns ± 11.746ns 249.876ns ± 4.180ns 256.701ns 285.108ns 287.400ns 291.353ns 16.60% 1.632 1.683 4.60% 0.831ns 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 [252.861ns; 256.116ns] or [-0.640%; +0.640%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d1b051f 1759870765 anais/fix-tracer-flare-design
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 204.660µs 205.433µs ± 0.346µs 205.418µs ± 0.220µs 205.625µs 206.055µs 206.341µs 206.553µs 0.55% 0.495 0.115 0.17% 0.024µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 4841367.998op/s 4867773.377op/s ± 8194.691op/s 4868126.723op/s ± 5214.703op/s 4873861.181op/s 4879795.889op/s 4881795.393op/s 4886146.836op/s 0.37% -0.486 0.100 0.17% 579.452op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 18.575µs 18.643µs ± 0.038µs 18.634µs ± 0.018µs 18.662µs 18.714µs 18.748µs 18.871µs 1.28% 1.799 6.597 0.20% 0.003µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 52990124.976op/s 53640525.026op/s ± 107996.267op/s 53666355.820op/s ± 51633.027op/s 53706206.117op/s 53771142.264op/s 53817072.817op/s 53837102.615op/s 0.32% -1.767 6.378 0.20% 7636.489op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.902µs 10.968µs ± 0.028µs 10.969µs ± 0.016µs 10.984µs 11.010µs 11.033µs 11.055µs 0.78% -0.026 0.069 0.26% 0.002µs 1 200
normalization/normalize_name/normalize_name/good throughput 90460331.753op/s 91174383.641op/s ± 234787.713op/s 91163999.478op/s ± 129752.392op/s 91304477.663op/s 91593715.582op/s 91698219.516op/s 91724864.917op/s 0.62% 0.041 0.060 0.26% 16601.998op/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 [205.385µs; 205.481µs] or [-0.023%; +0.023%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [4866637.672op/s; 4868909.082op/s] or [-0.023%; +0.023%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [18.637µs; 18.648µs] or [-0.028%; +0.028%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [53625557.782op/s; 53655492.270op/s] or [-0.028%; +0.028%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.964µs; 10.972µs] or [-0.036%; +0.036%] None None None
normalization/normalize_name/normalize_name/good throughput [91141844.322op/s; 91206922.960op/s] or [-0.036%; +0.036%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d1b051f 1759870765 anais/fix-tracer-flare-design
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 59.820ms 60.700ms ± 2.390ms 60.452ms ± 0.073ms 60.519ms 60.710ms 78.560ms 81.798ms 35.31% 7.961 62.192 3.93% 0.169ms 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 [60.369ms; 61.031ms] or [-0.546%; +0.546%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d1b051f 1759870765 anais/fix-tracer-flare-design
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 159.988µs 160.898µs ± 0.301µs 160.893µs ± 0.177µs 161.039µs 161.466µs 161.672µs 161.736µs 0.52% 0.393 0.401 0.19% 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 [160.857µs; 160.940µs] or [-0.026%; +0.026%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d1b051f 1759870765 anais/fix-tracer-flare-design
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 535.412µs 538.776µs ± 2.332µs 538.388µs ± 1.693µs 540.179µs 543.321µs 545.297µs 545.882µs 1.39% 0.822 0.132 0.43% 0.165µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1831897.341op/s 1856092.684op/s ± 8005.039op/s 1857397.539op/s ± 5839.756op/s 1862929.280op/s 1865876.598op/s 1867606.781op/s 1867719.123op/s 0.56% -0.804 0.091 0.43% 566.042op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 381.991µs 382.827µs ± 0.342µs 382.828µs ± 0.251µs 383.064µs 383.391µs 383.645µs 383.836µs 0.26% 0.194 -0.340 0.09% 0.024µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2605280.814op/s 2612147.317op/s ± 2332.248op/s 2612140.765op/s ± 1708.854op/s 2613932.066op/s 2615618.395op/s 2616524.486op/s 2617861.831op/s 0.22% -0.190 -0.344 0.09% 164.915op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 190.461µs 190.887µs ± 0.195µs 190.868µs ± 0.152µs 191.038µs 191.239µs 191.292µs 191.385µs 0.27% 0.197 -0.705 0.10% 0.014µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5225078.286op/s 5238711.568op/s ± 5360.215op/s 5239228.550op/s ± 4165.077op/s 5243082.232op/s 5246731.624op/s 5249799.119op/s 5250423.669op/s 0.21% -0.193 -0.706 0.10% 379.024op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 36.647µs 36.798µs ± 0.089µs 36.784µs ± 0.045µs 36.835µs 36.924µs 37.102µs 37.402µs 1.68% 2.597 12.720 0.24% 0.006µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26736466.669op/s 27175738.023op/s ± 65650.103op/s 27185598.231op/s ± 33535.291op/s 27213899.776op/s 27259588.372op/s 27279314.063op/s 27287661.065op/s 0.38% -2.540 12.269 0.24% 4642.163op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 46.668µs 47.095µs ± 0.111µs 47.109µs ± 0.074µs 47.174µs 47.250µs 47.296µs 47.366µs 0.55% -0.602 0.748 0.23% 0.008µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21112303.981op/s 21233828.367op/s ± 49959.434op/s 21227538.893op/s ± 33411.251op/s 21263514.208op/s 21323358.722op/s 21361236.050op/s 21427915.239op/s 0.94% 0.619 0.788 0.23% 3532.665op/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 [538.453µs; 539.099µs] or [-0.060%; +0.060%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1854983.263op/s; 1857202.106op/s] or [-0.060%; +0.060%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [382.780µs; 382.874µs] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2611824.089op/s; 2612470.544op/s] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [190.860µs; 190.914µs] or [-0.014%; +0.014%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5237968.694op/s; 5239454.443op/s] or [-0.014%; +0.014%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [36.785µs; 36.810µs] or [-0.034%; +0.034%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [27166639.550op/s; 27184836.496op/s] or [-0.033%; +0.033%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [47.080µs; 47.110µs] or [-0.033%; +0.033%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21226904.470op/s; 21240752.264op/s] or [-0.033%; +0.033%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d1b051f 1759870765 anais/fix-tracer-flare-design
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.902µs 3.914µs ± 0.003µs 3.914µs ± 0.002µs 3.916µs 3.918µs 3.922µs 3.925µs 0.29% 0.250 3.073 0.07% 0.000µs 1 200
credit_card/is_card_number/ throughput 254753165.620op/s 255484504.334op/s ± 177506.738op/s 255492718.477op/s ± 111225.929op/s 255601064.675op/s 255711417.093op/s 255824696.542op/s 256305054.175op/s 0.32% -0.240 3.080 0.07% 12551.622op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 76.442µs 77.963µs ± 0.725µs 77.897µs ± 0.452µs 78.341µs 79.338µs 79.760µs 80.023µs 2.73% 0.463 -0.048 0.93% 0.051µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12496404.843op/s 12827619.426op/s ± 118722.546op/s 12837518.935op/s ± 74826.337op/s 12913771.952op/s 13006778.268op/s 13047598.178op/s 13081782.912op/s 1.90% -0.415 -0.107 0.92% 8394.952op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 70.889µs 72.251µs ± 0.659µs 72.197µs ± 0.461µs 72.693µs 73.484µs 73.962µs 74.335µs 2.96% 0.479 0.077 0.91% 0.047µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13452559.790op/s 13841870.999op/s ± 125643.142op/s 13850942.052op/s ± 88537.116op/s 13938135.118op/s 14035242.306op/s 14076112.094op/s 14106489.381op/s 1.84% -0.429 -0.001 0.91% 8884.312op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.895µs 3.914µs ± 0.003µs 3.914µs ± 0.002µs 3.916µs 3.918µs 3.922µs 3.925µs 0.27% -0.741 7.871 0.08% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 254799124.049op/s 255483259.559op/s ± 198260.665op/s 255490495.756op/s ± 123746.102op/s 255617846.232op/s 255717315.018op/s 255794158.423op/s 256753754.257op/s 0.49% 0.762 7.995 0.08% 14019.146op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 67.264µs 68.868µs ± 0.735µs 68.816µs ± 0.513µs 69.372µs 70.101µs 70.602µs 70.780µs 2.85% 0.216 -0.449 1.07% 0.052µs 1 200
credit_card/is_card_number/378282246310005 throughput 14128319.006op/s 14522115.967op/s ± 154741.444op/s 14531574.452op/s ± 108432.614op/s 14632881.548op/s 14761575.066op/s 14816645.428op/s 14866760.225op/s 2.31% -0.168 -0.480 1.06% 10941.872op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 53.053µs 53.126µs ± 0.034µs 53.123µs ± 0.023µs 53.148µs 53.185µs 53.217µs 53.254µs 0.25% 0.553 0.564 0.06% 0.002µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 18777779.191op/s 18823162.768op/s ± 12130.465op/s 18824082.476op/s ± 8080.308op/s 18831959.659op/s 18841181.411op/s 18845162.069op/s 18849081.092op/s 0.13% -0.549 0.554 0.06% 857.753op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.429µs 6.436µs ± 0.004µs 6.436µs ± 0.003µs 6.439µs 6.443µs 6.445µs 6.446µs 0.15% 0.307 -0.592 0.06% 0.000µs 1 200
credit_card/is_card_number/x371413321323331 throughput 155142045.321op/s 155370540.971op/s ± 90406.901op/s 155377749.906op/s ± 66007.512op/s 155439193.994op/s 155498478.742op/s 155536523.117op/s 155552908.509op/s 0.11% -0.305 -0.594 0.06% 6392.733op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.894µs 3.914µs ± 0.003µs 3.914µs ± 0.001µs 3.915µs 3.918µs 3.922µs 3.925µs 0.28% -1.280 14.102 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 254785174.714op/s 255486214.460op/s ± 178805.012op/s 255487749.369op/s ± 90738.212op/s 255577657.302op/s 255698255.645op/s 255786092.914op/s 256791765.296op/s 0.51% 1.311 14.305 0.07% 12643.424op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 64.932µs 65.146µs ± 0.139µs 65.097µs ± 0.054µs 65.188µs 65.448µs 65.539µs 65.653µs 0.85% 1.360 1.230 0.21% 0.010µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15231572.320op/s 15350269.801op/s ± 32725.210op/s 15361697.911op/s ± 12706.147op/s 15371612.091op/s 15382280.080op/s 15397329.412op/s 15400689.951op/s 0.25% -1.351 1.201 0.21% 2314.022op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 58.604µs 58.935µs ± 0.226µs 58.879µs ± 0.133µs 59.063µs 59.367µs 59.439µs 60.020µs 1.94% 1.140 1.675 0.38% 0.016µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 16661036.216op/s 16968222.317op/s ± 64728.828op/s 16984031.619op/s ± 38228.574op/s 17017310.008op/s 17041346.823op/s 17052829.166op/s 17063618.288op/s 0.47% -1.113 1.537 0.38% 4577.019op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.892µs 3.915µs ± 0.003µs 3.914µs ± 0.002µs 3.916µs 3.919µs 3.922µs 3.926µs 0.31% -1.240 13.101 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 254680146.248op/s 255455758.641op/s ± 202715.547op/s 255468778.464op/s ± 116701.292op/s 255577566.689op/s 255689376.222op/s 255747938.418op/s 256922017.935op/s 0.57% 1.272 13.326 0.08% 14334.154op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 55.366µs 55.617µs ± 0.168µs 55.563µs ± 0.083µs 55.688µs 55.972µs 56.122µs 56.270µs 1.27% 1.377 1.641 0.30% 0.012µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 17771437.982op/s 17980380.951op/s ± 53958.670op/s 17997628.814op/s ± 26991.503op/s 18017053.592op/s 18038126.199op/s 18044390.187op/s 18061736.823op/s 0.36% -1.361 1.584 0.30% 3815.454op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 52.858µs 53.111µs ± 0.043µs 53.110µs ± 0.021µs 53.134µs 53.170µs 53.227µs 53.234µs 0.23% -1.305 8.442 0.08% 0.003µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 18785104.664op/s 18828331.725op/s ± 15108.809op/s 18828904.880op/s ± 7399.029op/s 18836000.920op/s 18844575.090op/s 18889178.123op/s 18918576.150op/s 0.48% 1.326 8.546 0.08% 1068.354op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.428µs 6.436µs ± 0.004µs 6.436µs ± 0.002µs 6.438µs 6.443µs 6.449µs 6.460µs 0.38% 1.479 6.098 0.06% 0.000µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 154791822.928op/s 155368596.792op/s ± 96693.193op/s 155373664.167op/s ± 51622.709op/s 155429244.013op/s 155499353.204op/s 155540767.039op/s 155577420.490op/s 0.13% -1.468 6.028 0.06% 6837.241op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
credit_card/is_card_number/ execution_time [3.914µs; 3.915µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ throughput [255459903.607op/s; 255509105.061op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [77.863µs; 78.064µs] or [-0.129%; +0.129%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12811165.623op/s; 12844073.229op/s] or [-0.128%; +0.128%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [72.159µs; 72.342µs] or [-0.126%; +0.126%] None None None
credit_card/is_card_number/ 378282246310005 throughput [13824458.068op/s; 13859283.930op/s] or [-0.126%; +0.126%] None None None
credit_card/is_card_number/37828224631 execution_time [3.914µs; 3.915µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/37828224631 throughput [255455782.537op/s; 255510736.580op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/378282246310005 execution_time [68.766µs; 68.970µs] or [-0.148%; +0.148%] None None None
credit_card/is_card_number/378282246310005 throughput [14500670.291op/s; 14543561.643op/s] or [-0.148%; +0.148%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [53.121µs; 53.131µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [18821481.603op/s; 18824843.934op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.436µs; 6.437µs] or [-0.008%; +0.008%] None None None
credit_card/is_card_number/x371413321323331 throughput [155358011.444op/s; 155383070.498op/s] or [-0.008%; +0.008%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.914µs; 3.914µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ throughput [255461433.805op/s; 255510995.115op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [65.126µs; 65.165µs] or [-0.030%; +0.030%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15345734.401op/s; 15354805.200op/s] or [-0.030%; +0.030%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [58.903µs; 58.966µs] or [-0.053%; +0.053%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [16959251.524op/s; 16977193.110op/s] or [-0.053%; +0.053%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.914µs; 3.915µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255427664.216op/s; 255483853.067op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [55.593µs; 55.640µs] or [-0.042%; +0.042%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [17972902.798op/s; 17987859.103op/s] or [-0.042%; +0.042%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [53.106µs; 53.117µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [18826237.789op/s; 18830425.660op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.436µs; 6.437µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [155355196.045op/s; 155381997.539op/s] or [-0.009%; +0.009%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d1b051f 1759870765 anais/fix-tracer-flare-design
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
redis/obfuscate_redis_string execution_time 34.750µs 35.349µs ± 0.984µs 34.895µs ± 0.064µs 35.020µs 37.454µs 37.518µs 38.584µs 10.57% 1.706 1.062 2.78% 0.070µ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 [35.213µs; 35.485µs] or [-0.386%; +0.386%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d1b051f 1759870765 anais/fix-tracer-flare-design
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.409µs 2.429µs ± 0.016µs 2.425µs ± 0.008µs 2.434µs 2.473µs 2.480µs 2.481µs 2.29% 1.666 2.502 0.67% 0.001µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
tags/replace_trace_tags execution_time [2.427µs; 2.431µs] or [-0.093%; +0.093%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d1b051f 1759870765 anais/fix-tracer-flare-design
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 6.237ms 6.308ms ± 0.035ms 6.303ms ± 0.014ms 6.319ms 6.362ms 6.410ms 6.584ms 4.46% 3.459 21.906 0.55% 0.002ms 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 [6.303ms; 6.313ms] or [-0.077%; +0.077%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d1b051f 1759870765 anais/fix-tracer-flare-design
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
two way interface execution_time 18.083µs 26.860µs ± 10.320µs 18.398µs ± 0.194µs 36.220µs 45.026µs 47.123µs 69.735µs 279.05% 0.807 0.051 38.32% 0.730µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [25.430µs; 28.291µs] or [-5.325%; +5.325%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d1b051f 1759870765 anais/fix-tracer-flare-design
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.984µs 5.069µs ± 0.057µs 5.072µs ± 0.051µs 5.101µs 5.160µs 5.162µs 5.166µs 1.84% 0.328 -1.225 1.12% 0.004µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
ip_address/quantize_peer_ip_address_benchmark execution_time [5.061µs; 5.077µs] or [-0.155%; +0.155%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d1b051f 1759870765 anais/fix-tracer-flare-design
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.787ms 10.818ms ± 0.016ms 10.817ms ± 0.010ms 10.827ms 10.844ms 10.867ms 10.908ms 0.84% 1.333 4.731 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 [10.816ms; 10.821ms] or [-0.020%; +0.020%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d1b051f 1759870765 anais/fix-tracer-flare-design
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.193µs 3.216µs ± 1.432µs 2.990µs ± 0.032µs 3.023µs 3.659µs 14.142µs 14.740µs 392.95% 7.323 54.834 44.42% 0.101µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [3.017µs; 3.414µs] or [-6.171%; +6.171%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d1b051f 1759870765 anais/fix-tracer-flare-design
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 15.018ms 15.066ms ± 0.032ms 15.061ms ± 0.013ms 15.073ms 15.106ms 15.203ms 15.280ms 1.46% 3.190 14.484 0.21% 0.002ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching serializing traces from their internal representation to msgpack execution_time [15.061ms; 15.070ms] or [-0.030%; +0.030%] None None None

Baseline

Omitted due to size.

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Sep 23, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

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

@dd-octo-sts
Copy link

dd-octo-sts bot commented Sep 29, 2025

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.25 MB 7.25 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 71.31 MB 71.31 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 9.20 MB 9.20 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 83.64 MB 83.64 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 18.50 MB 18.50 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 65.77 KB 65.77 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 125.68 MB 125.66 MB --.01% (-24.00 KB) 💪
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 656.43 MB 656.43 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 5.92 MB 5.92 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 65.77 KB 65.77 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 17.44 MB 17.44 MB +.04% (+8.00 KB) 🔍
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 32.40 MB 32.40 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 15.78 MB 15.78 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 66.79 KB 66.79 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 128.00 MB 128.00 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 645.48 MB 645.48 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 4.53 MB 4.53 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 66.79 KB 66.79 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 18.57 MB 18.57 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 30.42 MB 30.42 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 63.91 MB 63.91 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.55 MB 8.55 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 78.37 MB 78.37 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 9.90 MB 9.90 MB 0% (0 B) 👌

}

#[cfg(test)]
mod tests {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think there is test coverage for multi-file scenarios? So the batch processing and priority logic code in check_remote_config_file isn't being tested?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking of testing this directly in the integration tests since it would need to setup a Listener (to use the function that handle the batch of RC) as I already did.

Copy link
Contributor

@VianneyRuhlmann VianneyRuhlmann left a comment

Choose a reason for hiding this comment

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

Some nits about docs and naming but LGTM

///
/// Key responsibilities:
/// - Parsing remote configuration files to determine flare actions (Set log level, Send flare)
/// - Storing agent task metadata needed for flare transmission
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this outdated since you send the task in the action now ?

/// managing the lifecycle of flare collection and transmission. It operates in two modes:
///
/// - **Basic mode**: Stores agent URL and language configuration for flare operations
/// - **Remote config mode**: Listens to remote configuration updates to automatically trigger flare
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I find the name "Remote config mode" a bit confusing as both mode rely on remote config maybe the "no-listener" and "listener" mode is clearer ?


/// Enum that hold the different log level possible
#[derive(Debug, PartialEq)]
/// Enum that holds the different log levels possible
Copy link
Contributor

Choose a reason for hiding this comment

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

You should explicit that we rely on Ord to choose which level to keep and therefore should not change the order of the enum variants.

pub enum ReturnAction {
/// If AGENT_CONFIG received with the right properties.
Start(LogLevel),
/// If AGENT_TASK received with the right properties.
Copy link
Contributor

Choose a reason for hiding this comment

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

More than "when" this action is returned you should explain "what" the tracer should do when receiving this action.

/// * `FlareError(msg)` - If something fail.
pub fn handle_remote_config_file(
file: RemoteConfigFile,
tracer_flare: &mut TracerFlareManager,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this not a method of the tracer flare manager ?

file: RemoteConfigFile,
tracer_flare: &mut TracerFlareManager,
) -> Result<ReturnAction, FlareError> {
fn check_remote_config_file(file: RemoteConfigFile) -> Result<ReturnAction, FlareError> {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I find the names check_remote_config_file and check_remote_config_file a bit confusing maybe this could be parse_remote_config_file or an Implementation of TryFrom<RemoteConfigFile> on ReturnAction

if let ReturnAction::Set(_) = state {
tracer_flare.collecting = true;
} else if let ReturnAction::Send(_) = state {
tracer_flare.collecting = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should Unset also set collecting to false ?

}

#[cfg(test)]
mod tests {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice to have a test for priority as it can also be used as reference for other implementations.

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

Successfully merging this pull request may close these issues.

4 participants