Skip to content

perf(tracer): use lookbehind for JWT prefix in default query-string regex - #9405

Merged
e-n-0 merged 3 commits into
masterfrom
flavien.darche/query-string-jwt-lookbehind
Oct 15, 2026
Merged

e-n-0 merged 3 commits into
masterfrom
flavien.darche/query-string-jwt-lookbehind

Conversation

@e-n-0

@e-n-0 e-n-0 commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Summary of changes

  • The JWT branch of the default query-string obfuscation regex now uses a zero-width lookbehind for its left boundary:
    (?:(?<![\w-])|(?<=%[0-9a-f]{2}))ey[I-L] instead of the consuming group (^|[^\w%-]|%[0-9a-f]{2})ey[I-L] from perf(tracer): reduce query-string matching cost #9374.
  • The ${1}<redacted> replacement and the isDefaultPattern / ObfuscationQueryStringRegexWasConfigured plumbing are removed,
    since the default pattern no longer captures the delimiter.
    Every pattern, default or custom, is replaced with <redacted> again.
  • DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP moves to registry implementation K.

Reason for change

The consuming group in #9374 stops .NET from skipping ahead to positions where a match can start,
so every query string without a JWT got slower.
Measured on .NET 10 with the tracer's regex options (µs per call):

Input 3.55.0 3.55.1 This PR
?id=123&page=2 0.09 0.48 0.07
Typical utm query, 107 chars 1.7 5.1 1.8
1k benign 10.3 44.6 10.8
5k benign 52.6 194.9 60.3
With a JWT 0.80 0.72 0.54

Interpreted mode shows the same 2-3x gap for 3.55.1.

The lookbehind keeps the same left boundary as #9374, except that a lone % before the JWT no longer blocks the match (3.55.0 redacted that case too).

Other tracers stay on the capture-group form because Go and RE2/J have no lookbehind.

Implementation details

Because the lookbehind does not consume the delimiter, adjacent JWTs are now all redacted.
Before, a JWT whose delimiter had been eaten by the previous match was left in clear:

Input 3.55.1 This PR
?q=eyJa.eyJb=eyJc.eyJd=eyJe.eyJf ?q=<redacted>eyJc.eyJd=<redacted> ?q=<redacted><redacted><redacted>
?t=eyJa%3D.eyJb%3D%3DeyJc.eyJd ?t=<redacted>eyJc.eyJd ?t=<redacted><redacted>
?x=%eyJa.eyJb unchanged ?x=%<redacted>

It also fixes the case where DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP is set to the default text:
3.55.1 dropped the delimiter there (?jwt<redacted>).

Test coverage

  • Updated the JWT delimiter cases to the outputs above and added the %eyJ and padded adjacent-JWT cases.
  • The query-string, URL, OTel semantic-convention and settings suites pass locally on net10.0.

Other details

Registry implementation K of DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP holds the new default.

@e-n-0 e-n-0 added the area:asm label Oct 14, 2026
@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (9405) and master.

✅ No regressions detected

📄 View the full report (charts + all metrics) →

@e-n-0
e-n-0 marked this pull request as ready for review October 14, 2026 12:37
@e-n-0
e-n-0 requested review from a team as code owners October 14, 2026 12:37
@e-n-0
e-n-0 requested review from rachelyangdog and removed request for a team October 14, 2026 12:37
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T12:40:17.820256Z e3ea59e Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

The JWT lookbehind preserves delimiters and allows adjacent tokens to be redacted without re-emitting captured text. Runtime verification was limited to standalone .NET 8 checks because the required .NET 11 SDK was unavailable.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit e3ea59e

@pr-commenter

pr-commenter Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-10-15 13:13:42

Comparing candidate commit 4b3b947 in PR branch flavien.darche/query-string-jwt-lookbehind with baseline commit 2cc8452 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 11 performance regressions! Performance is the same for 61 metrics, 0 unstable metrics, 76 known flaky benchmarks, 50 flaky benchmarks without significant changes.

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:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery net472

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+10.133%; +10.144%]
  • 🟥 throughput [-28602.140op/s; -25652.821op/s] or [-8.056%; -7.225%]

scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.750%; +9.761%]
  • 🟥 throughput [-39029.643op/s; -28805.168op/s] or [-7.405%; -5.465%]

scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.830%; +9.841%]
  • 🟥 throughput [-33006.161op/s; -24751.661op/s] or [-8.158%; -6.118%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 allocated_mem [+271 bytes; +272 bytes] or [+9.338%; +9.348%]
  • 🟥 throughput [-9887.254op/s; -9640.567op/s] or [-11.287%; -11.005%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net6.0

  • 🟥 allocated_mem [+199 bytes; +200 bytes] or [+9.426%; +9.438%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync netcoreapp3.1

  • 🟥 allocated_mem [+199 bytes; +200 bytes] or [+7.569%; +7.581%]
  • 🟥 throughput [-12082.728op/s; -10496.188op/s] or [-9.588%; -8.329%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-8060.367op/s; -7669.626op/s] or [-9.557%; -9.094%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0

  • 🟥 throughput [-8391.328op/s; -6073.524op/s] or [-7.053%; -5.105%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1

  • 🟥 throughput [-13891.543op/s; -12682.638op/s] or [-14.125%; -12.895%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 allocated_mem [+1.573KB; +1.573KB] or [+47.789%; +47.804%]
  • 🟥 execution_time [+306.395ms; +308.973ms] or [+152.044%; +153.324%]
  • 🟥 throughput [-55.088op/s; -50.961op/s] or [-9.911%; -9.169%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟥 allocated_mem [+1.013KB; +1.013KB] or [+37.563%; +37.575%]
  • 🟥 execution_time [+376.888ms; +380.534ms] or [+297.765%; +300.645%]
  • 🟩 throughput [+62.023op/s; +67.931op/s] or [+8.177%; +8.956%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 allocated_mem [+1.088KB; +1.088KB] or [+40.343%; +40.355%]
  • 🟥 execution_time [+396.657ms; +401.378ms] or [+351.026%; +355.204%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net472

  • 🟥 allocated_mem [+4.758KB; +4.758KB] or [+100.159%; +100.174%]
  • 🟥 throughput [-63903.387op/s; -63406.247op/s] or [-49.720%; -49.333%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0

  • 🟥 allocated_mem [+3.880KB; +3.880KB] or [+82.058%; +82.072%]
  • 🟩 execution_time [-16.432ms; -12.245ms] or [-7.674%; -5.719%]
  • 🟥 throughput [-61712.605op/s; -58949.024op/s] or [-45.047%; -43.029%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody netcoreapp3.1

  • 🟥 allocated_mem [+4.608KB; +4.608KB] or [+99.641%; +99.654%]
  • 🟥 throughput [-48987.012op/s; -46745.502op/s] or [-44.290%; -42.263%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net472

  • 🟥 allocated_mem [+1.380KB; +1.380KB] or [+111.648%; +111.662%]
  • 🟥 throughput [-342707.570op/s; -334639.092op/s] or [-34.992%; -34.168%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net6.0

  • 🟥 allocated_mem [+543 bytes; +544 bytes] or [+44.437%; +44.446%]
  • 🟩 execution_time [-26.090ms; -21.239ms] or [-11.635%; -9.472%]
  • 🟥 throughput [-108959.195op/s; -86234.443op/s] or [-11.640%; -9.213%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1

  • 🟥 allocated_mem [+1.344KB; +1.344KB] or [+111.253%; +111.267%]
  • 🟥 throughput [-180852.532op/s; -164712.188op/s] or [-25.985%; -23.666%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472

  • 🟥 allocated_mem [+3.378KB; +3.378KB] or [+89.003%; +89.017%]
  • 🟥 throughput [-76938.650op/s; -76185.018op/s] or [-51.779%; -51.272%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0

  • 🟥 allocated_mem [+3.336KB; +3.336KB] or [+88.150%; +88.161%]
  • 🟥 throughput [-75706.606op/s; -72823.732op/s] or [-48.171%; -46.337%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody netcoreapp3.1

  • 🟥 allocated_mem [+3.264KB; +3.264KB] or [+88.493%; +88.506%]
  • 🟥 throughput [-55873.185op/s; -53256.831op/s] or [-44.510%; -42.426%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472

  • 🟥 throughput [-278072.869op/s; -260079.899op/s] or [-8.459%; -7.912%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net6.0

  • 🟩 throughput [+240967.954op/s; +268080.866op/s] or [+8.035%; +8.939%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1

  • 🟩 execution_time [-19.079ms; -14.748ms] or [-8.795%; -6.798%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net472

  • 🟩 allocated_mem [-13.759KB; -13.757KB] or [-42.326%; -42.318%]
  • 🟥 execution_time [+299.146ms; +300.273ms] or [+149.473%; +150.036%]
  • 🟩 throughput [+876.047op/s; +900.789op/s] or [+9.676%; +9.949%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net6.0

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.419ms; +304.172ms] or [+151.502%; +153.395%]
  • 🟩 throughput [+2093.198op/s; +2315.329op/s] or [+16.010%; +17.709%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs netcoreapp3.1

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.314ms; +304.351ms] or [+151.275%; +153.308%]
  • 🟩 throughput [+1806.486op/s; +1951.010op/s] or [+17.441%; +18.836%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net472

  • 🟥 execution_time [+296.586ms; +297.638ms] or [+145.672%; +146.188%]
  • 🟩 throughput [+562.358op/s; +572.356op/s] or [+14.908%; +15.173%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0

  • 🟥 execution_time [+298.332ms; +299.398ms] or [+145.843%; +146.365%]
  • 🟩 throughput [+2490.107op/s; +2545.954op/s] or [+36.177%; +36.988%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1

  • 🟥 execution_time [+300.487ms; +301.859ms] or [+150.183%; +150.869%]
  • 🟩 throughput [+1330.924op/s; +1361.476op/s] or [+26.418%; +27.024%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472

  • 🟩 execution_time [-141.763µs; -137.293µs] or [-29.106%; -28.188%]
  • 🟩 throughput [+809.836op/s; +840.428op/s] or [+39.443%; +40.933%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0

  • 🟩 execution_time [-124.239µs; -96.856µs] or [-28.494%; -22.214%]
  • 🟩 throughput [+708.902op/s; +844.391op/s] or [+30.820%; +36.711%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1

  • 🟩 execution_time [-140.581µs; -118.455µs] or [-30.120%; -25.379%]
  • 🟩 throughput [+757.406op/s; +842.660op/s] or [+34.963%; +38.899%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472

  • 🟩 execution_time [-122.150µs; -117.378µs] or [-32.980%; -31.691%]
  • 🟩 throughput [+1263.413op/s; +1321.279op/s] or [+46.791%; +48.934%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net6.0

  • 🟩 execution_time [-88.420µs; -63.938µs] or [-28.228%; -20.412%]
  • 🟩 throughput [+905.993op/s; +1136.743op/s] or [+28.242%; +35.436%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1

  • 🟩 execution_time [-137.057µs; -114.671µs] or [-37.493%; -31.370%]
  • 🟩 throughput [+1317.959op/s; +1454.708op/s] or [+47.296%; +52.204%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.645ms; +300.272ms] or [+149.554%; +149.867%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0

  • unstable execution_time [+330.867ms; +399.647ms] or [+359.500%; +434.233%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest netcoreapp3.1

  • unstable execution_time [+216.261ms; +277.853ms] or [+164.205%; +210.971%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+317.725ms; +377.021ms] or [+146.087%; +173.350%]
  • 🟥 throughput [-613.765op/s; -552.696op/s] or [-55.613%; -50.080%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • unstable execution_time [+203.474ms; +336.716ms] or [+86.712%; +143.494%]
  • 🟥 throughput [-679.111op/s; -595.067op/s] or [-45.297%; -39.691%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • unstable execution_time [+250.076ms; +307.984ms] or [+149.575%; +184.210%]
  • 🟥 throughput [-406.770op/s; -369.490op/s] or [-28.323%; -25.727%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1

  • unstable throughput [+22.214op/s; +72.758op/s] or [+6.385%; +20.914%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net6.0

  • 🟩 execution_time [-159.247µs; -145.635µs] or [-8.067%; -7.377%]
  • 🟩 throughput [+40.443op/s; +44.525op/s] or [+7.984%; +8.790%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 allocated_mem [+96 bytes; +97 bytes] or [+12.092%; +12.103%]
  • 🟥 execution_time [+303.602ms; +305.637ms] or [+152.888%; +153.913%]
  • 🟥 throughput [-19856.414op/s; -17103.006op/s] or [-6.389%; -5.503%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+12.114%; +12.124%]
  • 🟥 execution_time [+301.782ms; +303.582ms] or [+151.224%; +152.126%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+12.114%; +12.124%]
  • 🟥 execution_time [+300.588ms; +303.703ms] or [+151.003%; +152.567%]
  • 🟥 throughput [-34193.870op/s; -26356.836op/s] or [-7.203%; -5.552%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+11.165%; +11.177%]
  • 🟥 execution_time [+302.273ms; +303.690ms] or [+151.792%; +152.503%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+12.493%; +12.506%]
  • 🟥 execution_time [+298.562ms; +300.703ms] or [+147.625%; +148.684%]
  • 🟥 throughput [-57774.137op/s; -51486.964op/s] or [-9.309%; -8.296%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+11.422%; +11.434%]
  • 🟥 execution_time [+300.302ms; +304.046ms] or [+152.206%; +154.104%]
  • 🟥 throughput [-49019.491op/s; -40554.070op/s] or [-10.585%; -8.757%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 allocated_mem [+96 bytes; +97 bytes] or [+11.197%; +11.208%]
  • 🟥 execution_time [+301.067ms; +304.820ms] or [+151.109%; +152.992%]
  • 🟥 throughput [-32399.941op/s; -29656.086op/s] or [-8.405%; -7.693%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+10.618%; +10.631%]
  • 🟥 execution_time [+299.533ms; +302.938ms] or [+149.290%; +150.987%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+10.618%; +10.631%]
  • 🟥 execution_time [+300.692ms; +303.275ms] or [+149.592%; +150.877%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472

  • 🟥 allocated_mem [+96 bytes; +97 bytes] or [+6.002%; +6.011%]
  • 🟥 throughput [-17359.375op/s; -15828.672op/s] or [-6.981%; -6.365%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+5.627%; +5.636%]
  • 🟩 execution_time [-16.813ms; -13.111ms] or [-7.818%; -6.097%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+5.605%; +5.617%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472

  • unstable execution_time [-2.697µs; +40.536µs] or [-0.666%; +10.013%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net6.0

  • 🟩 allocated_mem [-18.131KB; -18.108KB] or [-6.614%; -6.605%]
  • unstable execution_time [-36.379µs; +19.790µs] or [-7.190%; +3.911%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1

  • 🟩 allocated_mem [-15.661KB; -15.643KB] or [-5.709%; -5.703%]
  • unstable execution_time [-82.468µs; -22.217µs] or [-14.291%; -3.850%]
  • 🟩 throughput [+89.648op/s; +258.987op/s] or [+5.122%; +14.796%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net6.0

  • 🟥 execution_time [+3.704µs; +7.166µs] or [+8.756%; +16.939%]
  • 🟥 throughput [-3622.936op/s; -1956.592op/s] or [-15.251%; -8.237%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark netcoreapp3.1

  • unstable execution_time [-16.049µs; -9.213µs] or [-24.899%; -14.294%]
  • 🟩 throughput [+2370.838op/s; +3802.534op/s] or [+14.546%; +23.330%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+301.869ms; +303.331ms] or [+152.581%; +153.320%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+303.064ms; +306.069ms] or [+154.259%; +155.788%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+296.843ms; +298.843ms] or [+148.606%; +149.608%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.197%; +9.208%]
  • 🟥 throughput [-48788.641op/s; -47109.294op/s] or [-13.506%; -13.041%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.226%; +9.238%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+9.226%; +9.238%]
  • 🟥 throughput [-34934.817op/s; -26840.012op/s] or [-8.268%; -6.352%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+300.696ms; +302.752ms] or [+149.870%; +150.895%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net6.0

  • 🟥 allocated_mem [+96 bytes; +96 bytes] or [+6.000%; +6.010%]
  • 🟥 execution_time [+302.100ms; +306.021ms] or [+151.700%; +153.669%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+5.819%; +5.828%]
  • 🟥 execution_time [+302.328ms; +304.580ms] or [+153.321%; +154.464%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.167ms; +301.064ms] or [+149.725%; +150.173%]
  • 🟩 throughput [+65465642.175op/s; +65770153.497op/s] or [+47.676%; +47.898%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0

  • 🟥 execution_time [+417.362ms; +422.037ms] or [+519.064%; +524.878%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1

  • 🟥 execution_time [+299.935ms; +300.913ms] or [+149.600%; +150.089%]
  • 🟩 throughput [+18837027.097op/s; +19796386.455op/s] or [+8.344%; +8.769%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472

  • 🟥 allocated_mem [+31 bytes; +32 bytes] or [+5.244%; +5.256%]
  • 🟥 throughput [-88383.701op/s; -85255.951op/s] or [-9.864%; -9.515%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472

  • 🟥 allocated_mem [+31 bytes; +32 bytes] or [+6.037%; +6.047%]
  • 🟥 throughput [-170505.448op/s; -163881.663op/s] or [-15.608%; -15.001%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0

  • 🟥 allocated_mem [+31 bytes; +32 bytes] or [+6.057%; +6.065%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1

  • 🟥 allocated_mem [+31 bytes; +32 bytes] or [+6.059%; +6.069%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472

  • 🟥 throughput [-35821.072op/s; -32043.885op/s] or [-7.981%; -7.139%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net6.0

  • 🟩 throughput [+35579.279op/s; +40177.776op/s] or [+6.461%; +7.296%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+15.733%; +15.745%]
  • 🟥 throughput [-61704.274op/s; -56985.666op/s] or [-9.031%; -8.340%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+14.810%; +14.823%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

  • 🟥 allocated_mem [+95 bytes; +96 bytes] or [+14.810%; +14.821%]
  • 🟥 throughput [-60218.356op/s; -45489.960op/s] or [-8.408%; -6.352%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.ActivityBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_AddEvent_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_GetContext_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_RecordException_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetAttributes_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_SetStatus_Sampled netcoreapp3.1
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net472
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled net6.0
  • scenario:Benchmarks.OpenTelemetry.InstrumentedApi.Trace.TelemetrySpanBenchmark.StartSpan_UpdateName_Sampled netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1

@anna-git anna-git left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit, in the pr description it says "The lookbehind keeps the same left boundary.", it's the same boundary except for a lone % before the JWT, as v.3.55.0 also redacted that case.

e-n-0 added 2 commits October 15, 2026 13:48
…egex

The consuming prefix group added in #9374 prevents .NET from skipping ahead to candidate match positions, making non-JWT query strings 2.5-5x slower. A zero-width lookbehind keeps the same left boundary, stays linear on the ReDoS inputs, and removes the need for the ${1} replacement and the isDefaultPattern plumbing.
@e-n-0
e-n-0 force-pushed the flavien.darche/query-string-jwt-lookbehind branch from ba51946 to 9679a63 Compare October 15, 2026 11:48
@e-n-0
e-n-0 merged commit 26f203e into master Oct 15, 2026
148 checks passed
@e-n-0
e-n-0 deleted the flavien.darche/query-string-jwt-lookbehind branch October 15, 2026 15:52
@github-actions github-actions Bot added this to the vNext-v3 milestone Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants