Skip to content

feat!: enable non-blocking DNS for reqwest#1558

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 8 commits intomainfrom
dsn/hickory-dns
Feb 19, 2026
Merged

feat!: enable non-blocking DNS for reqwest#1558
gh-worker-dd-mergequeue-cf854d[bot] merged 8 commits intomainfrom
dsn/hickory-dns

Conversation

@danielsn
Copy link
Contributor

@danielsn danielsn commented Feb 11, 2026

What does this PR do?

  1. Uses hickory dns for reqwest based networking.
  2. Temporarily gates it behind an environment variable to allow runtimes to test and opt-in.

Motivation

https://github.com/DataDog/dd-source/pull/355564

The default DNS resolver used when reqwest does not have the hickory-dns feature has a few issues:

It uses tokio::spawn_blocking for each DNS resolution, because it uses the system getaddrinfo that is sync. This can contribute to saturating the tokio blocking pool in case of slowness
It seems it does this for all DNS requests and has no applicative cache. For df-executor, it results in about 6000 DNS requests per second, the vast majority of them being DNS resolution to S3 and GCP Blob Store.
Hickory DNS is async and has applicative DNS record caching, compliant with DNS TTLs, allowing to:

Avoid saturating the blocking pool (no more blocking tasks for df-executor's IO pool with this PR deployed in staging)
Avoid DNS flooding (signal is noisy for now, I'll take a second look at a larger scale after a full night running)

The non-use of the blocking pool is particularly nice, since it lets us avoid the uncontrolled thread that can break things on forks.

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 requested review from a team as code owners February 11, 2026 21:47
@gyuheon0h gyuheon0h changed the title deps: switch DNS resolver for reqwest to hickory-dns chore(deps): switch DNS resolver for reqwest to hickory-dns Feb 11, 2026
@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 64.35644% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.24%. Comparing base (367c8b2) to head (299c424).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1558      +/-   ##
==========================================
+ Coverage   70.85%   71.24%   +0.39%     
==========================================
  Files         424      423       -1     
  Lines       61963    62130     +167     
==========================================
+ Hits        43903    44267     +364     
+ Misses      18060    17863     -197     
Components Coverage Δ
libdd-crashtracker 62.69% <ø> (+0.24%) ⬆️
libdd-crashtracker-ffi 17.37% <ø> (+1.56%) ⬆️
libdd-alloc 98.77% <ø> (ø)
libdd-data-pipeline 86.92% <ø> (+0.95%) ⬆️
libdd-data-pipeline-ffi 73.55% <ø> (-2.08%) ⬇️
libdd-common 80.17% <58.66%> (+0.37%) ⬆️
libdd-common-ffi 73.40% <0.00%> (-0.35%) ⬇️
libdd-telemetry 62.52% <ø> (ø)
libdd-telemetry-ffi 16.75% <ø> (ø)
libdd-dogstatsd-client 82.64% <ø> (ø)
datadog-ipc 80.71% <ø> (-0.12%) ⬇️
libdd-profiling 81.55% <80.76%> (+0.31%) ⬆️
libdd-profiling-ffi 63.65% <70.58%> (-0.02%) ⬇️
datadog-sidecar 33.64% <ø> (+0.87%) ⬆️
datdog-sidecar-ffi 13.25% <ø> (+3.75%) ⬆️
spawn-worker 54.69% <ø> (ø)
libdd-tinybytes 93.16% <ø> (ø)
libdd-trace-normalization 81.71% <ø> (ø)
libdd-trace-obfuscation 94.21% <ø> (+0.02%) ⬆️
libdd-trace-protobuf 68.00% <ø> (ø)
libdd-trace-utils 89.09% <ø> (+0.36%) ⬆️
datadog-tracer-flare 90.45% <ø> (+1.49%) ⬆️
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.

@pr-commenter
Copy link

pr-commenter bot commented Feb 11, 2026

Benchmarks

Comparison

Benchmark execution time: 2026-02-19 21:07:05

Comparing candidate commit 299c424 in PR branch dsn/hickory-dns with baseline commit 27de9f3 in branch main.

Found 6 performance improvements and 8 performance regressions! Performance is the same for 43 metrics, 2 unstable metrics.

scenario:credit_card/is_card_number/37828224631000521389798

  • 🟥 execution_time [+6.354µs; +6.378µs] or [+13.916%; +13.969%]
  • 🟥 throughput [-2685030.508op/s; -2674809.789op/s] or [-12.260%; -12.213%]

scenario:credit_card/is_card_number/x371413321323331

  • 🟩 execution_time [-402.231ns; -399.365ns] or [-6.250%; -6.205%]
  • 🟩 throughput [+10282516.675op/s; +10354663.299op/s] or [+6.618%; +6.664%]

scenario:credit_card/is_card_number_no_luhn/ 378282246310005

  • 🟥 execution_time [+4.059µs; +4.106µs] or [+7.515%; +7.603%]
  • 🟥 throughput [-1308261.126op/s; -1293944.495op/s] or [-7.066%; -6.988%]

scenario:credit_card/is_card_number_no_luhn/378282246310005

  • 🟥 execution_time [+4.259µs; +4.328µs] or [+8.455%; +8.591%]
  • 🟥 throughput [-1571043.214op/s; -1546702.769op/s] or [-7.914%; -7.792%]

scenario:credit_card/is_card_number_no_luhn/37828224631000521389798

  • 🟥 execution_time [+6.236µs; +6.265µs] or [+13.632%; +13.695%]
  • 🟥 throughput [-2634256.558op/s; -2621603.289op/s] or [-12.050%; -11.992%]

scenario:credit_card/is_card_number_no_luhn/x371413321323331

  • 🟩 execution_time [-404.306ns; -401.882ns] or [-6.280%; -6.243%]
  • 🟩 throughput [+10345162.670op/s; +10407698.522op/s] or [+6.660%; +6.700%]

scenario:normalization/normalize_service/normalize_service/[empty string]

  • 🟩 execution_time [-2.092µs; -2.069µs] or [-5.392%; -5.333%]
  • 🟩 throughput [+1452485.350op/s; +1469088.333op/s] or [+5.635%; +5.699%]

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 299c424 1771534075 dsn/hickory-dns
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 246.356ns 255.464ns ± 11.309ns 250.497ns ± 2.337ns 256.132ns 284.218ns 286.921ns 288.190ns 15.05% 1.713 1.606 4.42% 0.800ns 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 [253.896ns; 257.031ns] or [-0.614%; +0.614%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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.191µs 3.256µs ± 1.469µs 3.006µs ± 0.027µs 3.030µs 3.708µs 14.338µs 15.314µs 409.53% 7.249 54.160 45.01% 0.104µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [3.052µs; 3.459µs] or [-6.253%; +6.253%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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.057µs 5.125µs ± 0.037µs 5.130µs ± 0.034µs 5.159µs 5.171µs 5.190µs 5.194µs 1.24% -0.097 -1.466 0.73% 0.003µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
ip_address/quantize_peer_ip_address_benchmark execution_time [5.120µs; 5.130µs] or [-0.101%; +0.101%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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.897µs 3.912µs ± 0.003µs 3.912µs ± 0.002µs 3.914µs 3.916µs 3.918µs 3.919µs 0.18% -1.133 6.135 0.07% 0.000µs 1 200
credit_card/is_card_number/ throughput 255137931.138op/s 255597532.660op/s ± 167898.868op/s 255592753.291op/s ± 115606.958op/s 255703579.877op/s 255853329.112op/s 255930823.272op/s 256640046.828op/s 0.41% 1.147 6.224 0.07% 11872.243op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 76.644µs 77.795µs ± 0.595µs 77.765µs ± 0.404µs 78.176µs 78.836µs 79.114µs 79.579µs 2.33% 0.344 -0.306 0.76% 0.042µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12566145.168op/s 12854989.723op/s ± 98029.465op/s 12859242.195op/s ± 66493.401op/s 12924252.684op/s 13004765.428op/s 13034859.585op/s 13047265.794op/s 1.46% -0.309 -0.349 0.76% 6931.730op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 69.932µs 70.811µs ± 0.557µs 70.728µs ± 0.369µs 71.115µs 71.844µs 72.209µs 72.417µs 2.39% 0.671 -0.134 0.79% 0.039µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13809004.930op/s 14122910.238op/s ± 110616.215op/s 14138677.787op/s ± 74130.088op/s 14207927.443op/s 14276463.478op/s 14292793.588op/s 14299533.332op/s 1.14% -0.637 -0.190 0.78% 7821.748op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.894µs 3.911µs ± 0.002µs 3.911µs ± 0.001µs 3.913µs 3.915µs 3.917µs 3.919µs 0.21% -1.451 12.987 0.06% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 255158120.699op/s 255665734.116op/s ± 157619.174op/s 255681693.191op/s ± 81160.137op/s 255751700.214op/s 255863595.354op/s 255924138.135op/s 256813053.455op/s 0.44% 1.475 13.170 0.06% 11145.359op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 66.721µs 68.257µs ± 0.749µs 68.222µs ± 0.514µs 68.687µs 69.659µs 70.158µs 70.512µs 3.36% 0.477 -0.033 1.09% 0.053µs 1 200
credit_card/is_card_number/378282246310005 throughput 14181960.106op/s 14652272.704op/s ± 159941.697op/s 14658022.400op/s ± 110342.705op/s 14773988.997op/s 14886612.930op/s 14955475.556op/s 14987882.095op/s 2.25% -0.421 -0.110 1.09% 11309.586op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 51.845µs 52.025µs ± 0.064µs 52.029µs ± 0.039µs 52.066µs 52.130µs 52.171µs 52.178µs 0.29% -0.180 0.227 0.12% 0.004µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 19165032.177op/s 19221551.408op/s ± 23511.419op/s 19220218.795op/s ± 14500.626op/s 19235715.202op/s 19264298.152op/s 19279959.111op/s 19288318.994op/s 0.35% 0.188 0.231 0.12% 1662.508op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.027µs 6.035µs ± 0.006µs 6.034µs ± 0.003µs 6.037µs 6.041µs 6.074µs 6.077µs 0.71% 4.401 27.066 0.10% 0.000µs 1 200
credit_card/is_card_number/x371413321323331 throughput 164546888.316op/s 165695991.840op/s ± 166378.156op/s 165716853.404op/s ± 69073.443op/s 165784537.680op/s 165857035.100op/s 165904183.255op/s 165913680.229op/s 0.12% -4.372 26.815 0.10% 11764.712op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.894µs 3.912µs ± 0.003µs 3.912µs ± 0.001µs 3.914µs 3.917µs 3.918µs 3.920µs 0.19% -1.501 13.327 0.06% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 255124575.354op/s 255599348.279op/s ± 163797.967op/s 255606926.953op/s ± 86989.423op/s 255686453.984op/s 255802682.702op/s 255854961.286op/s 256799716.917op/s 0.47% 1.526 13.523 0.06% 11582.265op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 63.911µs 64.265µs ± 0.190µs 64.247µs ± 0.113µs 64.360µs 64.615µs 64.698µs 65.277µs 1.60% 1.121 3.270 0.29% 0.013µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15319284.829op/s 15560821.201op/s ± 45830.005op/s 15564889.501op/s ± 27397.568op/s 15593836.927op/s 15623248.331op/s 15639522.068op/s 15646685.014op/s 0.53% -1.086 3.084 0.29% 3240.671op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 57.826µs 58.091µs ± 0.158µs 58.045µs ± 0.088µs 58.185µs 58.394µs 58.482µs 58.705µs 1.14% 1.016 0.827 0.27% 0.011µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 17034223.527op/s 17214621.394op/s ± 46635.624op/s 17228080.532op/s ± 26132.762op/s 17246389.602op/s 17270405.265op/s 17288629.988op/s 17293362.807op/s 0.38% -1.002 0.782 0.27% 3297.637op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.893µs 3.912µs ± 0.003µs 3.913µs ± 0.002µs 3.914µs 3.916µs 3.918µs 3.918µs 0.14% -1.832 12.586 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 255221943.777op/s 255601971.678op/s ± 177623.640op/s 255584833.474op/s ± 113913.219op/s 255708361.666op/s 255838583.926op/s 255879135.730op/s 256903128.732op/s 0.52% 1.855 12.792 0.07% 12559.888op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 54.307µs 54.671µs ± 0.200µs 54.613µs ± 0.100µs 54.757µs 55.048µs 55.342µs 55.616µs 1.84% 1.369 2.549 0.36% 0.014µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 17980377.545op/s 18291445.088op/s ± 66548.784op/s 18310585.751op/s ± 33605.720op/s 18338387.603op/s 18365770.434op/s 18386817.099op/s 18413736.648op/s 0.56% -1.341 2.413 0.36% 4705.710op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 51.826µs 51.995µs ± 0.064µs 51.997µs ± 0.042µs 52.035µs 52.090µs 52.140µs 52.304µs 0.59% 0.593 2.033 0.12% 0.005µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 19119119.744op/s 19232665.725op/s ± 23529.035op/s 19231948.713op/s ± 15517.130op/s 19248202.126op/s 19267304.541op/s 19282460.489op/s 19295154.987op/s 0.33% -0.580 1.983 0.12% 1663.754op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.027µs 6.034µs ± 0.006µs 6.033µs ± 0.002µs 6.036µs 6.041µs 6.069µs 6.073µs 0.66% 3.938 19.841 0.10% 0.000µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 164656967.795op/s 165714910.146op/s ± 172107.255op/s 165742926.449op/s ± 64997.947op/s 165806561.795op/s 165864474.840op/s 165908754.516op/s 165915925.457op/s 0.10% -3.918 19.689 0.10% 12169.821op/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.009%; +0.009%] None None None
credit_card/is_card_number/ throughput [255574263.492op/s; 255620801.829op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [77.713µs; 77.878µs] or [-0.106%; +0.106%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12841403.782op/s; 12868575.664op/s] or [-0.106%; +0.106%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [70.734µs; 70.889µs] or [-0.109%; +0.109%] None None None
credit_card/is_card_number/ 378282246310005 throughput [14107579.894op/s; 14138240.581op/s] or [-0.109%; +0.109%] None None None
credit_card/is_card_number/37828224631 execution_time [3.911µs; 3.912µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/37828224631 throughput [255643889.614op/s; 255687578.617op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/378282246310005 execution_time [68.153µs; 68.361µs] or [-0.152%; +0.152%] None None None
credit_card/is_card_number/378282246310005 throughput [14630106.323op/s; 14674439.085op/s] or [-0.151%; +0.151%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [52.016µs; 52.034µs] or [-0.017%; +0.017%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [19218292.951op/s; 19224809.864op/s] or [-0.017%; +0.017%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.034µs; 6.036µs] or [-0.014%; +0.014%] None None None
credit_card/is_card_number/x371413321323331 throughput [165672933.428op/s; 165719050.252op/s] or [-0.014%; +0.014%] 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 [255576647.457op/s; 255622049.102op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [64.238µs; 64.291µs] or [-0.041%; +0.041%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15554469.603op/s; 15567172.799op/s] or [-0.041%; +0.041%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [58.069µs; 58.112µs] or [-0.038%; +0.038%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [17208158.145op/s; 17221084.643op/s] or [-0.038%; +0.038%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.912µs; 3.913µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255577354.750op/s; 255626588.606op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [54.643µs; 54.699µs] or [-0.051%; +0.051%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [18282222.067op/s; 18300668.110op/s] or [-0.050%; +0.050%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [51.986µs; 52.004µs] or [-0.017%; +0.017%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [19229404.827op/s; 19235926.623op/s] or [-0.017%; +0.017%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.034µs; 6.035µs] or [-0.014%; +0.014%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [165691057.736op/s; 165738762.557op/s] or [-0.014%; +0.014%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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 161.903µs 162.528µs ± 0.245µs 162.501µs ± 0.115µs 162.634µs 162.904µs 163.195µs 164.012µs 0.93% 1.870 9.236 0.15% 0.017µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching string interning on wordpress profile execution_time [162.494µs; 162.562µs] or [-0.021%; +0.021%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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 186.131µs 186.566µs ± 0.419µs 186.467µs ± 0.148µs 186.626µs 187.680µs 188.005µs 188.636µs 1.16% 2.352 5.744 0.22% 0.030µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 5301227.685op/s 5360047.383op/s ± 11970.439op/s 5362877.785op/s ± 4248.908op/s 5366828.786op/s 5371474.887op/s 5372432.067op/s 5372558.021op/s 0.18% -2.337 5.665 0.22% 846.438op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 17.814µs 17.968µs ± 0.063µs 17.971µs ± 0.045µs 18.012µs 18.063µs 18.108µs 18.270µs 1.67% 0.440 1.656 0.35% 0.004µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 54733214.349op/s 55655244.033op/s ± 195352.710op/s 55645103.026op/s ± 139194.415op/s 55794204.938op/s 55968891.217op/s 56029417.357op/s 56137068.008op/s 0.88% -0.405 1.522 0.35% 13813.523op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 9.814µs 9.860µs ± 0.024µs 9.855µs ± 0.012µs 9.876µs 9.900µs 9.919µs 9.926µs 0.71% 0.343 -0.126 0.24% 0.002µs 1 200
normalization/normalize_name/normalize_name/good throughput 100750207.416op/s 101421964.510op/s ± 244740.100op/s 101466654.378op/s ± 124405.457op/s 101549671.062op/s 101828853.992op/s 101870515.549op/s 101891240.364op/s 0.42% -0.330 -0.135 0.24% 17305.738op/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.508µs; 186.624µs] or [-0.031%; +0.031%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [5358388.395op/s; 5361706.371op/s] or [-0.031%; +0.031%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [17.959µs; 17.977µs] or [-0.049%; +0.049%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [55628170.026op/s; 55682318.040op/s] or [-0.049%; +0.049%] None None None
normalization/normalize_name/normalize_name/good execution_time [9.857µs; 9.863µs] or [-0.033%; +0.033%] None None None
normalization/normalize_name/normalize_name/good throughput [101388045.886op/s; 101455883.134op/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 299c424 1771534075 dsn/hickory-dns
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.238µs 33.824µs ± 1.002µs 33.370µs ± 0.053µs 33.451µs 35.957µs 36.038µs 37.126µs 11.25% 1.726 1.107 2.96% 0.071µ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.685µs; 33.963µs] or [-0.411%; +0.411%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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 187.115ns 189.503ns ± 1.933ns 189.103ns ± 1.275ns 190.566ns 193.064ns 195.548ns 196.880ns 4.11% 1.274 1.676 1.02% 0.137ns 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 [189.235ns; 189.770ns] or [-0.141%; +0.141%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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 85.832µs 86.179µs ± 0.171µs 86.154µs ± 0.036µs 86.199µs 86.303µs 86.745µs 88.152µs 2.32% 8.233 88.714 0.20% 0.012µ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 [86.155µs; 86.203µs] or [-0.027%; +0.027%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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.135ms 4.139ms ± 0.006ms 4.139ms ± 0.001ms 4.140ms 4.143ms 4.146ms 4.225ms 2.08% 11.917 155.814 0.15% 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.139ms; 4.140ms] or [-0.021%; +0.021%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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 9.777ms 10.102ms ± 0.092ms 10.120ms ± 0.042ms 10.157ms 10.208ms 10.260ms 10.385ms 2.62% -1.207 2.230 0.91% 0.007ms 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 [10.089ms; 10.115ms] or [-0.127%; +0.127%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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.664ms 14.723ms ± 0.039ms 14.716ms ± 0.022ms 14.743ms 14.805ms 14.831ms 14.917ms 1.37% 1.329 2.825 0.27% 0.003ms 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.718ms; 14.729ms] or [-0.037%; +0.037%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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 732.837µs 733.981µs ± 0.525µs 733.934µs ± 0.299µs 734.249µs 734.937µs 735.569µs 735.904µs 0.27% 0.760 1.043 0.07% 0.037µ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 [733.909µs; 734.054µs] or [-0.010%; +0.010%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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 493.982µs 494.920µs ± 0.976µs 494.827µs ± 0.255µs 495.085µs 495.496µs 496.172µs 506.522µs 2.36% 9.113 101.311 0.20% 0.069µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1974246.828op/s 2020534.349op/s ± 3915.159op/s 2020909.452op/s ± 1042.682op/s 2021945.580op/s 2023192.076op/s 2024071.004op/s 2024363.439op/s 0.17% -8.994 99.291 0.19% 276.844op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 383.548µs 384.414µs ± 0.285µs 384.404µs ± 0.199µs 384.604µs 384.878µs 385.114µs 385.360µs 0.25% 0.240 0.433 0.07% 0.020µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2594975.820op/s 2601360.146op/s ± 1931.572op/s 2601426.823op/s ± 1348.939op/s 2602752.529op/s 2604142.792op/s 2605986.097op/s 2607232.510op/s 0.22% -0.235 0.431 0.07% 136.583op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 167.656µs 168.020µs ± 0.200µs 167.994µs ± 0.120µs 168.126µs 168.386µs 168.574µs 168.971µs 0.58% 1.078 2.488 0.12% 0.014µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5918178.566op/s 5951691.970op/s ± 7084.125op/s 5952610.026op/s ± 4248.293op/s 5956675.506op/s 5961756.401op/s 5963632.959op/s 5964582.586op/s 0.20% -1.067 2.439 0.12% 500.923op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 36.544µs 36.714µs ± 0.072µs 36.705µs ± 0.047µs 36.752µs 36.837µs 36.899µs 36.938µs 0.63% 0.573 0.217 0.19% 0.005µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 27072749.515op/s 27237634.994op/s ± 53058.439op/s 27244490.633op/s ± 34554.156op/s 27276213.929op/s 27312835.681op/s 27333506.821op/s 27364334.154op/s 0.44% -0.562 0.201 0.19% 3751.798op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 45.392µs 45.500µs ± 0.102µs 45.492µs ± 0.027µs 45.520µs 45.565µs 45.617µs 46.821µs 2.92% 10.795 136.724 0.22% 0.007µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21357856.582op/s 21978224.450op/s ± 48334.396op/s 21981817.129op/s ± 13153.726op/s 21994532.648op/s 22012828.319op/s 22018775.696op/s 22030346.067op/s 0.22% -10.645 134.153 0.22% 3417.758op/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 [494.785µs; 495.056µs] or [-0.027%; +0.027%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [2019991.745op/s; 2021076.952op/s] or [-0.027%; +0.027%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [384.375µs; 384.454µs] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2601092.449op/s; 2601627.843op/s] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [167.992µs; 168.047µs] or [-0.017%; +0.017%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5950710.179op/s; 5952673.762op/s] or [-0.016%; +0.016%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [36.704µs; 36.724µs] or [-0.027%; +0.027%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [27230281.605op/s; 27244988.384op/s] or [-0.027%; +0.027%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [45.486µs; 45.514µs] or [-0.031%; +0.031%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21971525.767op/s; 21984923.132op/s] or [-0.030%; +0.030%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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.523µs 25.296µs ± 9.410µs 17.871µs ± 0.271µs 33.683µs 42.979µs 52.312µs 63.383µs 254.67% 1.041 0.980 37.11% 0.665µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [23.992µs; 26.600µs] or [-5.155%; +5.155%] None None None

Group 16

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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 50.281ms 50.584ms ± 1.080ms 50.394ms ± 0.062ms 50.511ms 50.760ms 56.512ms 61.521ms 22.08% 8.221 70.791 2.13% 0.076ms 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 [50.434ms; 50.734ms] or [-0.296%; +0.296%] None None None

Group 17

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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 143.915µs 146.061µs ± 1.712µs 145.788µs ± 0.517µs 146.340µs 147.789µs 151.650µs 162.849µs 11.70% 5.978 50.028 1.17% 0.121µ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.823µs; 146.298µs] or [-0.162%; +0.162%] None None None

Group 18

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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.634ms 10.660ms ± 0.014ms 10.658ms ± 0.008ms 10.667ms 10.681ms 10.701ms 10.741ms 0.77% 1.866 8.187 0.13% 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.658ms; 10.662ms] or [-0.018%; +0.018%] None None None

Group 19

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 299c424 1771534075 dsn/hickory-dns
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.403µs 2.440µs ± 0.017µs 2.439µs ± 0.007µs 2.445µs 2.484µs 2.491µs 2.492µs 2.15% 1.107 2.425 0.68% 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.438µs; 2.442µs] or [-0.094%; +0.094%] None None None

Baseline

Omitted due to size.

@danielsn danielsn requested a review from a team as a code owner February 11, 2026 22:10
@dd-octo-sts
Copy link

dd-octo-sts bot commented Feb 11, 2026

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 91.60 MB 98.06 MB +7.04% (+6.45 MB) 🚨
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 8.38 MB 9.01 MB +7.49% (+643.71 KB) 🚨
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.76 MB 11.58 MB +7.63% (+841.63 KB) 🚨
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 106.31 MB 113.69 MB +6.94% (+7.38 MB) 🚨
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 25.01 MB 27.73 MB +10.88% (+2.72 MB) 🚨
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 75.94 KB 76.26 KB +.41% (+324 B) 🔍
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 166.61 MB 186.33 MB +11.83% (+19.72 MB) 🚨
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 838.60 MB 919.90 MB +9.69% (+81.30 MB) 🚨
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 9.57 MB 10.33 MB +7.96% (+781.00 KB) 🚨
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 75.94 KB 76.26 KB +.41% (+324 B) 🔍
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 23.02 MB 24.98 MB +8.51% (+1.96 MB) 🚨
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 48.42 MB 52.29 MB +7.98% (+3.86 MB) 🚨
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 21.09 MB 23.49 MB +11.36% (+2.39 MB) 🚨
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 77.12 KB 77.44 KB +.41% (+330 B) 🔍
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 170.37 MB 190.78 MB +11.98% (+20.41 MB) 🚨
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 824.57 MB 905.31 MB +9.79% (+80.74 MB) 🚨
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 7.24 MB 7.84 MB +8.25% (+612.00 KB) 🚨
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 77.12 KB 77.44 KB +.41% (+330 B) 🔍
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 24.62 MB 26.75 MB +8.66% (+2.13 MB) 🚨
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 44.15 MB 47.82 MB +8.30% (+3.66 MB) 🚨
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 80.15 MB 86.17 MB +7.52% (+6.02 MB) 🚨
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 9.87 MB 10.53 MB +6.68% (+675.71 KB) 🚨
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 100.25 MB 106.77 MB +6.51% (+6.52 MB) 🚨
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.44 MB 12.28 MB +7.30% (+856.57 KB) 🚨

@danielsn danielsn requested a review from a team as a code owner February 12, 2026 00:23
Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

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

Nice, this was way easier than I was expecting! I've left you a question in PM, otherwise happy to approve :)

@danielsn danielsn changed the title chore(deps): switch DNS resolver for reqwest to hickory-dns feat: enable non-blocking DNS for reqwest Feb 12, 2026
@github-actions
Copy link

github-actions bot commented Feb 17, 2026

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/dsn/hickory-dns

Summary by Rule

Rule Base Branch PR Branch Change
unwrap_used 5 5 No change (0%)
Total 5 5 No change (0%)

Annotation Counts by File

File Base Branch PR Branch Change
libdd-common-ffi/src/endpoint.rs 2 2 No change (0%)
libdd-common/src/lib.rs 3 3 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 27 27 No change (0%)
datadog-live-debugger 6 6 No change (0%)
datadog-live-debugger-ffi 10 10 No change (0%)
datadog-profiling-replayer 4 4 No change (0%)
datadog-remote-config 3 3 No change (0%)
datadog-sidecar 59 59 No change (0%)
libdd-common 10 10 No change (0%)
libdd-common-ffi 12 12 No change (0%)
libdd-crashtracker 12 12 No change (0%)
libdd-data-pipeline 5 5 No change (0%)
libdd-ddsketch 2 2 No change (0%)
libdd-dogstatsd-client 1 1 No change (0%)
libdd-profiling 13 13 No change (0%)
libdd-telemetry 19 19 No change (0%)
libdd-tinybytes 4 4 No change (0%)
libdd-trace-normalization 2 2 No change (0%)
libdd-trace-obfuscation 9 9 No change (0%)
libdd-trace-utils 15 15 No change (0%)
Total 219 219 No change (0%)

About This Report

This report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality.

Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

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

I really like this! Left a few notes :)

Comment on lines -149 to +158
#
# `rustls-platform-verifier` uses the Windows certificate APIs (Cert*), which live in Crypt32.
"ws2_32.lib", "advapi32.lib", "userenv.lib", "ntdll.lib", "bcrypt.lib", "ole32.lib", "crypt32.lib"
"advapi32.lib",
"bcrypt.lib",
# `rustls-platform-verifier` uses the Windows certificate APIs (Cert*), which live in Crypt32
"crypt32.lib",
# `hickory-resolver` uses GetAdaptersAddresses, which lives in iphlpapi.
"iphlpapi.lib",
"ntdll.lib",
"ole32.lib",
"userenv.lib",
"ws2_32.lib"
Copy link
Member

Choose a reason for hiding this comment

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

(Note to other reviewers -- same list of libraries reordered, with only iphlpapi.lib being new)

PowrProf
Version)
Version
iphlpapi)
Copy link
Member

Choose a reason for hiding this comment

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

This part I'm not confident at all in -- maybe worth confirming with @gleocadie that this new dll dependency is fine?

Comment on lines 348 to 353
let use_hickory = std::env::var("DD_USE_HICKORY_DNS")
.ok()
.as_ref()
.map(|s| matches!(s.trim().to_lowercase().as_str(), "1" | "true" | "yes"))
.unwrap_or(false);
builder = builder.hickory_dns(use_hickory);
Copy link
Member

Choose a reason for hiding this comment

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

Regardless of the default (I'll comment on that separately), DD_USE_HICKORY_DNS seems to be a bit... too low level?

Maybe flip it around and use DD_FORCE_SYSTEM_DNS/DD_USE_LEGACY_DNS? Or, if not flipping it, DD_USE_BUILTIN_DNS?

Comment on lines 346 to 347
// DNS resolver: use hickory only when DD_USE_HICKORY_DNS is set to a truthy value
// (e.g. 1, true, yes). Otherwise use the system resolver.
Copy link
Member

Choose a reason for hiding this comment

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

Unless I'm mistaken, only profiling is using the to_reqwest_client_builder. Being that the case, since it's already quite limited subset, I'd go with perhaps using hickory_dns by default, and then dropping a note to every library using libdatadog to perhaps include the env var as a release note in case anyone sees any resolver-related issues?

Also, and I think this would make testing a lot easier -- maybe we could take advantage of the above in an additional way: make the use_hickory a regular argument of this method, and have the env var parsing be part of the caller for now.

This enables easier testing of common AND enables us to evolve a bit how this toggling happens without ever needing to touch this code (which seems nice?)

Comment on lines 86 to 135
/// Client resolves host via hickory when DD_USE_HICKORY_DNS is set.
/// Uses http://example.com/ so DNS is actually exercised; example.com is reserved by
/// RFC 2606 for documentation and testing. These tests require network access.
#[tokio::test]
#[cfg_attr(miri, ignore)]
async fn test_hickory_dns_env_enabled() {
let _guard = EnvGuard::set("DD_USE_HICKORY_DNS", "1");
let endpoint = Endpoint::from_slice("http://example.com/");

let (builder, url) = endpoint
.to_reqwest_client_builder()
.expect("should build client");
let client = builder.build().expect("should create client");

let response = client
.get(&url)
.send()
.await
.expect("request should succeed");
assert!(
response.status().is_success() || response.status().is_redirection(),
"status: {}",
response.status()
);
}

/// Client resolves host via system resolver when DD_USE_HICKORY_DNS is unset.
/// Uses http://example.com/ so DNS is actually exercised; example.com is reserved by
/// RFC 2606 for documentation and testing. These tests require network access.
#[tokio::test]
#[cfg_attr(miri, ignore)]
async fn test_hickory_dns_env_disabled() {
let _guard = EnvGuard::remove("DD_USE_HICKORY_DNS");
let endpoint = Endpoint::from_slice("http://example.com/");

let (builder, url) = endpoint
.to_reqwest_client_builder()
.expect("should build client");
let client = builder.build().expect("should create client");

let response = client
.get(&url)
.send()
.await
.expect("request should succeed");
assert!(
response.status().is_success() || response.status().is_redirection(),
"status: {}",
response.status()
);
Copy link
Member

Choose a reason for hiding this comment

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

Hmmm... this is quite brittle -- for instance reading the docs:

Image

It sounds like hickory may even be used by default even if the feature isn't enabled...? So there's a non-zero chance this test is not only brittle, but possibly misleading?


Looking at the docs, it looks like the reqwest::Client::builder() has also a dns_resolver parameter where a resolver can be passed in.

What if we allowed the resolver to be injected? E.g. basically reproduce what the match config.hickory_dns is doing in https://docs.rs/reqwest/latest/src/reqwest/async_impl/client.rs.html#421 ?

That way our tests could become:

fn test_without_hickory() {
  let resolver = GaiResolver::new();
  let builder = to_reqwest_client_builder(resolver);
  
  let response = ...
  // maybe somehow assert resolver got called?
}

fn test_with_hickory() {
  let resolver = HickoryDnsResolver::default();
  let builder = to_reqwest_client_builder(resolver);

  let response = ...
  // maybe somehow assert resolver got called? perhaps even by setting some config where only hickory can resolve?
}

Comment on lines 149 to 174
// Phase 1: hickory enabled — create client, send request, drop client, count threads.
let threads_after_hickory = {
let _guard = EnvGuard::set("DD_USE_HICKORY_DNS", "1");
let (builder, url) = endpoint
.to_reqwest_client_builder()
.expect("should build client");
let client = builder.build().expect("should create client");
let _ = client.get(&url).send().await;
drop(client);
drop(_guard);
count_active_threads().expect("count_active_threads not supported on this platform")
};

// Phase 2: system resolver — create client, send request, count threads (client alive).
let threads_with_system = {
let _guard = EnvGuard::remove("DD_USE_HICKORY_DNS");
let (builder, url) = endpoint
.to_reqwest_client_builder()
.expect("should build client");
let client = builder.build().expect("should create client");
let _ = client.get(&url).send().await;
let count = count_active_threads()
.expect("count_active_threads not supported on this platform");
drop(_guard);
count
};
Copy link
Member

Choose a reason for hiding this comment

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

This test seems to be somewhat... weird/unfair. That is why do we drop the client before we do the check for hickory but not the system dns? Doesn't that mean that if hickory did actually use an extra thread but cleaned it up on drop, we wouldn't see it?

E.g. I think the test should maybe be exactly the same between both variants, the only difference should be the actual toggling on and off, and us observing the different number of threads, not the order of operations.

Comment on lines 176 to 182
assert_eq!(
threads_with_system,
threads_after_hickory + 1,
"system resolver should use one more thread than hickory (hickory: {}, system: {})",
threads_after_hickory,
threads_with_system
);
Copy link
Member

Choose a reason for hiding this comment

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

Is this test... going to be flaky? E.g. I can imagine we're relying on things such as "how long does the background extra thread spawned for dns stay alive" -- or would it stay alive forever? Might be worth doing a quick check that this test is not relying too much on a race.

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Feb 18, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

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

@danielsn danielsn changed the title feat: enable non-blocking DNS for reqwest feat!: enable non-blocking DNS for reqwest Feb 18, 2026
Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

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

Gave it another pass! Overall I think it's fine although:

  1. It's weird to me to expose "hickory-dns" anywhere beyond the core
  2. The way we're enabling/disabling hickory, as well as testing it, is a bit brittle and I think even staying within rust's weird constraints it's possible to further improve the tests

};
}

/// Set whether to use the system DNS resolver instead of hickory-dns when building the reqwest
Copy link
Member

Choose a reason for hiding this comment

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

I think in general the words "hickory-dns" are an implementation detail that is weird to see showing up outside of the actual configuration of reqwest in common.

That is -- we could as well use any other dns resolver, or even roll out our own, the key distinction between both modes is "using the system resolver or not" ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Comment on lines 86 to 134
/// Client resolves host via hickory when use_system_resolver is false.
/// Uses http://example.com/ so DNS is actually exercised; example.com is reserved by
/// RFC 2606 for documentation and testing. These tests require network access.
#[tokio::test]
#[cfg_attr(miri, ignore)]
async fn test_hickory_dns_when_system_resolver_disabled() {
let endpoint = Endpoint::from_slice("http://example.com/").with_system_resolver(false);

let (builder, url) = endpoint
.to_reqwest_client_builder()
.expect("should build client");
let client = builder.build().expect("should create client");

let response = client
.get(&url)
.send()
.await
.expect("request should succeed");
assert!(
response.status().is_success() || response.status().is_redirection(),
"status: {}",
response.status()
);
}

/// Client resolves host via system resolver when with_system_resolver(true) is used.
/// Uses http://example.com/ so DNS is actually exercised; example.com is reserved by
/// RFC 2606 for documentation and testing. These tests require network access.
#[tokio::test]
#[cfg_attr(miri, ignore)]
async fn test_system_resolver_when_requested() {
let endpoint = Endpoint::from_slice("http://example.com/").with_system_resolver(true);

let (builder, url) = endpoint
.to_reqwest_client_builder()
.expect("should build client");
let client = builder.build().expect("should create client");

let response = client
.get(&url)
.send()
.await
.expect("request should succeed");
assert!(
response.status().is_success() || response.status().is_redirection(),
"status: {}",
response.status()
);
}
Copy link
Member

Choose a reason for hiding this comment

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

Idk, I'm still not a fan of this test as-is: it can still pass even if hickory is both used for both tests OR never used in either test AND requires network: so double whammy of meh things.

Yes, we have the "saves thread" test below, but I think it's really brittle to rely on it. And, well, if we're relying on it, then these two aren't doing anything and we should just delete them.

(I'd still recommend going with the option of allowing the resolver to be injected directly, and then having helper methods to set hickory/system still, so callers didn't themselves need to do that. That's what I'd do if I was implementing this in Ruby -- although I'd use argument defaults to make it a bit nicer)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tried updating the tests.

Comment on lines +107 to +109
/// TODO: Even the in-process resolver can lead to long-lived threads that outlast the
/// runtime (e.g. on OSX the "Grand Central Dispatch" thread). This should be
/// investigated so we can tighten or simplify the assertions.
Copy link
Member

Choose a reason for hiding this comment

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

If the extra threads are on macOS, can we relax the assertion only there? If we use the stricter assertions on Linux, we might be able to catch a "oops" that the relaxed assertions for macOS might let slip.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It appears to also be linux, I just have not investigated those as carefully. Going to merge this since its an improvement, then keep looking to try to understand the other threads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments