Skip to content

[Code Origin] DEBUG-4998 Add code origin support for Net Framework MVC and web api#8083

Closed
dudikeleti wants to merge 7 commits into
masterfrom
dudik/co/add-netframework-support
Closed

[Code Origin] DEBUG-4998 Add code origin support for Net Framework MVC and web api#8083
dudikeleti wants to merge 7 commits into
masterfrom
dudik/co/add-netframework-support

Conversation

@dudikeleti

@dudikeleti dudikeleti commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

Reason for change

Code Origin for Spans was already supported on ASP.NET Core entry spans, but classic ASP.NET (.NET Framework) MVC/Web API entry spans (aspnet.request) were missing _dd.code_origin.* tags, preventing file/line enrichment and consistent “entry span origin” behavior across runtimes. There is an open customer ticket for this.

Implementation details

  • MVC: Added code origin tagging for the entry span (aspnet.request) in ControllerActionInvoker_InvokeAction_Integration.

    • Updated InstrumentationCategory to include Tracing. These hooks previously ran only under AppSec/IAST categories, but Code Origin for Spans must execute even when AppSec/IAST are disabled.
  • Web API: Added code origin tagging for the entry span (aspnet.request) in ReflectedHttpActionDescriptor_ExecuteAsync_Integration.

    • Updated InstrumentationCategory to include Tracing for the same reason: ensure code-origin tagging runs in tracing-only scenarios.
  • PDB enrichment support: Extended EndpointDetector to recognize .NET Framework MVC/Web API controller endpoints so sequence points can be loaded for file/line/column.

Out of scope of this PR

This change focuses only on entry spans for .NET Framework ASP.NET MVC 4/5 and Web API 2. It does not add Code Origin for Spans support for the following:

  • WCF spans (support will be added in a follow-up PR)
  • WebForms or generic IHttpHandler (support may be added if required)
  • OWIN and others, which are currently not supported

Test coverage

  • Unit tests: Updated EndpointDetectorTests to validate detection of .NET Framework MVC/WebApi2 endpoints.
  • Integration tests: AspNetMvc5CodeOriginTests & AspNetWebApi2CodeOriginTests
    Enabled code origin via env var and verified emitted span snapshots include code origin tags.

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Jan 21, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8083) 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
duration69.36 ± (69.43 - 69.72) ms69.38 ± (69.51 - 69.77) ms+0.0%✅⬆️
.NET Framework 4.8 - Bailout
duration73.61 ± (73.54 - 73.87) ms73.09 ± (73.01 - 73.28) ms-0.7%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1041.73 ± (1043.76 - 1051.45) ms1040.41 ± (1040.82 - 1046.04) ms-0.1%
.NET Core 3.1 - Baseline
process.internal_duration_ms21.89 ± (21.86 - 21.91) ms21.89 ± (21.86 - 21.92) ms+0.0%✅⬆️
process.time_to_main_ms79.81 ± (79.65 - 79.97) ms80.01 ± (79.86 - 80.16) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.92 - 10.93) MB10.93 ± (10.92 - 10.93) MB+0.0%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms21.84 ± (21.82 - 21.87) ms21.85 ± (21.83 - 21.88) ms+0.0%✅⬆️
process.time_to_main_ms81.19 ± (81.06 - 81.33) ms81.23 ± (81.12 - 81.34) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.95 ± (10.95 - 10.96) MB10.95 ± (10.95 - 10.95) MB-0.0%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms256.94 ± (254.13 - 259.76) ms255.28 ± (252.98 - 257.57) ms-0.6%
process.time_to_main_ms471.14 ± (470.59 - 471.70) ms473.11 ± (472.58 - 473.64) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.65 ± (47.62 - 47.67) MB47.69 ± (47.66 - 47.71) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.2%
.NET 6 - Baseline
process.internal_duration_ms20.70 ± (20.68 - 20.73) ms20.78 ± (20.75 - 20.81) ms+0.4%✅⬆️
process.time_to_main_ms69.73 ± (69.58 - 69.87) ms69.58 ± (69.45 - 69.72) ms-0.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.64 ± (10.63 - 10.64) MB10.64 ± (10.64 - 10.64) MB+0.0%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.61 ± (20.59 - 20.63) ms20.79 ± (20.75 - 20.82) ms+0.9%✅⬆️
process.time_to_main_ms70.35 ± (70.22 - 70.48) ms70.98 ± (70.86 - 71.10) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.75 ± (10.74 - 10.75) MB10.75 ± (10.74 - 10.75) MB+0.0%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms248.31 ± (245.90 - 250.72) ms252.44 ± (251.13 - 253.75) ms+1.7%✅⬆️
process.time_to_main_ms450.28 ± (449.86 - 450.69) ms450.90 ± (450.39 - 451.40) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.43 ± (48.40 - 48.47) MB48.55 ± (48.52 - 48.58) MB+0.2%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms18.90 ± (18.87 - 18.93) ms18.94 ± (18.92 - 18.97) ms+0.2%✅⬆️
process.time_to_main_ms68.64 ± (68.53 - 68.75) ms68.88 ± (68.75 - 69.01) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.66 - 7.67) MB7.70 ± (7.69 - 7.71) MB+0.4%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms18.95 ± (18.91 - 18.98) ms18.98 ± (18.95 - 19.00) ms+0.2%✅⬆️
process.time_to_main_ms69.89 ± (69.77 - 70.02) ms69.97 ± (69.87 - 70.08) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.74 ± (7.73 - 7.75) MB7.79 ± (7.78 - 7.80) MB+0.6%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms178.99 ± (178.17 - 179.81) ms181.33 ± (180.37 - 182.30) ms+1.3%✅⬆️
process.time_to_main_ms430.04 ± (429.38 - 430.70) ms431.58 ± (430.93 - 432.22) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed35.94 ± (35.91 - 35.98) MB35.97 ± (35.94 - 36.00) MB+0.1%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.1%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration193.59 ± (193.59 - 194.53) ms194.77 ± (194.35 - 195.15) ms+0.6%✅⬆️
.NET Framework 4.8 - Bailout
duration197.22 ± (197.03 - 197.71) ms196.85 ± (196.79 - 197.32) ms-0.2%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1146.15 ± (1148.32 - 1155.84) ms1147.03 ± (1149.53 - 1157.12) ms+0.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms187.69 ± (187.34 - 188.04) ms188.29 ± (187.96 - 188.63) ms+0.3%✅⬆️
process.time_to_main_ms81.23 ± (81.06 - 81.40) ms81.70 ± (81.50 - 81.90) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.12 ± (16.10 - 16.15) MB16.12 ± (16.09 - 16.14) MB-0.1%
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+0.2%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms188.41 ± (187.99 - 188.83) ms187.83 ± (187.53 - 188.14) ms-0.3%
process.time_to_main_ms82.85 ± (82.64 - 83.06) ms82.65 ± (82.49 - 82.81) ms-0.2%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.13 ± (16.11 - 16.16) MB16.20 ± (16.17 - 16.23) MB+0.4%✅⬆️
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (20 - 21)-0.2%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms441.33 ± (439.31 - 443.34) ms442.81 ± (440.68 - 444.95) ms+0.3%✅⬆️
process.time_to_main_ms475.97 ± (475.46 - 476.48) ms477.79 ± (477.22 - 478.36) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.92 ± (57.80 - 58.04) MB57.92 ± (57.80 - 58.05) MB+0.0%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)-0.0%
.NET 6 - Baseline
process.internal_duration_ms191.58 ± (191.19 - 191.97) ms192.84 ± (192.51 - 193.17) ms+0.7%✅⬆️
process.time_to_main_ms70.50 ± (70.27 - 70.72) ms70.75 ± (70.57 - 70.94) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.25 ± (16.13 - 16.37) MB16.30 ± (16.20 - 16.40) MB+0.3%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.5%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms190.68 ± (190.35 - 191.01) ms191.60 ± (191.31 - 191.90) ms+0.5%✅⬆️
process.time_to_main_ms71.30 ± (71.18 - 71.42) ms71.65 ± (71.53 - 71.78) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.02 ± (15.86 - 16.18) MB16.45 ± (16.38 - 16.53) MB+2.7%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 20)20 ± (20 - 20)+2.0%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms455.13 ± (453.11 - 457.16) ms451.33 ± (449.85 - 452.81) ms-0.8%
process.time_to_main_ms453.66 ± (453.02 - 454.29) ms452.50 ± (451.82 - 453.18) ms-0.3%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed57.97 ± (57.85 - 58.09) MB58.05 ± (57.94 - 58.15) MB+0.1%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms190.51 ± (190.08 - 190.94) ms191.39 ± (190.96 - 191.82) ms+0.5%✅⬆️
process.time_to_main_ms69.82 ± (69.65 - 69.98) ms70.44 ± (70.24 - 70.64) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.75 - 11.81) MB11.75 ± (11.73 - 11.77) MB-0.2%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.1%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms189.39 ± (189.07 - 189.70) ms190.16 ± (189.84 - 190.49) ms+0.4%✅⬆️
process.time_to_main_ms70.91 ± (70.76 - 71.06) ms71.21 ± (71.08 - 71.34) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.86 ± (11.83 - 11.90) MB11.81 ± (11.79 - 11.84) MB-0.4%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.4%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms368.35 ± (367.00 - 369.70) ms367.47 ± (366.31 - 368.63) ms-0.2%
process.time_to_main_ms434.97 ± (434.29 - 435.66) ms437.34 ± (436.57 - 438.12) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed47.72 ± (47.69 - 47.76) MB47.72 ± (47.70 - 47.75) MB+0.0%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.7%✅⬆️
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 (8083) - mean (70ms)  : 68, 72
    master - mean (70ms)  : 67, 72

    section Bailout
    This PR (8083) - mean (73ms)  : 72, 74
    master - mean (74ms)  : 72, 75

    section CallTarget+Inlining+NGEN
    This PR (8083) - mean (1,043ms)  : 1006, 1080
    master - mean (1,048ms)  : 993, 1103

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 (8083) - mean (107ms)  : 105, 110
    master - mean (107ms)  : 105, 110

    section Bailout
    This PR (8083) - mean (109ms)  : 107, 110
    master - mean (109ms)  : 107, 110

    section CallTarget+Inlining+NGEN
    This PR (8083) - mean (753ms)  : 713, 794
    master - mean (755ms)  : 714, 795

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8083) - mean (96ms)  : 93, 98
    master - mean (96ms)  : 93, 98

    section Bailout
    This PR (8083) - mean (97ms)  : 95, 99
    master - mean (96ms)  : 95, 98

    section CallTarget+Inlining+NGEN
    This PR (8083) - mean (728ms)  : 686, 770
    master - mean (725ms)  : 682, 767

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8083) - mean (94ms)  : 92, 97
    master - mean (94ms)  : 92, 96

    section Bailout
    This PR (8083) - mean (96ms)  : 94, 98
    master - mean (95ms)  : 93, 98

    section CallTarget+Inlining+NGEN
    This PR (8083) - mean (640ms)  : 624, 657
    master - mean (636ms)  : 623, 649

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 (8083) - mean (195ms)  : 191, 199
    master - mean (194ms)  : 188, 200

    section Bailout
    This PR (8083) - mean (197ms)  : 195, 200
    master - mean (197ms)  : 194, 201

    section CallTarget+Inlining+NGEN
    This PR (8083) - mean (1,153ms)  : 1099, 1207
    master - mean (1,152ms)  : 1098, 1206

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 (8083) - mean (279ms)  : 274, 283
    master - mean (278ms)  : 271, 284

    section Bailout
    This PR (8083) - mean (279ms)  : 275, 282
    master - mean (280ms)  : 273, 286

    section CallTarget+Inlining+NGEN
    This PR (8083) - mean (950ms)  : 915, 985
    master - mean (948ms)  : 915, 981

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8083) - mean (272ms)  : 267, 277
    master - mean (270ms)  : 265, 276

    section Bailout
    This PR (8083) - mean (272ms)  : 268, 276
    master - mean (270ms)  : 266, 274

    section CallTarget+Inlining+NGEN
    This PR (8083) - mean (935ms)  : 910, 959
    master - mean (938ms)  : 905, 971

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8083) - mean (272ms)  : 263, 280
    master - mean (270ms)  : 263, 277

    section Bailout
    This PR (8083) - mean (271ms)  : 266, 275
    master - mean (270ms)  : 265, 275

    section CallTarget+Inlining+NGEN
    This PR (8083) - mean (837ms)  : 810, 863
    master - mean (834ms)  : 805, 863

Loading

@dudikeleti dudikeleti marked this pull request as ready for review January 27, 2026 14:00
@dudikeleti dudikeleti requested review from a team as code owners January 27, 2026 14:00

@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: 962ba7063e

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

@dudikeleti dudikeleti force-pushed the dudik/co/add-netframework-support branch from 962ba70 to 34ebc7e Compare January 27, 2026 15:34
@dudikeleti dudikeleti marked this pull request as draft January 27, 2026 15:34
@dudikeleti dudikeleti force-pushed the dudik/co/add-netframework-support branch from 34ebc7e to 38627f7 Compare February 9, 2026 23:00
@pr-commenter

pr-commenter Bot commented Feb 9, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-02-11 12:25:51

Comparing candidate commit 4545956 in PR branch dudik/co/add-netframework-support with baseline commit 53ab69a in branch master.

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

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

  • 🟥 execution_time [+43.693ms; +45.842ms] or [+27.799%; +29.167%]

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

  • 🟩 execution_time [-82.402ms; -82.018ms] or [-40.689%; -40.499%]

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

  • 🟩 execution_time [-109.102ms; -108.953ms] or [-50.128%; -50.059%]

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

  • 🟥 execution_time [+19.644ms; +25.435ms] or [+10.020%; +12.974%]

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

  • 🟥 execution_time [+19.428µs; +47.972µs] or [+5.773%; +14.255%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟩 throughput [+90.429op/s; +124.717op/s] or [+8.981%; +12.386%]

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

  • 🟥 execution_time [+22.833ms; +27.647ms] or [+11.951%; +14.470%]

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

  • 🟥 throughput [-155.561op/s; -103.964op/s] or [-9.639%; -6.442%]
  • 🟩 execution_time [-19.708ms; -13.396ms] or [-11.043%; -7.506%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472

  • 🟩 throughput [+25.171op/s; +27.188op/s] or [+5.230%; +5.649%]

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

  • 🟥 execution_time [+11.203ms; +12.338ms] or [+5.620%; +6.189%]

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

  • 🟩 execution_time [-17.843ms; -12.857ms] or [-8.354%; -6.019%]

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

  • 🟥 execution_time [+10.884ms; +16.181ms] or [+5.894%; +8.762%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472

  • 🟥 throughput [-18107.998op/s; -17021.095op/s] or [-5.322%; -5.003%]

@dudikeleti dudikeleti force-pushed the dudik/co/add-netframework-support branch from 15ff893 to 4545956 Compare February 11, 2026 11:44
@dudikeleti dudikeleti marked this pull request as ready for review February 11, 2026 12:12
@dudikeleti dudikeleti requested a review from a team as a code owner February 11, 2026 12:12
@dudikeleti dudikeleti added AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos area:debugger labels Feb 11, 2026
@dudikeleti dudikeleti requested a review from Copilot February 11, 2026 13:04

Copilot AI 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.

Pull request overview

This PR adds Code Origin for Spans support to .NET Framework MVC 4/5 and Web API 2 entry spans (aspnet.request), enabling file/line enrichment for these frameworks. Previously, only ASP.NET Core had this functionality.

Changes:

  • Extended instrumentation hooks in MVC/Web API integrations to include Tracing category and add code origin tags to entry spans
  • Updated EndpointDetector to recognize .NET Framework MVC/Web API controller endpoints for PDB enrichment
  • Added integration tests with snapshot verification for both Classic and Integrated IIS modes

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tracer/src/Datadog.Trace/Debugger/SpanCodeOrigin/EndpointDetector.cs Extended endpoint detection to recognize .NET Framework MVC/Web API controllers
tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNet/ControllerActionInvoker_InvokeAction_Integration.cs Added code origin tagging for MVC entry spans and updated instrumentation category
tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNet/ReflectedHttpActionDescriptor_ExecuteAsync_Integration.cs Added code origin tagging for Web API entry spans and updated instrumentation category
tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AspNet/ActionDescriptorWithMethodInfo.cs Duck type interface for extracting MethodInfo from action descriptors
tracer/test/Datadog.Trace.Tests/Debugger/EndpointDetectorTests.cs Unit tests validating detection of .NET Framework MVC/Web API endpoints
tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AspNet/AspNetMvc5CodeOriginTests.cs Integration tests for MVC code origin functionality
tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AspNet/AspNetWebApi2CodeOriginTests.cs Integration tests for Web API code origin functionality
tracer/test/snapshots/*.verified.txt Snapshot files verifying code origin tags are present in test spans
tracer/test/Datadog.Trace.Security.IntegrationTests/AspNetWebApi.cs Adjusted expected span count based on AppSec enabled state
tracer/build/supported_calltargets.g.json Updated instrumentation category flags for the modified hooks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dudikeleti dudikeleti force-pushed the dudik/co/add-netframework-support branch from c659016 to 22e8dbd Compare March 5, 2026 10:34
@dudikeleti dudikeleti removed the AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos label May 19, 2026
@dudikeleti dudikeleti closed this Jun 4, 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.

2 participants