Skip to content

[AppSec] Send the real response status to the WAF and scan each request once - #9082

Open
dromanol wants to merge 2 commits into
masterfrom
dani/aap/waf-response-status-repro
Open

[AppSec] Send the real response status to the WAF and scan each request once#9082
dromanol wants to merge 2 commits into
masterfrom
dani/aap/waf-response-status-repro

Conversation

@dromanol

@dromanol dromanol commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

  • server.response.status reaches the WAF with the real status code, on the last run of the request only.
  • The request address set is sent once per request instead of on every run.
  • Responses the WAF never saw get a report-only scan at the end of the pipeline: HTTP.sys, which never fires the instrumented response start hook, and server-generated error responses on Kestrel.

Reason for change

The status came from the request-phase address set, where HttpContext.Response.StatusCode is still the default 200, so status rules were fed a fabricated value — and on HTTP.sys that was the only status the WAF ever saw. Resending every request address on the later runs also re-evaluated the whole request rule set for no new information.

The same gap existed on Kestrel for responses the server writes itself. On an unhandled exception the 500 is produced by ProduceEnd(), after application.ProcessRequestAsync() has returned, so the scope set by the diagnostic observer inside that call is no longer visible in the AsyncLocal: FireOnStarting finds no active span and skips the WAF entirely. Those requests reached the WAF without a response status or response headers at all.

Implementation details

Two one-shot flags on AppSecRequestContext. Persistent addresses live for the whole WAF context, so later runs re-evaluate rules, schemas and fingerprints against the stored values.

The one exception is server.request.cookies on ASP.NET Framework: ASP.NET inserts ASP.NET_SessionId into Request.Cookies when the session id is read, which the end-of-request run does itself, so a cookie-less request has none at OnBeginRequest and one at OnEndRequest. Without the re-read the cookie halves of _dd.appsec.fp.session go empty.

Test coverage

New unit tests against the real WAF: status rule matching per phase, schemas surviving a run without resupplied addresses, session fingerprint vs late cookies, server detection. Green locally: Security unit tests net8.0/net48, Security integration AspNetCore net8.0 + AspNetMvc5 net48, and system-tests APPSEC_BLOCKING, APPSEC_API_SECURITY, APPSEC_WAF_TELEMETRY, APPSEC_RASP, APPSEC_AUTO_EVENTS_EXTENDED, DEFAULT.

Because error responses now reach the last WAF run, API Security samples them too and error spans can carry _dd.appsec.s.* schemas. That breaks the DEBUGGER_EXCEPTION_REPLAY span approvals, where the schemas land on a different request every run (the sampler's 30s window against the test's 30s retry interval): DataDog/system-tests#7543 scrubs them like the _dd.appsec.fp.* fingerprints already are.

Other details

Replaces #8856 (rewritten from scratch, not rebased). Left out on purpose: registering Response.OnStarting(...) from BlockingMiddleware would work on every server and let HTTP.sys block, but it means removing a calltarget and redoing the blocking and ordering story.

@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: 98f2a72c31

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tracer/src/Datadog.Trace/AspNet/TracingHttpModule.cs Outdated
Comment thread tracer/src/Datadog.Trace/AppSec/Coordinator/SecurityCoordinator.cs
@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

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

✅ No regressions detected

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

@pr-commenter

pr-commenter Bot commented Aug 19, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-20 15:11:23

Comparing candidate commit ebd367b in PR branch dani/aap/waf-response-status-repro with baseline commit 218b8c1 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 2 performance regressions! Performance is the same for 70 metrics, 0 unstable metrics, 64 known flaky benchmarks, 62 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

  • 🟥 throughput [-29335.286op/s; -26402.263op/s] or [-8.262%; -7.436%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 throughput [-4955.634op/s; -4545.984op/s] or [-5.657%; -5.190%]

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 [-10284.504op/s; -9779.003op/s] or [-12.194%; -11.595%]

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

  • 🟥 throughput [-7485.137op/s; -6345.196op/s] or [-7.611%; -6.452%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 allocated_mem [+1.605KB; +1.605KB] or [+48.760%; +48.776%]
  • 🟥 execution_time [+308.387ms; +311.384ms] or [+153.033%; +154.520%]
  • 🟥 throughput [-57.359op/s; -52.992op/s] or [-10.320%; -9.534%]

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

  • 🟥 allocated_mem [+1.013KB; +1.013KB] or [+37.563%; +37.575%]
  • 🟥 execution_time [+384.782ms; +388.263ms] or [+304.001%; +306.751%]
  • 🟩 throughput [+76.262op/s; +78.195op/s] or [+10.055%; +10.310%]

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

  • 🟥 allocated_mem [+1.088KB; +1.088KB] or [+40.343%; +40.355%]
  • 🟥 execution_time [+392.150ms; +397.072ms] or [+347.038%; +351.394%]

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

  • 🟥 allocated_mem [+4.734KB; +4.734KB] or [+99.652%; +99.667%]
  • 🟥 throughput [-60337.664op/s; -59971.107op/s] or [-46.946%; -46.661%]

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

  • 🟥 allocated_mem [+3.856KB; +3.856KB] or [+81.546%; +81.558%]
  • 🟥 throughput [-62609.230op/s; -58318.711op/s] or [-45.701%; -42.569%]

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

  • 🟥 allocated_mem [+4.583KB; +4.584KB] or [+99.120%; +99.133%]
  • 🟥 throughput [-48667.981op/s; -46425.039op/s] or [-44.001%; -41.974%]

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

  • 🟥 allocated_mem [+1.356KB; +1.356KB] or [+109.716%; +109.731%]
  • 🟥 throughput [-273253.901op/s; -269670.191op/s] or [-27.901%; -27.535%]

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

  • 🟥 allocated_mem [+519 bytes; +520 bytes] or [+42.477%; +42.486%]
  • 🟥 throughput [-130617.549op/s; -82396.973op/s] or [-13.954%; -8.803%]

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

  • 🟥 allocated_mem [+1.320KB; +1.320KB] or [+109.261%; +109.277%]
  • 🟥 throughput [-172249.708op/s; -155011.590op/s] or [-24.749%; -22.272%]

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

  • 🟥 allocated_mem [+3.378KB; +3.378KB] or [+89.003%; +89.017%]
  • 🟥 throughput [-72840.483op/s; -72075.225op/s] or [-49.021%; -48.506%]

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

  • 🟥 allocated_mem [+3.336KB; +3.336KB] or [+88.150%; +88.161%]
  • 🟥 throughput [-72845.661op/s; -69949.534op/s] or [-46.350%; -44.508%]

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

  • 🟥 allocated_mem [+3.264KB; +3.264KB] or [+88.493%; +88.506%]
  • 🟥 throughput [-56763.720op/s; -54141.214op/s] or [-45.220%; -43.131%]

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

  • unstable execution_time [-7.108ms; +14.229ms] or [-3.515%; +7.035%]
  • 🟩 throughput [+249092.422op/s; +404460.662op/s] or [+8.306%; +13.486%]

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

  • 🟩 execution_time [-18.780ms; -14.448ms] or [-8.657%; -6.660%]

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

  • 🟩 allocated_mem [-13.759KB; -13.757KB] or [-42.326%; -42.318%]
  • 🟥 execution_time [+300.163ms; +300.933ms] or [+149.981%; +150.366%]
  • 🟩 throughput [+905.302op/s; +927.781op/s] or [+9.999%; +10.247%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+299.627ms; +302.810ms] or [+151.103%; +152.708%]
  • 🟩 throughput [+2278.971op/s; +2488.703op/s] or [+17.431%; +19.035%]

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

  • 🟩 allocated_mem [-13.722KB; -13.718KB] or [-42.341%; -42.329%]
  • 🟥 execution_time [+300.547ms; +303.007ms] or [+151.392%; +152.631%]
  • 🟩 throughput [+1770.099op/s; +1896.564op/s] or [+17.089%; +18.310%]

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

  • 🟥 execution_time [+295.685ms; +296.727ms] or [+145.229%; +145.741%]
  • 🟩 throughput [+555.080op/s; +569.724op/s] or [+14.715%; +15.104%]

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

  • 🟥 execution_time [+295.905ms; +299.028ms] or [+144.657%; +146.184%]
  • 🟩 throughput [+2704.753op/s; +2740.532op/s] or [+39.295%; +39.815%]

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

  • 🟥 execution_time [+300.447ms; +301.474ms] or [+150.163%; +150.676%]
  • 🟩 throughput [+1379.859op/s; +1394.197op/s] or [+27.389%; +27.674%]

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

  • 🟩 execution_time [-145.563µs; -141.573µs] or [-29.886%; -29.067%]
  • 🟩 throughput [+845.512op/s; +871.877op/s] or [+41.180%; +42.464%]

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

  • 🟩 execution_time [-137.820µs; -111.203µs] or [-31.609%; -25.504%]
  • 🟩 throughput [+849.951op/s; +971.240op/s] or [+36.953%; +42.226%]

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

  • 🟩 execution_time [-139.846µs; -117.814µs] or [-29.962%; -25.242%]
  • 🟩 throughput [+751.913op/s; +835.410op/s] or [+34.710%; +38.564%]

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

  • 🟩 execution_time [-126.457µs; -122.299µs] or [-34.142%; -33.020%]
  • 🟩 throughput [+1342.592op/s; +1389.826op/s] or [+49.723%; +51.473%]

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

  • 🟩 execution_time [-100.375µs; -76.448µs] or [-32.044%; -24.406%]
  • 🟩 throughput [+1138.074op/s; +1352.212op/s] or [+35.477%; +42.152%]

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

  • 🟩 execution_time [-137.484µs; -115.108µs] or [-37.610%; -31.489%]
  • 🟩 throughput [+1325.628op/s; +1461.907op/s] or [+47.572%; +52.462%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.643ms; +300.531ms] or [+149.553%; +149.996%]

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

  • 🟥 execution_time [+428.129ms; +432.882ms] or [+465.180%; +470.344%]

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

  • unstable execution_time [+295.815ms; +348.096ms] or [+224.609%; +264.306%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 allocated_mem [+2.824KB; +2.829KB] or [+5.017%; +5.026%]
  • unstable execution_time [+326.947ms; +368.543ms] or [+150.327%; +169.453%]
  • 🟥 throughput [-497.884op/s; -457.817op/s] or [-45.113%; -41.483%]

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

  • unstable execution_time [+208.902ms; +342.151ms] or [+89.025%; +145.811%]
  • 🟥 throughput [-669.123op/s; -585.636op/s] or [-44.631%; -39.062%]

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

  • 🟥 allocated_mem [+2.305KB; +2.308KB] or [+5.442%; +5.450%]
  • 🟥 execution_time [+336.249ms; +351.721ms] or [+201.116%; +210.370%]
  • 🟥 throughput [-401.884op/s; -364.652op/s] or [-27.983%; -25.390%]

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

  • 🟩 throughput [+26.450op/s; +42.242op/s] or [+5.222%; +8.339%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+303.051ms; +304.448ms] or [+152.611%; +153.314%]

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

  • 🟥 execution_time [+300.847ms; +302.395ms] or [+150.755%; +151.531%]

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

  • 🟥 execution_time [+300.415ms; +304.157ms] or [+150.916%; +152.796%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+299.511ms; +300.962ms] or [+150.405%; +151.133%]

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

  • 🟥 execution_time [+298.223ms; +299.700ms] or [+147.458%; +148.188%]

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

  • 🟥 execution_time [+302.324ms; +306.289ms] or [+153.231%; +155.241%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+303.053ms; +305.352ms] or [+152.105%; +153.259%]

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

  • 🟥 execution_time [+299.164ms; +301.690ms] or [+149.106%; +150.365%]
  • 🟩 throughput [+34858.612op/s; +41573.065op/s] or [+6.922%; +8.255%]

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

  • 🟥 execution_time [+300.072ms; +302.653ms] or [+149.283%; +150.567%]

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

  • 🟩 execution_time [-17.051ms; -13.397ms] or [-7.929%; -6.230%]
  • 🟩 throughput [+22694.391op/s; +29506.232op/s] or [+6.226%; +8.094%]

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

  • unstable execution_time [+8.206µs; +51.421µs] or [+2.027%; +12.701%]

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

  • 🟩 allocated_mem [-19.410KB; -19.386KB] or [-7.080%; -7.071%]
  • unstable execution_time [-34.707µs; +21.366µs] or [-6.860%; +4.223%]

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

  • 🟩 allocated_mem [-25.712KB; -25.693KB] or [-9.373%; -9.366%]
  • unstable execution_time [-73.765µs; -13.140µs] or [-12.783%; -2.277%]

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

  • unstable execution_time [+6.992µs; +11.426µs] or [+16.528%; +27.008%]
  • 🟥 throughput [-5119.041op/s; -3223.389op/s] or [-21.550%; -13.569%]

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

  • unstable execution_time [-12.363µs; -4.727µs] or [-19.180%; -7.334%]
  • unstable throughput [+1001.265op/s; +2666.202op/s] or [+6.143%; +16.358%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+301.674ms; +303.366ms] or [+152.483%; +153.338%]

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

  • 🟥 execution_time [+306.792ms; +310.329ms] or [+156.156%; +157.957%]

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

  • 🟥 execution_time [+298.780ms; +300.760ms] or [+149.576%; +150.567%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+299.097ms; +301.071ms] or [+149.073%; +150.057%]

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

  • 🟥 execution_time [+301.005ms; +303.406ms] or [+151.151%; +152.356%]

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

  • 🟥 execution_time [+304.238ms; +306.625ms] or [+154.290%; +155.500%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+300.958ms; +301.858ms] or [+150.119%; +150.568%]
  • 🟩 throughput [+60975083.396op/s; +61309453.633op/s] or [+44.406%; +44.649%]

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

  • unstable execution_time [+348.609ms; +404.766ms] or [+433.557%; +503.399%]

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

  • 🟥 execution_time [+299.549ms; +300.611ms] or [+149.408%; +149.938%]

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

  • 🟩 throughput [+62811.525op/s; +82269.871op/s] or [+5.865%; +7.681%]

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

  • 🟩 throughput [+67194.599op/s; +99255.565op/s] or [+5.201%; +7.683%]

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

  • 🟩 throughput [+75051.640op/s; +82805.738op/s] or [+7.454%; +8.224%]

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

  • 🟩 throughput [+38187.547op/s; +44913.836op/s] or [+6.934%; +8.156%]

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

  • 🟩 throughput [+47219.576op/s; +65110.798op/s] or [+5.276%; +7.274%]

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.ActivityBenchmark.StartStopWithChild net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
  • 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.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

dromanol and others added 2 commits August 20, 2026 16:22
…st once

server.response.status came from the request-phase address set, where
HttpContext.Response.StatusCode is still the default 200. It is now sent only on
the last run of the request, together with the response headers.

The request addresses are supplied once: the WAF keeps them for the life of its
context, so a later run re-evaluates rules and processors against the stored
values instead of paying for the whole set again. ASP.NET's session cookie is the
exception, since it only lands in Request.Cookies once the session id is read, so
the end of request run re-reads the cookies.

Servers without the instrumented response start hook (HTTP.sys) never saw a real
status at all; they now get a report-only scan at the end of the pipeline.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A Server.TransferRequest pipeline shares the trace context, so the one-shot
flag swallowed the transferred request's addresses. EndRequest starts from an
empty set instead. Also pins that a re-supplied status can't report twice.

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

1 participant