Skip to content

[IAST] Add Class field to vulnerability Location and repurpose Path to source file - #8930

Merged
dromanol merged 2 commits into
masterfrom
dani/iast/enhanced_location
Jul 29, 2026
Merged

[IAST] Add Class field to vulnerability Location and repurpose Path to source file#8930
dromanol merged 2 commits into
masterfrom
dani/iast/enhanced_location

Conversation

@dromanol

Copy link
Copy Markdown
Contributor

Summary of changes

Resemantizes the IAST vulnerability Location so the declaring type and the source file are reported in distinct fields:

  • New class field always carries the declaring type (DeclaringType.FullName) — this is what path used to hold.
  • method continues to carry the method name (unchanged).
  • path is repurposed to hold the source file name (basename of StackFrame.GetFileName()), present only when debug info (PDBs) is available.
  • line remains present only with debug info (as before).

Reason for change

Previously path conflated two concepts: it held the type name, never the actual source file, and left file/line information (which depends on PDBs) unused. This split makes class a stable, always-present identifier and lets path carry genuinely useful source-file information when PDBs are present.

Implementation details

  • Iast/Location.cs: added Class property; runtime ctor now sets Class = method?.DeclaringType?.FullName and Path = Path.GetFileName(stackFrame?.GetFileName()) (filename only, matching StackReporter and avoiding leaking build-machine paths). String and test ctors updated accordingly.
  • Location.GetHashCode() now hashes Class+Method (previously Path+Method, where Path was the type). Deduplication is unchanged — same inputs, same hash — and is now independent of PDB availability.
  • AppSec/Rasp/MetaStructHelper.cs: emits class in the MessagePack meta-struct. The _dd.iast.json span tag emits class automatically via the reflection-based camelCase serializer (NullValueHandling.Ignore).
  • vulnerability_schema.json: added class; path re-documented as "source file name (only available with debug info)".

Test coverage

  • Updated LocationTests and VulnerabilityBatchTests unit tests.
  • Regenerated the IAST integration snapshots (144 files): most are a deterministic pathclass rename (the normal integration environment does not expose PDBs for sample code).
  • The 3 snapshots with debug info (Razor/WebForms compiled types) were regenerated by running the IIS integration tests locally in Release (net48) to capture the real runtime source-file path:
    • Iast.ReflectedXss.AspNetMvc5.IastEnabledpath: "ReflectedXss.cshtml"
    • Security.AspNetWebForms.Classic/Integrated…TestQueryParameterNameVulnerabilitypath: "print.aspx.cs"
    • All 3 verified green locally.

Other details

⚠️ Backend coordination required: please confirm the wire/backend accepts the new class field and the resemantized path before merging.

@dromanol
dromanol requested review from a team as code owners July 23, 2026 10:10
@github-actions

Copy link
Copy Markdown
Contributor

Snapshots difference summary

The following differences have been observed in committed snapshots. It is meant to help the reviewer.
The diff is simplistic, so please check some files anyway while we improve it.

215 occurrences of :

-        "path": "Samples.Security.AspNetCore5.Controllers.IastController",
+        "class": "Samples.Security.AspNetCore5.Controllers.IastController",

1 occurrences of :

-        "path": "Samples.Security.AspNetCore5.Startup",
+        "class": "Samples.Security.AspNetCore5.Startup",

1 occurrences of :

-        "path": "Samples.Security.AspNetCore5.Helpers.EmailHelper",
+        "class": "Samples.Security.AspNetCore5.Helpers.EmailHelper",

2 occurrences of :

-        "path": "Samples.Security.AspNetCore5.Controllers.IastController+"
+        "class": "Samples.Security.AspNetCore5.Controllers.IastController+"

1 occurrences of :

-        "path": "Samples.Security.AspNetCore5.Controllers.IastController+<>c__DisplayClass28_0",
+        "class": "Samples.Security.AspNetCore5.Controllers.IastController+<>c__DisplayClass28_0",

2 occurrences of :

-        "path": "Samples.Security.Data.NHibernateHelper",
+        "class": "Samples.Security.Data.NHibernateHelper",

9 occurrences of :

-        "path": "AspNetCore.Views_Iast_Xss+<<ExecuteAsync>b__8_1>d",
+        "class": "AspNetCore.Views_Iast_Xss+<<ExecuteAsync>b__8_1>d",

1 occurrences of :

-        "path": "ASP._Page_Views_Iast_ReflectedXss_cshtml",
+        "path": "ReflectedXss.cshtml",
+        "class": "ASP._Page_Views_Iast_ReflectedXss_cshtml",

2 occurrences of :

-        "path": "Samples.Security.AspNetCore2.Pages.DataRazorIastPageModel",
+        "class": "Samples.Security.AspNetCore2.Pages.DataRazorIastPageModel",

2 occurrences of :

-        "path": "Samples.Security.AspNetCore5.DataRazorIastPageModel",
+        "class": "Samples.Security.AspNetCore5.DataRazorIastPageModel",

1 occurrences of :

-        "path": "Samples.Security.AspNetCore5.Startup+<>c__DisplayClass4_0",
+        "class": "Samples.Security.AspNetCore5.Startup+<>c__DisplayClass4_0",

2 occurrences of :

-        "path": "Iast_Print",
+        "path": "print.aspx.cs",
+        "class": "Iast_Print",

6 occurrences of :

-        "path": "Samples.WeakCipher.Program",
+        "class": "Samples.WeakCipher.Program",

8 occurrences of :

-        "path": "Samples.Deduplication.Program",
+        "class": "Samples.Deduplication.Program",

@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: ca126fbc34

ℹ️ 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/Iast/Location.cs Outdated
@pr-commenter

pr-commenter Bot commented Jul 23, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-28 16:41:44

Comparing candidate commit e850350 in PR branch dani/iast/enhanced_location with baseline commit 1a713f4 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 2 performance regressions! Performance is the same for 70 metrics, 0 unstable metrics, 59 known flaky benchmarks, 67 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 [-34419.784op/s; -31614.637op/s] or [-9.694%; -8.904%]

scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net472

  • 🟥 throughput [-5067.523op/s; -4457.552op/s] or [-5.785%; -5.089%]

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 [-10957.973op/s; -10197.522op/s] or [-12.993%; -12.091%]

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

  • 🟥 throughput [-10076.942op/s; -8473.546op/s] or [-10.246%; -8.616%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+317.909ms; +323.606ms] or [+157.758%; +160.585%]
  • 🟥 throughput [-43.086op/s; -39.274op/s] or [-7.752%; -7.066%]

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

  • 🟥 execution_time [+377.751ms; +379.041ms] or [+298.446%; +299.466%]
  • 🟩 throughput [+95.933op/s; +98.182op/s] or [+12.648%; +12.945%]

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

  • 🟥 execution_time [+394.235ms; +397.993ms] or [+348.883%; +352.209%]

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

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.528%; +27.540%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+9.976%; +9.987%]
  • 🟩 execution_time [-15.673ms; -11.504ms] or [-7.320%; -5.373%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.500%; +27.510%]

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

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.743%; +105.758%]
  • 🟥 throughput [-268671.793op/s; -261104.954op/s] or [-27.433%; -26.660%]

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

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.557%; +38.566%]
  • 🟩 execution_time [-27.228ms; -11.442ms] or [-12.142%; -5.103%]

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

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.288%; +105.304%]
  • 🟥 throughput [-149143.347op/s; -133374.138op/s] or [-21.429%; -19.163%]

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

  • 🟩 throughput [+8599.942op/s; +11331.235op/s] or [+6.851%; +9.027%]

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

  • 🟩 throughput [+453142.617op/s; +480795.544op/s] or [+15.110%; +16.032%]

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

  • 🟩 execution_time [-18.585ms; -14.252ms] or [-8.567%; -6.570%]
  • 🟩 throughput [+153263.115op/s; +206673.133op/s] or [+6.083%; +8.203%]

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

  • 🟥 execution_time [+300.114ms; +301.045ms] or [+149.957%; +150.422%]

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

  • 🟥 execution_time [+300.318ms; +303.910ms] or [+151.451%; +153.263%]

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

  • 🟥 execution_time [+300.888ms; +303.357ms] or [+151.564%; +152.808%]

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

  • 🟥 execution_time [+297.577ms; +298.953ms] or [+146.158%; +146.834%]

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

  • 🟥 execution_time [+291.183ms; +294.245ms] or [+142.349%; +143.845%]

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

  • 🟥 execution_time [+301.177ms; +305.225ms] or [+150.528%; +152.551%]

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

  • 🟥 execution_time [+19.780µs; +43.373µs] or [+6.315%; +13.847%]
  • 🟥 throughput [-406.776op/s; -208.199op/s] or [-12.680%; -6.490%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.737ms; +300.467ms] or [+149.600%; +149.964%]

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

  • 🟥 execution_time [+416.289ms; +423.855ms] or [+452.316%; +460.536%]
  • 🟩 throughput [+732.473op/s; +921.194op/s] or [+6.019%; +7.570%]

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

  • unstable execution_time [+297.884ms; +350.166ms] or [+226.181%; +265.878%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+317.532ms; +365.754ms] or [+145.998%; +168.170%]
  • 🟥 throughput [-507.062op/s; -465.699op/s] or [-45.945%; -42.197%]

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

  • unstable execution_time [+201.256ms; +334.506ms] or [+85.767%; +142.553%]
  • 🟥 throughput [-668.636op/s; -585.170op/s] or [-44.598%; -39.031%]

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

  • 🟥 execution_time [+355.140ms; +367.706ms] or [+212.415%; +219.931%]
  • 🟥 throughput [-419.009op/s; -380.225op/s] or [-29.175%; -26.475%]

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

  • unstable execution_time [-179.457µs; +11.430µs] or [-9.614%; +0.612%]
  • unstable throughput [+7.168op/s; +119.900op/s] or [+1.338%; +22.380%]

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

  • 🟩 execution_time [-156.501µs; -100.588µs] or [-7.928%; -5.095%]
  • 🟩 throughput [+29.453op/s; +43.886op/s] or [+5.814%; +8.664%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+303.003ms; +306.267ms] or [+152.587%; +154.230%]

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

  • 🟥 execution_time [+303.507ms; +305.106ms] or [+152.088%; +152.889%]

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

  • 🟥 execution_time [+299.828ms; +303.209ms] or [+150.621%; +152.319%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+301.830ms; +304.039ms] or [+151.569%; +152.678%]

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

  • 🟥 execution_time [+298.381ms; +301.521ms] or [+147.536%; +149.089%]

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

  • 🟥 execution_time [+302.585ms; +306.805ms] or [+153.363%; +155.502%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+298.914ms; +302.890ms] or [+150.028%; +152.024%]

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

  • 🟥 execution_time [+297.318ms; +300.932ms] or [+148.186%; +149.987%]
  • 🟩 throughput [+43223.086op/s; +52483.182op/s] or [+8.583%; +10.421%]

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

  • 🟥 execution_time [+298.624ms; +301.500ms] or [+148.563%; +149.994%]

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

  • 🟩 execution_time [-16.625ms; -12.984ms] or [-7.731%; -6.038%]
  • 🟩 throughput [+20047.215op/s; +26839.494op/s] or [+5.500%; +7.363%]

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

  • unstable execution_time [+12.466µs; +57.665µs] or [+3.079%; +14.244%]

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

  • 🟩 allocated_mem [-24.148KB; -24.126KB] or [-8.809%; -8.801%]
  • unstable execution_time [-32.069µs; +26.540µs] or [-6.338%; +5.245%]
  • unstable throughput [-91.916op/s; +113.944op/s] or [-4.587%; +5.686%]

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

  • unstable execution_time [-46.585µs; +16.456µs] or [-8.073%; +2.852%]

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

  • 🟥 execution_time [+5.816µs; +9.547µs] or [+13.747%; +22.566%]
  • 🟥 throughput [-4556.859op/s; -2819.217op/s] or [-19.183%; -11.868%]

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

  • unstable execution_time [-14.172µs; -6.550µs] or [-21.988%; -10.162%]
  • 🟩 throughput [+1613.744op/s; +3216.713op/s] or [+9.901%; +19.736%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.944ms; +304.370ms] or [+153.125%; +153.845%]

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

  • 🟥 execution_time [+303.374ms; +305.560ms] or [+154.417%; +155.529%]

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

  • 🟥 execution_time [+301.133ms; +303.531ms] or [+150.754%; +151.955%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+299.293ms; +302.102ms] or [+149.171%; +150.571%]

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

  • 🟥 execution_time [+301.728ms; +303.235ms] or [+151.513%; +152.270%]

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

  • 🟥 execution_time [+302.603ms; +304.836ms] or [+153.461%; +154.593%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.335ms; +300.214ms] or [+149.310%; +149.748%]
  • 🟩 throughput [+61252369.020op/s; +61607423.357op/s] or [+44.608%; +44.866%]

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

  • 🟥 execution_time [+425.597ms; +431.067ms] or [+529.306%; +536.109%]

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

  • 🟥 execution_time [+299.151ms; +300.163ms] or [+149.210%; +149.715%]

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

  • 🟩 throughput [+84924.429op/s; +97117.933op/s] or [+7.929%; +9.068%]

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

  • 🟩 throughput [+90588.959op/s; +120250.295op/s] or [+7.012%; +9.308%]

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

  • 🟩 throughput [+59884.029op/s; +68683.928op/s] or [+5.947%; +6.821%]

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

  • 🟩 throughput [+55504.228op/s; +60205.123op/s] or [+10.079%; +10.932%]

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

  • 🟩 throughput [+22684.908op/s; +32564.384op/s] or [+5.078%; +7.289%]

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

  • 🟩 throughput [+55012.649op/s; +78831.178op/s] or [+6.146%; +8.807%]

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.ObjectExtractorMoreComplexBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1
  • 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.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.TraceAnnotationsBenchmark.RunOnMethodBegin net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

@dd-trace-dotnet-ci-bot

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

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

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration73.56 ± (73.53 - 74.14) ms74.63 ± (74.49 - 75.19) ms+1.5%✅⬆️
.NET Framework 4.8 - Bailout
duration77.51 ± (77.53 - 78.12) ms77.15 ± (77.03 - 77.58) ms-0.5%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1088.08 ± (1088.06 - 1095.06) ms1093.38 ± (1094.52 - 1102.57) ms+0.5%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.41 ± (22.35 - 22.46) ms22.49 ± (22.44 - 22.54) ms+0.4%✅⬆️
process.time_to_main_ms84.60 ± (84.28 - 84.93) ms83.60 ± (83.25 - 83.94) ms-1.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed11.01 ± (11.00 - 11.01) MB11.00 ± (11.00 - 11.01) MB-0.0%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.07 ± (22.04 - 22.10) ms22.17 ± (22.14 - 22.20) ms+0.5%✅⬆️
process.time_to_main_ms83.30 ± (83.12 - 83.48) ms82.72 ± (82.57 - 82.86) ms-0.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed11.04 ± (11.03 - 11.04) MB11.04 ± (11.04 - 11.05) MB+0.1%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms209.88 ± (209.09 - 210.67) ms211.19 ± (210.27 - 212.11) ms+0.6%✅⬆️
process.time_to_main_ms538.10 ± (536.67 - 539.54) ms541.53 ± (540.28 - 542.79) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.43 ± (49.40 - 49.47) MB49.41 ± (49.38 - 49.44) MB-0.0%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 6 - Baseline
process.internal_duration_ms20.83 ± (20.81 - 20.86) ms20.91 ± (20.87 - 20.95) ms+0.4%✅⬆️
process.time_to_main_ms70.80 ± (70.66 - 70.94) ms71.36 ± (71.22 - 71.51) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.72 ± (10.72 - 10.72) MB10.72 ± (10.72 - 10.72) MB+0.0%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.06 ± (21.01 - 21.12) ms20.79 ± (20.76 - 20.82) ms-1.3%
process.time_to_main_ms73.89 ± (73.63 - 74.16) ms72.03 ± (71.93 - 72.14) ms-2.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.85 ± (10.85 - 10.85) MB10.85 ± (10.85 - 10.85) MB-0.0%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms371.16 ± (369.11 - 373.21) ms372.78 ± (370.49 - 375.06) ms+0.4%✅⬆️
process.time_to_main_ms541.55 ± (540.48 - 542.61) ms543.84 ± (542.61 - 545.08) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed50.57 ± (50.55 - 50.59) MB50.58 ± (50.55 - 50.60) MB+0.0%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.2%
.NET 8 - Baseline
process.internal_duration_ms19.24 ± (19.20 - 19.27) ms19.38 ± (19.33 - 19.44) ms+0.8%✅⬆️
process.time_to_main_ms71.33 ± (71.09 - 71.58) ms73.75 ± (73.48 - 74.02) ms+3.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.76 ± (7.76 - 7.77) MB7.77 ± (7.76 - 7.77) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.13 ± (19.11 - 19.16) ms18.98 ± (18.96 - 19.01) ms-0.8%
process.time_to_main_ms71.47 ± (71.36 - 71.58) ms71.78 ± (71.63 - 71.94) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.82 ± (7.81 - 7.83) MB7.83 ± (7.82 - 7.83) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms299.99 ± (297.77 - 302.20) ms296.20 ± (293.59 - 298.81) ms-1.3%
process.time_to_main_ms493.63 ± (492.42 - 494.84) ms496.13 ± (494.89 - 497.37) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed37.97 ± (37.94 - 37.99) MB37.97 ± (37.94 - 37.99) MB-0.0%
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.2%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration208.90 ± (208.92 - 210.16) ms217.32 ± (216.64 - 218.84) ms+4.0%✅⬆️
.NET Framework 4.8 - Bailout
duration211.69 ± (211.77 - 212.76) ms221.07 ± (220.63 - 222.12) ms+4.4%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1243.09 ± (1242.21 - 1249.33) ms1275.24 ± (1274.37 - 1282.86) ms+2.6%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms204.61 ± (203.94 - 205.27) ms213.26 ± (212.20 - 214.31) ms+4.2%✅⬆️
process.time_to_main_ms88.34 ± (88.05 - 88.63) ms90.60 ± (90.16 - 91.03) ms+2.6%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.02 ± (16.01 - 16.04) MB16.12 ± (16.10 - 16.13) MB+0.6%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+1.2%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms206.99 ± (206.27 - 207.71) ms217.39 ± (216.19 - 218.60) ms+5.0%✅⬆️
process.time_to_main_ms90.33 ± (90.00 - 90.65) ms93.82 ± (93.36 - 94.28) ms+3.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.07 ± (16.06 - 16.09) MB16.11 ± (16.10 - 16.13) MB+0.3%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)+0.5%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms396.11 ± (394.59 - 397.63) ms408.35 ± (406.95 - 409.74) ms+3.1%✅⬆️
process.time_to_main_ms562.44 ± (560.96 - 563.93) ms575.76 ± (574.44 - 577.07) ms+2.4%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed59.71 ± (59.56 - 59.86) MB59.84 ± (59.79 - 59.90) MB+0.2%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.2%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms210.93 ± (210.01 - 211.85) ms220.13 ± (218.90 - 221.36) ms+4.4%✅⬆️
process.time_to_main_ms77.34 ± (77.06 - 77.63) ms79.69 ± (79.40 - 79.98) ms+3.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.39 ± (16.37 - 16.41) MB16.29 ± (16.27 - 16.30) MB-0.6%
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (19 - 20)+0.1%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms205.89 ± (205.21 - 206.57) ms210.74 ± (210.02 - 211.45) ms+2.4%✅⬆️
process.time_to_main_ms77.49 ± (77.28 - 77.69) ms79.49 ± (79.27 - 79.71) ms+2.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.38 ± (16.36 - 16.40) MB16.41 ± (16.39 - 16.43) MB+0.2%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)21 ± (20 - 21)+0.8%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms583.14 ± (580.58 - 585.71) ms583.67 ± (580.45 - 586.88) ms+0.1%✅⬆️
process.time_to_main_ms569.28 ± (568.13 - 570.42) ms580.96 ± (579.74 - 582.19) ms+2.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed61.65 ± (61.56 - 61.73) MB61.67 ± (61.58 - 61.75) MB+0.0%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.6%
.NET 8 - Baseline
process.internal_duration_ms205.16 ± (204.42 - 205.90) ms214.71 ± (213.67 - 215.76) ms+4.7%✅⬆️
process.time_to_main_ms75.59 ± (75.38 - 75.81) ms77.69 ± (77.43 - 77.94) ms+2.8%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.76 ± (11.74 - 11.77) MB11.64 ± (11.62 - 11.66) MB-1.0%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+1.1%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms211.77 ± (210.78 - 212.77) ms214.34 ± (213.16 - 215.52) ms+1.2%✅⬆️
process.time_to_main_ms77.93 ± (77.71 - 78.16) ms79.31 ± (79.04 - 79.59) ms+1.8%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.75 ± (11.73 - 11.77) MB11.71 ± (11.69 - 11.72) MB-0.4%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+1.2%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms539.98 ± (532.60 - 547.36) ms584.68 ± (577.29 - 592.07) ms+8.3%✅⬆️
process.time_to_main_ms521.29 ± (520.36 - 522.22) ms531.85 ± (530.80 - 532.90) ms+2.0%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed51.62 ± (51.54 - 51.71) MB52.04 ± (51.94 - 52.14) MB+0.8%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.2%✅⬆️
Comparison explanation

Execution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8930) - mean (75ms)  : 70, 80
    master - mean (74ms)  : 69, 78

    section Bailout
    This PR (8930) - mean (77ms)  : 73, 82
    master - mean (78ms)  : 74, 82

    section CallTarget+Inlining+NGEN
    This PR (8930) - mean (1,099ms)  : 1041, 1156
    master - mean (1,092ms)  : 1042, 1141

Loading
FakeDbCommand (.NET Core 3.1)
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8930) - mean (114ms)  : 106, 121
    master - mean (114ms)  : 109, 120

    section Bailout
    This PR (8930) - mean (111ms)  : 109, 114
    master - mean (112ms)  : 108, 116

    section CallTarget+Inlining+NGEN
    This PR (8930) - mean (790ms)  : 762, 818
    master - mean (785ms)  : 762, 808

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8930) - mean (98ms)  : 95, 102
    master - mean (97ms)  : 95, 100

    section Bailout
    This PR (8930) - mean (99ms)  : 97, 100
    master - mean (102ms)  : 95, 109

    section CallTarget+Inlining+NGEN
    This PR (8930) - mean (949ms)  : 909, 989
    master - mean (943ms)  : 903, 984

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8930) - mean (101ms)  : 95, 107
    master - mean (98ms)  : 93, 103

    section Bailout
    This PR (8930) - mean (98ms)  : 94, 101
    master - mean (97ms)  : 96, 99

    section CallTarget+Inlining+NGEN
    This PR (8930) - mean (823ms)  : 781, 864
    master - mean (829ms)  : 781, 877

Loading
HttpMessageHandler (.NET Framework 4.8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8930) - mean (218ms)  : 202, 234
    master - mean (210ms)  : 201, 219

    section Bailout
    This PR (8930) - mean (221ms)  : 211, 232
    master - mean (212ms)  : 205, 219

    section CallTarget+Inlining+NGEN
    This PR (8930) - mean (1,279ms)  : 1216, 1341
    master - mean (1,246ms)  : 1194, 1297

Loading
HttpMessageHandler (.NET Core 3.1)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8930) - mean (314ms)  : 296, 333
    master - mean (304ms)  : 290, 317

    section Bailout
    This PR (8930) - mean (322ms)  : 301, 343
    master - mean (308ms)  : 290, 327

    section CallTarget+Inlining+NGEN
    This PR (8930) - mean (1,026ms)  : 992, 1060
    master - mean (1,002ms)  : 976, 1027

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8930) - mean (310ms)  : 285, 335
    master - mean (298ms)  : 281, 315

    section Bailout
    This PR (8930) - mean (299ms)  : 286, 312
    master - mean (292ms)  : 280, 305

    section CallTarget+Inlining+NGEN
    This PR (8930) - mean (1,203ms)  : 1156, 1249
    master - mean (1,189ms)  : 1147, 1231

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8930) - mean (304ms)  : 282, 327
    master - mean (292ms)  : 277, 307

    section Bailout
    This PR (8930) - mean (305ms)  : 286, 324
    master - mean (301ms)  : 283, 319

    section CallTarget+Inlining+NGEN
    This PR (8930) - mean (1,152ms)  : 1033, 1271
    master - mean (1,095ms)  : 985, 1205

Loading

dromanol and others added 2 commits July 28, 2026 17:51
Split the vulnerability Location so that the declaring type and the source
file are reported in distinct fields:

- New `class` field always carries the declaring type (`DeclaringType.FullName`)
  — this is what `path` used to hold.
- `method` continues to carry the method name.
- `path` is repurposed to hold the source file name (basename of
  `StackFrame.GetFileName()`), present only when debug info (PDBs) is available.
- `line` remains present only with debug info.

Deduplication is unchanged: `Location.GetHashCode()` now hashes `Class`+`Method`
(previously `Path`+`Method`, where `Path` was the type), so the hash is stable
and independent of PDB availability.

Updates the MessagePack meta-struct emission, the vulnerability JSON schema, unit
tests, and regenerates the IAST integration snapshots. The three snapshots with
debug info (Razor/WebForms compiled types) were regenerated locally in Release to
capture the real runtime source-file `path` values.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ename

The Location resemantization moved the declaring type from `path` to the
new `class` field. Update the test infrastructure that was still keyed to
the old layout:

- AspNetCore5IastTests: move the type-normalizing scrubbers (Razor
  `AspNetCoreGeneratedDocument`, compiler display classes, Program/Startup)
  from `path` to `class` so unstable generated names stay scrubbed.
- GrpcDotNetTests: widen the `location` block scrubber from {0,4} to {0,6}
  inner lines so the (now 5-field) block is still fully removed.
- Samples.InstrumentedTests: reflect `Location.Class` instead of `Path`
  for the LocationIsOk type-containment check.
- Location: split source-file basename on both `/` and `\` so a
  Windows-built PDB read on Unix does not leak the full build path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dromanol
dromanol force-pushed the dani/iast/enhanced_location branch from 64ee155 to e850350 Compare July 28, 2026 15:51
@dromanol
dromanol enabled auto-merge (squash) July 29, 2026 07:05
internal readonly struct Location
{
// Both Windows ('\') and Unix ('/') separators, because PDBs produced on one OS may be read on another.
private static readonly char[] PathSeparators = ['/', '\\'];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: we have a Separators class that we use in various places, could we move this to there so we can reuse it in other places too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agree


// Add scrub for the location data, as using APM sample, we won't disable symbols on their sample
(Regex RegexPattern, string Replacement) locationMsgRegex = (new Regex(@"(\S)*""location"": {(\r|\n){1,2}(.*(\r|\n){1,2}){0,4}(\s)*},"), string.Empty);
(Regex RegexPattern, string Replacement) locationMsgRegex = (new Regex(@"(\S)*""location"": {(\r|\n){1,2}(.*(\r|\n){1,2}){0,6}(\s)*},"), string.Empty);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why did this need to change? 🤔 should it be 5 for class? 😅

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I suppose Claude wanted to be extra sure XD

@dromanol
dromanol merged commit 7bdf71e into master Jul 29, 2026
72 of 75 checks passed
@dromanol
dromanol deleted the dani/iast/enhanced_location branch July 29, 2026 16:18
@github-actions github-actions Bot added this to the vNext-v3 milestone Jul 29, 2026
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