Skip to content

fix(obfuscation): prevent crash and cap recursion in SQL/HTTP obfuscation - #2441

Open
ajgajg1134 wants to merge 3 commits into
mainfrom
andrew.glaude/noCrash
Open

fix(obfuscation): prevent crash and cap recursion in SQL/HTTP obfuscation#2441
ajgajg1134 wants to merge 3 commits into
mainfrom
andrew.glaude/noCrash

Conversation

@ajgajg1134

@ajgajg1134 ajgajg1134 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Cap recursion depth for nested dollar-quoted SQL strings so pathologically nested input can no longer exhaust the stack and abort the process.
  • Fix a fallback path in URL obfuscation that could return an unparseable URL with userinfo still attached instead of stripping it.

Fixes APMSP-3086 and APMSP-3085

Test plan

  • cargo nextest run -p libdd-trace-obfuscation (343 tests, incl. new regression tests for both fixes)
  • cargo fmt --check / cargo clippy -D warnings clean

🤖 Generated with Claude Code

…tion

Cap recursion depth for nested dollar-quoted SQL strings so pathological
nesting can no longer exhaust the stack and abort the process, and fix a
fallback path in URL obfuscation that could return an unparseable URL
with userinfo still attached instead of stripping it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation Check Results

⚠️ 853 documentation warning(s) found

📦 libdd-trace-obfuscation - 853 warning(s)


Updated: 2026-09-02 16:57:32 UTC | Commit: 21567ef | missing-docs job results

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🔒 Cargo Deny Results

⚠️ 3 issue(s) found, showing only errors (advisories, bans, sources)

📦 libdd-trace-obfuscation - 3 error(s)

Show output
error[vulnerability]: Invalid pointer dereference in `fmt::Pointer` impl for `Atomic` and `Shared` when the underlying pointer is invalid
   ┌─ /home/runner/work/libdatadog/libdatadog/Cargo.lock:64:1
   │
64 │ crossbeam-epoch 0.9.18 registry+https://github.com/rust-lang/crates.io-index
   │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ security vulnerability detected
   │
   ├ ID: RUSTSEC-2026-0204
   ├ Advisory: https://rustsec.org/advisories/RUSTSEC-2026-0204
   ├ Affected versions of `fmt::Display` dereference the underlying pointer. This causes a invalid pointer dereference e.g., when a pointer created with `Atomic::null` or `Shared::null`. `fmt::Debug` impls and pre-0.9 `fmt::Display` impls, which do not dereference pointers, are not affected by this issue.
   ├ Announcement: https://github.com/crossbeam-rs/crossbeam/pull/1276
   ├ Solution: Upgrade to >=0.9.20 (try `cargo update -p crossbeam-epoch`)
   ├ crossbeam-epoch v0.9.18
     └── crossbeam-deque v0.8.5
         └── rayon-core v1.12.1
             └── rayon v1.10.0
                 └── criterion v0.5.1
                     ├── libdd-common v5.2.0
                     │   ├── libdd-capabilities-impl v4.0.0
                     │   │   └── libdd-trace-utils v11.0.0
                     │   │       ├── libdd-trace-obfuscation v7.0.0
                     │   │       └── (dev) libdd-trace-utils v11.0.0 (*)
                     │   ├── libdd-trace-obfuscation v7.0.0 (*)
                     │   └── libdd-trace-utils v11.0.0 (*)
                     ├── (dev) libdd-trace-normalization v4.0.0
                     │   └── libdd-trace-utils v11.0.0 (*)
                     ├── (dev) libdd-trace-obfuscation v7.0.0 (*)
                     └── (dev) libdd-trace-utils v11.0.0 (*)

error[vulnerability]: h2 unbounded empty DATA frames
    ┌─ /home/runner/work/libdatadog/libdatadog/Cargo.lock:101:1
    │
101 │ h2 0.4.6 registry+https://github.com/rust-lang/crates.io-index
    │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ security vulnerability detected
    │
    ├ ID: RUSTSEC-2026-0258
    ├ Advisory: https://rustsec.org/advisories/RUSTSEC-2026-0258
    ├ The h2 crate, used internally by hyper, had a flaw that would accept and queue empty DATA frames without limit.
      If streams were not actively drained, this could lead to unbounded memory usage, or a panic if the length overflows.
      
      Low severity.
      
      Patched in v0.4.16.
    ├ Announcement: https://github.com/hyperium/hyper/security/advisories/GHSA-q83h-524g-xf6h
    ├ Solution: Upgrade to >=0.4.16 (try `cargo update -p h2`)
    ├ h2 v0.4.6
      └── hyper v1.6.0
          ├── httpmock v0.8.0-alpha.1
          │   └── libdd-trace-utils v11.0.0
          │       ├── libdd-trace-obfuscation v7.0.0
          │       └── (dev) libdd-trace-utils v11.0.0 (*)
          ├── hyper-rustls v0.27.7
          │   └── libdd-common v5.2.0
          │       ├── libdd-capabilities-impl v4.0.0
          │       │   └── libdd-trace-utils v11.0.0 (*)
          │       ├── libdd-trace-obfuscation v7.0.0 (*)
          │       └── libdd-trace-utils v11.0.0 (*)
          ├── hyper-util v0.1.17
          │   ├── httpmock v0.8.0-alpha.1 (*)
          │   ├── hyper-rustls v0.27.7 (*)
          │   └── libdd-common v5.2.0 (*)
          ├── libdd-common v5.2.0 (*)
          └── libdd-trace-utils v11.0.0 (*)

error[unsound]: Rand is unsound with a custom logger using `rand::rng()`
    ┌─ /home/runner/work/libdatadog/libdatadog/Cargo.lock:189:1
    │
189 │ rand 0.8.5 registry+https://github.com/rust-lang/crates.io-index
    │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ unsound advisory detected
    │
    ├ ID: RUSTSEC-2026-0097
    ├ Advisory: https://rustsec.org/advisories/RUSTSEC-2026-0097
    ├ It has been reported (by [@lopopolo](https://github.com/lopopolo)) that the `rand` library is [unsound](https://rust-lang.github.io/unsafe-code-guidelines/glossary.html#soundness-of-code--of-a-library) (i.e. that safe code using the public API can cause Undefined Behaviour) when all the following conditions are met:
      
      - The `log` and `thread_rng` features are enabled
      - A [custom logger](https://docs.rs/log/latest/log/#implementing-a-logger) is defined
      - The custom logger accesses `rand::rng()` (previously `rand::thread_rng()`) and calls any `TryRng` (previously `RngCore`) methods on `ThreadRng`
      - The `ThreadRng` (attempts to) reseed while called from the custom logger (this happens every 64 kB of generated data)
      - Trace-level logging is enabled or warn-level logging is enabled and the random source (the `getrandom` crate) is unable to provide a new seed
      
      `TryRng` (previously `RngCore`) methods for `ThreadRng` use `unsafe` code to cast `*mut BlockRng<ReseedingCore>` to `&mut BlockRng<ReseedingCore>`. When all the above conditions are met this results in an aliased mutable reference, violating the Stacked Borrows rules. Miri is able to detect this violation in sample code. Since construction of [aliased mutable references is Undefined Behaviour](https://doc.rust-lang.org/stable/nomicon/references.html), the behaviour of optimized builds is hard to predict.
    ├ Announcement: https://github.com/rust-random/rand/pull/1763
    ├ Solution: Upgrade to >=0.10.1 OR <0.10.0, >=0.9.3 OR <0.9.0, >=0.8.6 (try `cargo update -p rand`)
    ├ rand v0.8.5
      ├── (dev) libdd-common v5.2.0
      │   ├── libdd-capabilities-impl v4.0.0
      │   │   └── libdd-trace-utils v11.0.0
      │   │       ├── libdd-trace-obfuscation v7.0.0
      │   │       └── (dev) libdd-trace-utils v11.0.0 (*)
      │   ├── libdd-trace-obfuscation v7.0.0 (*)
      │   └── libdd-trace-utils v11.0.0 (*)
      ├── (dev) libdd-trace-normalization v4.0.0
      │   └── libdd-trace-utils v11.0.0 (*)
      ├── libdd-trace-utils v11.0.0 (*)
      └── proptest v1.5.0
          ├── (dev) libdd-common v5.2.0 (*)
          └── (dev) libdd-tinybytes v1.1.2
              ├── (dev) libdd-tinybytes v1.1.2 (*)
              ├── (dev) libdd-trace-obfuscation v7.0.0 (*)
              └── libdd-trace-utils v11.0.0 (*)

advisories FAILED, bans ok, sources ok

Updated: 2026-09-02 16:59:21 UTC | Commit: 21567ef | dependency-check job results

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Sep 1, 2026

Copy link
Copy Markdown

Pipelines  Tests

⚠️ Warnings

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 1 Pipeline job failed

Required checks pass | allchecks

View more details · View in GitHub Actions

Some checks have failed or timed out. Check the workflow run summary for details.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 76.98% (+0.02%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5fef749 | Docs | View more details | Give us feedback!

@pr-commenter

pr-commenter Bot commented Sep 1, 2026

Copy link
Copy Markdown

Benchmarks

Comparison

Benchmark execution time: 2026-09-02 17:09:43

Comparing candidate commit 5fef749 in PR branch andrew.glaude/noCrash with baseline commit f3fd6c3 in branch main.

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

Explanation

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

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

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

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

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

More details about the CI and significant changes

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

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

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

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

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

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

scenario:trace_buffer/2_senders/no_delay

  • 🟥 execution_time [+106.104µs; +123.279µs] or [+7.022%; +8.158%]
  • 🟥 throughput [-90120.488op/s; -77671.182op/s] or [-7.560%; -6.516%]

Candidate

Candidate benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz 5fef749 1788368136 andrew.glaude/noCrash
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
trace_buffer/1_senders/10us_delay execution_time 60.040ms 60.086ms ± 0.035ms 60.075ms ± 0.010ms 60.096ms 60.148ms 60.210ms 60.281ms 0.34% 2.129 6.322 0.06% 0.002ms 1 200
trace_buffer/1_senders/10us_delay throughput 14929.954op/s 14978.474op/s ± 8.665op/s 14981.299op/s ± 2.514op/s 14983.135op/s 14987.622op/s 14989.540op/s 14989.899op/s 0.06% -2.123 6.278 0.06% 0.613op/s 1 200
trace_buffer/1_senders/1us_delay execution_time 50.117ms 50.547ms ± 0.302ms 50.455ms ± 0.119ms 50.622ms 51.229ms 51.324ms 51.333ms 1.74% 1.342 0.740 0.60% 0.021ms 1 200
trace_buffer/1_senders/1us_delay throughput 17532.669op/s 17805.962op/s ± 105.516op/s 17837.587op/s ± 42.151op/s 17877.637op/s 17908.956op/s 17935.997op/s 17957.858op/s 0.67% -1.326 0.704 0.59% 7.461op/s 1 200
trace_buffer/1_senders/no_delay execution_time 345.835µs 355.110µs ± 3.758µs 355.172µs ± 1.323µs 356.351µs 359.642µs 365.771µs 383.331µs 7.93% 2.370 16.100 1.06% 0.266µs 1 200
trace_buffer/1_senders/no_delay throughput 2347837.399op/s 2534702.219op/s ± 26222.819op/s 2533981.607op/s ± 9402.105op/s 2545648.381op/s 2576878.506op/s 2585896.033op/s 2602394.453op/s 2.70% -2.000 13.153 1.03% 1854.233op/s 1 200
trace_buffer/2_senders/10us_delay execution_time 60.051ms 60.137ms ± 0.046ms 60.133ms ± 0.025ms 60.152ms 60.241ms 60.285ms 60.308ms 0.29% 1.409 2.286 0.08% 0.003ms 1 200
trace_buffer/2_senders/10us_delay throughput 29846.935op/s 29931.443op/s ± 22.823op/s 29933.776op/s ± 12.325op/s 29947.351op/s 29957.337op/s 29966.168op/s 29974.290op/s 0.14% -1.403 2.269 0.08% 1.614op/s 1 200
trace_buffer/2_senders/1us_delay execution_time 50.465ms 51.002ms ± 0.159ms 51.004ms ± 0.092ms 51.102ms 51.244ms 51.328ms 51.363ms 0.71% -0.529 0.758 0.31% 0.011ms 1 200
trace_buffer/2_senders/1us_delay throughput 35044.365op/s 35292.836op/s ± 110.279op/s 35291.566op/s ± 63.503op/s 35352.511op/s 35473.752op/s 35594.463op/s 35668.198op/s 1.07% 0.552 0.800 0.31% 7.798op/s 1 200
trace_buffer/2_senders/no_delay execution_time 1.505ms 1.626ms ± 0.048ms 1.623ms ± 0.030ms 1.657ms 1.702ms 1.745ms 1.816ms 11.87% 0.457 0.852 2.94% 0.003ms 1 200
trace_buffer/2_senders/no_delay throughput 991438.329op/s 1108122.551op/s ± 32318.666op/s 1109151.600op/s ± 20495.691op/s 1127332.918op/s 1158301.608op/s 1175577.744op/s 1195980.202op/s 7.83% -0.237 0.450 2.91% 2285.275op/s 1 200
trace_buffer/4_senders/10us_delay execution_time 60.115ms 60.196ms ± 0.049ms 60.183ms ± 0.021ms 60.210ms 60.295ms 60.348ms 60.448ms 0.44% 1.757 4.119 0.08% 0.003ms 1 200
trace_buffer/4_senders/10us_delay throughput 59555.698op/s 59804.624op/s ± 48.726op/s 59817.726op/s ± 20.860op/s 59835.829op/s 59853.156op/s 59875.642op/s 59885.644op/s 0.11% -1.750 4.079 0.08% 3.445op/s 1 200
trace_buffer/4_senders/1us_delay execution_time 50.999ms 51.293ms ± 0.166ms 51.250ms ± 0.064ms 51.343ms 51.545ms 51.751ms 52.602ms 2.64% 3.458 21.141 0.32% 0.012ms 1 200
trace_buffer/4_senders/1us_delay throughput 68438.311op/s 70185.081op/s ± 224.392op/s 70244.322op/s ± 87.810op/s 70321.378op/s 70399.079op/s 70526.566op/s 70589.340op/s 0.49% -3.352 20.058 0.32% 15.867op/s 1 200
trace_buffer/4_senders/no_delay execution_time 3.557ms 3.659ms ± 0.040ms 3.657ms ± 0.024ms 3.685ms 3.717ms 3.745ms 3.885ms 6.23% 0.811 4.551 1.08% 0.003ms 1 200
trace_buffer/4_senders/no_delay throughput 926663.873op/s 984039.858op/s ± 10559.870op/s 984438.280op/s ± 6407.413op/s 990266.142op/s 1001304.864op/s 1008691.208op/s 1012086.050op/s 2.81% -0.631 3.672 1.07% 746.696op/s 1 200
trace_buffer/8_senders/10us_delay execution_time 60.204ms 60.351ms ± 0.081ms 60.329ms ± 0.047ms 60.409ms 60.528ms 60.587ms 60.617ms 0.48% 1.102 0.901 0.13% 0.006ms 1 200
trace_buffer/8_senders/10us_delay throughput 118779.423op/s 119301.788op/s ± 159.766op/s 119345.503op/s ± 93.562op/s 119424.845op/s 119472.966op/s 119517.573op/s 119593.978op/s 0.21% -1.096 0.881 0.13% 11.297op/s 1 200
trace_buffer/8_senders/1us_delay execution_time 51.291ms 51.724ms ± 0.353ms 51.567ms ± 0.160ms 51.985ms 52.412ms 52.499ms 52.734ms 2.26% 0.878 -0.510 0.68% 0.025ms 1 200
trace_buffer/8_senders/1us_delay throughput 136535.231op/s 139206.710op/s ± 945.485op/s 139624.541op/s ± 433.553op/s 139921.487op/s 140204.573op/s 140330.344op/s 140374.142op/s 0.54% -0.864 -0.542 0.68% 66.856op/s 1 200
trace_buffer/8_senders/no_delay execution_time 7.076ms 7.208ms ± 0.049ms 7.207ms ± 0.032ms 7.243ms 7.278ms 7.340ms 7.423ms 2.99% 0.512 1.466 0.68% 0.003ms 1 200
trace_buffer/8_senders/no_delay throughput 969980.496op/s 998874.997op/s ± 6783.500op/s 998987.035op/s ± 4357.642op/s 1002967.195op/s 1009423.385op/s 1012120.309op/s 1017528.003op/s 1.86% -0.448 1.285 0.68% 479.666op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
trace_buffer/1_senders/10us_delay execution_time [60.081ms; 60.091ms] or [-0.008%; +0.008%] None None None
trace_buffer/1_senders/10us_delay throughput [14977.273op/s; 14979.675op/s] or [-0.008%; +0.008%] None None None
trace_buffer/1_senders/1us_delay execution_time [50.505ms; 50.588ms] or [-0.083%; +0.083%] None None None
trace_buffer/1_senders/1us_delay throughput [17791.339op/s; 17820.586op/s] or [-0.082%; +0.082%] None None None
trace_buffer/1_senders/no_delay execution_time [354.589µs; 355.631µs] or [-0.147%; +0.147%] None None None
trace_buffer/1_senders/no_delay throughput [2531067.988op/s; 2538336.449op/s] or [-0.143%; +0.143%] None None None
trace_buffer/2_senders/10us_delay execution_time [60.131ms; 60.144ms] or [-0.011%; +0.011%] None None None
trace_buffer/2_senders/10us_delay throughput [29928.280op/s; 29934.606op/s] or [-0.011%; +0.011%] None None None
trace_buffer/2_senders/1us_delay execution_time [50.980ms; 51.024ms] or [-0.043%; +0.043%] None None None
trace_buffer/2_senders/1us_delay throughput [35277.553op/s; 35308.120op/s] or [-0.043%; +0.043%] None None None
trace_buffer/2_senders/no_delay execution_time [1.619ms; 1.632ms] or [-0.408%; +0.408%] None None None
trace_buffer/2_senders/no_delay throughput [1103643.494op/s; 1112601.607op/s] or [-0.404%; +0.404%] None None None
trace_buffer/4_senders/10us_delay execution_time [60.189ms; 60.203ms] or [-0.011%; +0.011%] None None None
trace_buffer/4_senders/10us_delay throughput [59797.871op/s; 59811.377op/s] or [-0.011%; +0.011%] None None None
trace_buffer/4_senders/1us_delay execution_time [51.271ms; 51.316ms] or [-0.045%; +0.045%] None None None
trace_buffer/4_senders/1us_delay throughput [70153.983op/s; 70216.180op/s] or [-0.044%; +0.044%] None None None
trace_buffer/4_senders/no_delay execution_time [3.653ms; 3.664ms] or [-0.150%; +0.150%] None None None
trace_buffer/4_senders/no_delay throughput [982576.361op/s; 985503.354op/s] or [-0.149%; +0.149%] None None None
trace_buffer/8_senders/10us_delay execution_time [60.340ms; 60.362ms] or [-0.019%; +0.019%] None None None
trace_buffer/8_senders/10us_delay throughput [119279.646op/s; 119323.930op/s] or [-0.019%; +0.019%] None None None
trace_buffer/8_senders/1us_delay execution_time [51.675ms; 51.773ms] or [-0.095%; +0.095%] None None None
trace_buffer/8_senders/1us_delay throughput [139075.675op/s; 139337.745op/s] or [-0.094%; +0.094%] None None None
trace_buffer/8_senders/no_delay execution_time [7.202ms; 7.215ms] or [-0.094%; +0.094%] None None None
trace_buffer/8_senders/no_delay throughput [997934.869op/s; 999815.125op/s] or [-0.094%; +0.094%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz 5fef749 1788368136 andrew.glaude/noCrash
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 9.531ms 9.573ms ± 0.021ms 9.571ms ± 0.011ms 9.584ms 9.611ms 9.635ms 9.656ms 0.88% 0.946 1.887 0.21% 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 [9.571ms; 9.576ms] or [-0.030%; +0.030%] None None None

Baseline

Baseline benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz f3fd6c3 1788365266 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
trace_buffer/1_senders/10us_delay execution_time 59.913ms 60.086ms ± 0.047ms 60.072ms ± 0.014ms 60.096ms 60.190ms 60.251ms 60.257ms 0.31% 1.155 3.890 0.08% 0.003ms 1 200
trace_buffer/1_senders/10us_delay throughput 14936.084op/s 14978.419op/s ± 11.585op/s 14982.103op/s ± 3.537op/s 14983.906op/s 14988.732op/s 15003.002op/s 15021.829op/s 0.27% -1.145 3.887 0.08% 0.819op/s 1 200
trace_buffer/1_senders/1us_delay execution_time 50.103ms 50.471ms ± 0.287ms 50.385ms ± 0.121ms 50.553ms 51.171ms 51.265ms 51.456ms 2.13% 1.431 1.424 0.57% 0.020ms 1 200
trace_buffer/1_senders/1us_delay throughput 17490.622op/s 17832.755op/s ± 100.666op/s 17862.456op/s ± 42.946op/s 17899.497op/s 17943.468op/s 17951.601op/s 17963.030op/s 0.56% -1.408 1.354 0.56% 7.118op/s 1 200
trace_buffer/1_senders/no_delay execution_time 346.679µs 353.486µs ± 6.162µs 352.551µs ± 2.042µs 355.111µs 358.024µs 364.924µs 427.716µs 21.32% 8.909 103.723 1.74% 0.436µs 1 200
trace_buffer/1_senders/no_delay throughput 2104199.724op/s 2546740.650op/s ± 38826.244op/s 2552824.712op/s ± 14753.548op/s 2565360.759op/s 2578528.638op/s 2589536.757op/s 2596061.880op/s 1.69% -7.603 82.773 1.52% 2745.430op/s 1 200
trace_buffer/2_senders/10us_delay execution_time 60.063ms 60.129ms ± 0.043ms 60.117ms ± 0.024ms 60.151ms 60.210ms 60.274ms 60.287ms 0.28% 1.266 1.687 0.07% 0.003ms 1 200
trace_buffer/2_senders/10us_delay throughput 29857.199op/s 29935.856op/s ± 21.183op/s 29941.408op/s ± 12.060op/s 29952.169op/s 29960.144op/s 29962.206op/s 29968.697op/s 0.09% -1.262 1.670 0.07% 1.498op/s 1 200
trace_buffer/2_senders/1us_delay execution_time 50.556ms 51.023ms ± 0.184ms 51.034ms ± 0.150ms 51.164ms 51.330ms 51.350ms 51.383ms 0.68% -0.202 -0.550 0.36% 0.013ms 1 200
trace_buffer/2_senders/1us_delay throughput 35031.168op/s 35278.455op/s ± 127.093op/s 35270.822op/s ± 103.397op/s 35382.032op/s 35510.358op/s 35560.046op/s 35604.066op/s 0.94% 0.218 -0.539 0.36% 8.987op/s 1 200
trace_buffer/2_senders/no_delay execution_time 1.380ms 1.511ms ± 0.039ms 1.512ms ± 0.020ms 1.531ms 1.577ms 1.606ms 1.631ms 7.90% -0.111 0.786 2.60% 0.003ms 1 200
trace_buffer/2_senders/no_delay throughput 1103380.579op/s 1192018.386op/s ± 31189.330op/s 1190585.906op/s ± 16286.148op/s 1207414.249op/s 1244993.057op/s 1271118.807op/s 1304785.039op/s 9.59% 0.331 0.967 2.61% 2205.419op/s 1 200
trace_buffer/4_senders/10us_delay execution_time 60.132ms 60.197ms ± 0.051ms 60.175ms ± 0.022ms 60.224ms 60.305ms 60.327ms 60.356ms 0.30% 1.125 0.273 0.08% 0.004ms 1 200
trace_buffer/4_senders/10us_delay throughput 59646.160op/s 59803.464op/s ± 50.845op/s 59825.149op/s ± 21.714op/s 59840.736op/s 59854.321op/s 59864.572op/s 59868.192op/s 0.07% -1.123 0.266 0.08% 3.595op/s 1 200
trace_buffer/4_senders/1us_delay execution_time 50.831ms 51.201ms ± 0.147ms 51.186ms ± 0.096ms 51.282ms 51.463ms 51.601ms 51.717ms 1.04% 0.724 0.872 0.29% 0.010ms 1 200
trace_buffer/4_senders/1us_delay throughput 69610.057op/s 70311.292op/s ± 201.920op/s 70331.470op/s ± 132.549op/s 70464.301op/s 70578.109op/s 70730.591op/s 70822.873op/s 0.70% -0.704 0.835 0.29% 14.278op/s 1 200
trace_buffer/4_senders/no_delay execution_time 3.681ms 3.757ms ± 0.030ms 3.756ms ± 0.018ms 3.774ms 3.801ms 3.827ms 3.952ms 5.23% 1.414 8.183 0.80% 0.002ms 1 200
trace_buffer/4_senders/no_delay throughput 910860.693op/s 958358.294op/s ± 7565.683op/s 958455.634op/s ± 4717.826op/s 963455.634op/s 968724.835op/s 975555.048op/s 977992.931op/s 2.04% -1.228 6.932 0.79% 534.975op/s 1 200
trace_buffer/8_senders/10us_delay execution_time 60.240ms 60.332ms ± 0.069ms 60.320ms ± 0.033ms 60.352ms 60.467ms 60.591ms 60.622ms 0.50% 1.811 4.137 0.11% 0.005ms 1 200
trace_buffer/8_senders/10us_delay throughput 118768.830op/s 119339.660op/s ± 135.281op/s 119363.022op/s ± 64.656op/s 119427.555op/s 119488.476op/s 119511.528op/s 119521.885op/s 0.13% -1.801 4.093 0.11% 9.566op/s 1 200
trace_buffer/8_senders/1us_delay execution_time 51.239ms 51.650ms ± 0.296ms 51.553ms ± 0.165ms 51.862ms 52.200ms 52.424ms 52.466ms 1.77% 0.882 -0.238 0.57% 0.021ms 1 200
trace_buffer/8_senders/1us_delay throughput 137230.768op/s 139405.364op/s ± 795.904op/s 139662.892op/s ± 447.089op/s 140052.896op/s 140245.815op/s 140453.448op/s 140517.043op/s 0.61% -0.865 -0.277 0.57% 56.279op/s 1 200
trace_buffer/8_senders/no_delay execution_time 6.996ms 7.135ms ± 0.067ms 7.129ms ± 0.042ms 7.170ms 7.255ms 7.312ms 7.351ms 3.12% 0.572 0.218 0.93% 0.005ms 1 200
trace_buffer/8_senders/no_delay throughput 979476.210op/s 1009178.323op/s ± 9367.713op/s 1010004.263op/s ± 6022.181op/s 1016145.661op/s 1022405.877op/s 1027267.449op/s 1029229.891op/s 1.90% -0.520 0.142 0.93% 662.397op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
trace_buffer/1_senders/10us_delay execution_time [60.080ms; 60.093ms] or [-0.011%; +0.011%] None None None
trace_buffer/1_senders/10us_delay throughput [14976.813op/s; 14980.025op/s] or [-0.011%; +0.011%] None None None
trace_buffer/1_senders/1us_delay execution_time [50.431ms; 50.510ms] or [-0.079%; +0.079%] None None None
trace_buffer/1_senders/1us_delay throughput [17818.804op/s; 17846.707op/s] or [-0.078%; +0.078%] None None None
trace_buffer/1_senders/no_delay execution_time [352.632µs; 354.340µs] or [-0.242%; +0.242%] None None None
trace_buffer/1_senders/no_delay throughput [2541359.706op/s; 2552121.594op/s] or [-0.211%; +0.211%] None None None
trace_buffer/2_senders/10us_delay execution_time [60.123ms; 60.134ms] or [-0.010%; +0.010%] None None None
trace_buffer/2_senders/10us_delay throughput [29932.921op/s; 29938.792op/s] or [-0.010%; +0.010%] None None None
trace_buffer/2_senders/1us_delay execution_time [50.998ms; 51.049ms] or [-0.050%; +0.050%] None None None
trace_buffer/2_senders/1us_delay throughput [35260.841op/s; 35296.069op/s] or [-0.050%; +0.050%] None None None
trace_buffer/2_senders/no_delay execution_time [1.506ms; 1.517ms] or [-0.361%; +0.361%] None None None
trace_buffer/2_senders/no_delay throughput [1187695.845op/s; 1196340.927op/s] or [-0.363%; +0.363%] None None None
trace_buffer/4_senders/10us_delay execution_time [60.190ms; 60.204ms] or [-0.012%; +0.012%] None None None
trace_buffer/4_senders/10us_delay throughput [59796.417op/s; 59810.510op/s] or [-0.012%; +0.012%] None None None
trace_buffer/4_senders/1us_delay execution_time [51.181ms; 51.222ms] or [-0.040%; +0.040%] None None None
trace_buffer/4_senders/1us_delay throughput [70283.308op/s; 70339.276op/s] or [-0.040%; +0.040%] None None None
trace_buffer/4_senders/no_delay execution_time [3.753ms; 3.761ms] or [-0.111%; +0.111%] None None None
trace_buffer/4_senders/no_delay throughput [957309.763op/s; 959406.825op/s] or [-0.109%; +0.109%] None None None
trace_buffer/8_senders/10us_delay execution_time [60.323ms; 60.342ms] or [-0.016%; +0.016%] None None None
trace_buffer/8_senders/10us_delay throughput [119320.912op/s; 119358.409op/s] or [-0.016%; +0.016%] None None None
trace_buffer/8_senders/1us_delay execution_time [51.609ms; 51.691ms] or [-0.080%; +0.080%] None None None
trace_buffer/8_senders/1us_delay throughput [139295.059op/s; 139515.668op/s] or [-0.079%; +0.079%] None None None
trace_buffer/8_senders/no_delay execution_time [7.126ms; 7.144ms] or [-0.129%; +0.129%] None None None
trace_buffer/8_senders/no_delay throughput [1007880.048op/s; 1010476.598op/s] or [-0.129%; +0.129%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz f3fd6c3 1788365266 main
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 9.564ms 9.613ms ± 0.024ms 9.614ms ± 0.017ms 9.628ms 9.657ms 9.666ms 9.688ms 0.77% 0.281 -0.215 0.25% 0.002ms 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 [9.610ms; 9.616ms] or [-0.035%; +0.035%] None None None

@dd-octo-sts

dd-octo-sts Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 8.45 MB 8.45 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 91.28 MB 91.29 MB +.01% (+10.78 KB) 🔍
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.38 MB 11.38 MB +0% (+360 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 102.59 MB 102.60 MB +.01% (+10.65 KB) 🔍
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 27.32 MB 27.33 MB +.01% (+4.50 KB) 🔍
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 96.08 KB 96.08 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 185.36 MB 185.39 MB +.01% (+32.00 KB) 🔍
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 803.66 MB 803.64 MB -0% (-23.54 KB) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 9.01 MB 9.01 MB +.03% (+3.50 KB) 🔍
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 96.08 KB 96.08 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 26.20 MB 26.20 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 52.21 MB 52.22 MB +.01% (+9.19 KB) 🔍
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 23.81 MB 23.82 MB +.03% (+8.50 KB) 🔍
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 97.58 KB 97.58 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 190.38 MB 190.44 MB +.02% (+56.00 KB) 🔍
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 788.17 MB 788.17 MB +0% (+378 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 6.96 MB 6.96 MB +.01% (+1.00 KB) 🔍
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 97.58 KB 97.58 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 28.17 MB 28.17 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 49.69 MB 49.70 MB +.01% (+6.83 KB) 🔍
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 81.43 MB 81.44 MB +0% (+8.17 KB) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 9.41 MB 9.41 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 97.20 MB 97.21 MB +0% (+8.12 KB) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.46 MB 11.46 MB +0% (+312 B) 👌

@ajgajg1134
ajgajg1134 marked this pull request as ready for review September 1, 2026 17:03
@ajgajg1134
ajgajg1134 requested review from a team as code owners September 1, 2026 17:03

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 65654c4060

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread libdd-trace-obfuscation/src/http.rs Outdated
Comment thread libdd-trace-obfuscation/src/sql.rs Outdated
Comment thread libdd-trace-obfuscation/src/sql.rs Outdated
Comment thread libdd-trace-obfuscation/src/http.rs
ajgajg1134 and others added 2 commits September 1, 2026 14:49
…view nits

Bound strip_userinfo_best_effort's authority scan to path_end instead of
path_query_end in the control-char fallback, matching the parse-error
fallback, so an '@' inside the query is never mistaken for userinfo.
Also renames the tokenizer's dollar-quote recursion depth field for clarity.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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