Skip to content

ServiceNameSource for inferred proxy#8309

Merged
NachoEchevarria merged 2 commits into
masterfrom
nacho/AddProxySourceName
Mar 16, 2026
Merged

ServiceNameSource for inferred proxy#8309
NachoEchevarria merged 2 commits into
masterfrom
nacho/AddProxySourceName

Conversation

@NachoEchevarria

@NachoEchevarria NachoEchevarria commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator

Summary of changes

Pass explicit serviceNameSource for inferred proxy span factories so _dd.svc_src correctly identifies the integration that set the service name.

Reason for change

Per the service name source RFC, integration-driven service overrides must set _dd.svc_src to the integration name. The proxy factories were passing serviceName without serviceNameSource, leaving the tag unset.

Implementation details

  • AwsApiGatewaySpanFactory: passes serviceNameSource: "aws-apigateway"
  • AzureApiManagementSpanFactory: passes serviceNameSource: "azure-apim"

Test coverage

Updated 30 snapshot files to include the new _dd.svc_src tag on inferred proxy spans.

Other details

Part of the _dd.svc_src RFC implementation. Manual instrumentation source ("m") is handled in a separate PR.

@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.

29 occurrences of :

+      _dd.svc_src: aws-apigateway

1 occurrences of :

+      _dd.svc_src: azure-apim

@NachoEchevarria NachoEchevarria changed the title Add proxy source names ServiceNameSource for inferred proxy Mar 16, 2026
@NachoEchevarria NachoEchevarria added the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label Mar 16, 2026
@pr-commenter

pr-commenter Bot commented Mar 16, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-03-16 13:57:01

Comparing candidate commit 8d580b3 in PR branch nacho/AddProxySourceName with baseline commit 46f950d in branch master.

Found 5 performance improvements and 6 performance regressions! Performance is the same for 167 metrics, 14 unstable metrics.

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

  • 🟥 execution_time [+78.921ms; +80.143ms] or [+63.392%; +64.374%]

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

  • 🟩 execution_time [-32.960ms; -28.500ms] or [-14.680%; -12.694%]

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

  • 🟥 execution_time [+10.219ms; +16.422ms] or [+5.226%; +8.397%]

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

  • 🟩 execution_time [-15.127ms; -10.990ms] or [-7.114%; -5.169%]

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

  • 🟥 execution_time [+106.840ms; +107.634ms] or [+114.923%; +115.776%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟩 execution_time [-27.441ms; -21.195ms] or [-11.577%; -8.942%]
  • 🟩 throughput [+101.134op/s; +130.208op/s] or [+9.984%; +12.854%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 throughput [-18666.570op/s; -16881.858op/s] or [-5.787%; -5.234%]

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

  • 🟥 throughput [-38386.325op/s; -25330.624op/s] or [-7.872%; -5.195%]

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

  • 🟥 execution_time [+82.704ms; +84.410ms] or [+92.418%; +94.325%]

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

  • 🟩 execution_time [-19.589ms; -15.592ms] or [-9.126%; -7.263%]

@dd-trace-dotnet-ci-bot

dd-trace-dotnet-ci-bot Bot commented Mar 16, 2026

Copy link
Copy Markdown

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8309) 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
duration75.45 ± (75.38 - 75.67) ms75.88 ± (75.87 - 76.15) ms+0.6%✅⬆️
.NET Framework 4.8 - Bailout
duration79.31 ± (79.20 - 79.63) ms80.57 ± (80.43 - 80.85) ms+1.6%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1101.85 ± (1099.74 - 1106.16) ms1095.39 ± (1096.21 - 1101.74) ms-0.6%
.NET Core 3.1 - Baseline
process.internal_duration_ms23.13 ± (23.08 - 23.19) ms23.47 ± (23.42 - 23.52) ms+1.4%✅⬆️
process.time_to_main_ms87.77 ± (87.59 - 87.95) ms89.37 ± (89.17 - 89.57) ms+1.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.89 ± (10.88 - 10.89) MB10.89 ± (10.89 - 10.90) MB+0.0%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms23.07 ± (23.01 - 23.13) ms23.33 ± (23.27 - 23.39) ms+1.1%✅⬆️
process.time_to_main_ms89.26 ± (89.06 - 89.47) ms90.69 ± (90.44 - 90.93) ms+1.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.92 ± (10.92 - 10.93) MB10.92 ± (10.92 - 10.92) MB-0.0%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms226.08 ± (224.49 - 227.67) ms226.13 ± (224.48 - 227.78) ms+0.0%✅⬆️
process.time_to_main_ms501.37 ± (500.28 - 502.46) ms505.50 ± (504.63 - 506.38) ms+0.8%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.21 ± (47.18 - 47.24) MB47.27 ± (47.24 - 47.30) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.67 ± (21.63 - 21.72) ms21.83 ± (21.80 - 21.87) ms+0.7%✅⬆️
process.time_to_main_ms75.36 ± (75.19 - 75.53) ms76.49 ± (76.33 - 76.64) ms+1.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.59 ± (10.58 - 10.59) MB10.62 ± (10.62 - 10.63) MB+0.4%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.74 ± (21.70 - 21.78) ms21.98 ± (21.93 - 22.03) ms+1.1%✅⬆️
process.time_to_main_ms77.20 ± (77.02 - 77.38) ms78.83 ± (78.63 - 79.04) ms+2.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.69 ± (10.69 - 10.70) MB10.73 ± (10.72 - 10.73) MB+0.3%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms210.30 ± (208.51 - 212.09) ms211.79 ± (210.18 - 213.40) ms+0.7%✅⬆️
process.time_to_main_ms498.70 ± (497.81 - 499.58) ms505.50 ± (504.82 - 506.18) ms+1.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.14 ± (49.11 - 49.18) MB49.29 ± (49.26 - 49.32) MB+0.3%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.0%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms20.00 ± (19.96 - 20.03) ms20.30 ± (20.26 - 20.34) ms+1.5%✅⬆️
process.time_to_main_ms75.20 ± (75.03 - 75.37) ms76.85 ± (76.68 - 77.02) ms+2.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.69 ± (7.68 - 7.69) MB7.69 ± (7.68 - 7.69) MB-0.0%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms20.05 ± (20.01 - 20.09) ms20.47 ± (20.42 - 20.53) ms+2.1%✅⬆️
process.time_to_main_ms76.47 ± (76.36 - 76.58) ms78.75 ± (78.56 - 78.95) ms+3.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.75 ± (7.74 - 7.76) MB7.71 ± (7.71 - 7.72) MB-0.4%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms169.01 ± (167.98 - 170.03) ms167.63 ± (166.77 - 168.49) ms-0.8%
process.time_to_main_ms482.91 ± (482.14 - 483.68) ms486.34 ± (485.55 - 487.13) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.53 ± (36.51 - 36.55) MB36.55 ± (36.53 - 36.57) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration194.09 ± (193.83 - 194.65) ms195.99 ± (196.22 - 197.34) ms+1.0%✅⬆️
.NET Framework 4.8 - Bailout
duration198.72 ± (198.48 - 199.21) ms198.91 ± (198.92 - 199.92) ms+0.1%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1151.83 ± (1153.69 - 1161.28) ms1161.06 ± (1163.72 - 1173.05) ms+0.8%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms189.33 ± (188.93 - 189.74) ms190.83 ± (190.41 - 191.26) ms+0.8%✅⬆️
process.time_to_main_ms81.54 ± (81.28 - 81.80) ms81.97 ± (81.76 - 82.17) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.11 ± (16.08 - 16.14) MB16.12 ± (16.09 - 16.14) MB+0.0%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.0%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms188.78 ± (188.33 - 189.22) ms191.24 ± (190.74 - 191.75) ms+1.3%✅⬆️
process.time_to_main_ms82.75 ± (82.60 - 82.91) ms83.47 ± (83.28 - 83.67) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.21 ± (16.18 - 16.25) MB16.22 ± (16.19 - 16.24) MB+0.0%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.2%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms395.26 ± (393.49 - 397.03) ms398.80 ± (397.00 - 400.61) ms+0.9%✅⬆️
process.time_to_main_ms476.35 ± (475.68 - 477.03) ms480.61 ± (479.67 - 481.56) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.83 ± (57.67 - 57.99) MB58.16 ± (58.04 - 58.28) MB+0.6%✅⬆️
runtime.dotnet.threads.count30 ± (29 - 30)30 ± (30 - 30)+0.2%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms192.85 ± (192.48 - 193.21) ms195.07 ± (194.55 - 195.59) ms+1.2%✅⬆️
process.time_to_main_ms70.48 ± (70.28 - 70.67) ms71.26 ± (71.07 - 71.45) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.37 ± (16.32 - 16.42) MB16.37 ± (16.34 - 16.39) MB+0.0%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+1.1%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms192.90 ± (192.55 - 193.26) ms194.22 ± (193.77 - 194.67) ms+0.7%✅⬆️
process.time_to_main_ms71.34 ± (71.22 - 71.46) ms72.10 ± (71.94 - 72.26) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.22 ± (16.09 - 16.35) MB16.42 ± (16.38 - 16.45) MB+1.2%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)20 ± (20 - 20)+3.6%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms431.44 ± (429.91 - 432.98) ms431.97 ± (430.31 - 433.63) ms+0.1%✅⬆️
process.time_to_main_ms480.93 ± (479.94 - 481.93) ms480.50 ± (479.53 - 481.47) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed60.30 ± (60.24 - 60.36) MB60.36 ± (60.29 - 60.43) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 31)30 ± (30 - 31)+0.0%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms191.44 ± (191.05 - 191.83) ms192.18 ± (191.77 - 192.59) ms+0.4%✅⬆️
process.time_to_main_ms70.38 ± (70.17 - 70.59) ms70.78 ± (70.58 - 70.98) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.77 ± (11.74 - 11.79) MB11.77 ± (11.74 - 11.79) MB+0.0%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.0%
.NET 8 - Bailout
process.internal_duration_ms192.22 ± (191.75 - 192.68) ms190.69 ± (190.37 - 191.00) ms-0.8%
process.time_to_main_ms71.48 ± (71.33 - 71.64) ms71.60 ± (71.48 - 71.71) ms+0.2%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.75 - 11.81) MB11.79 ± (11.76 - 11.81) MB+0.0%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.8%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms359.84 ± (358.19 - 361.49) ms358.78 ± (357.59 - 359.98) ms-0.3%
process.time_to_main_ms460.13 ± (458.99 - 461.26) ms458.45 ± (457.60 - 459.30) ms-0.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed48.44 ± (48.41 - 48.48) MB48.55 ± (48.52 - 48.59) MB+0.2%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.0%✅⬆️
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 (8309) - mean (76ms)  : 74, 78
    master - mean (76ms)  : 73, 78

    section Bailout
    This PR (8309) - mean (81ms)  : 78, 83
    master - mean (79ms)  : 77, 82

    section CallTarget+Inlining+NGEN
    This PR (8309) - mean (1,099ms)  : 1059, 1139
    master - mean (1,103ms)  : 1057, 1149

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 (8309) - mean (120ms)  : 116, 125
    master - mean (118ms)  : 115, 122

    section Bailout
    This PR (8309) - mean (121ms)  : 119, 124
    master - mean (120ms)  : 116, 123

    section CallTarget+Inlining+NGEN
    This PR (8309) - mean (767ms)  : 738, 797
    master - mean (763ms)  : 741, 785

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8309) - mean (105ms)  : 102, 108
    master - mean (104ms)  : 100, 107

    section Bailout
    This PR (8309) - mean (107ms)  : 104, 111
    master - mean (105ms)  : 102, 109

    section CallTarget+Inlining+NGEN
    This PR (8309) - mean (756ms)  : 716, 795
    master - mean (748ms)  : 709, 786

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8309) - mean (105ms)  : 101, 109
    master - mean (103ms)  : 100, 106

    section Bailout
    This PR (8309) - mean (107ms)  : 105, 110
    master - mean (104ms)  : 103, 106

    section CallTarget+Inlining+NGEN
    This PR (8309) - mean (693ms)  : 660, 726
    master - mean (693ms)  : 662, 723

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 (8309) - mean (197ms)  : 190, 204
    master - mean (194ms)  : 190, 199

    section Bailout
    This PR (8309) - mean (199ms)  : 194, 204
    master - mean (199ms)  : 195, 202

    section CallTarget+Inlining+NGEN
    This PR (8309) - mean (1,168ms)  : 1098, 1238
    master - mean (1,157ms)  : 1102, 1213

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 (8309) - mean (282ms)  : 273, 290
    master - mean (280ms)  : 273, 287

    section Bailout
    This PR (8309) - mean (283ms)  : 277, 290
    master - mean (280ms)  : 274, 286

    section CallTarget+Inlining+NGEN
    This PR (8309) - mean (913ms)  : 879, 948
    master - mean (907ms)  : 881, 933

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8309) - mean (275ms)  : 267, 283
    master - mean (272ms)  : 266, 277

    section Bailout
    This PR (8309) - mean (275ms)  : 267, 282
    master - mean (272ms)  : 268, 277

    section CallTarget+Inlining+NGEN
    This PR (8309) - mean (944ms)  : 904, 984
    master - mean (948ms)  : 908, 987

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8309) - mean (273ms)  : 266, 280
    master - mean (271ms)  : 266, 277

    section Bailout
    This PR (8309) - mean (272ms)  : 268, 276
    master - mean (273ms)  : 267, 280

    section CallTarget+Inlining+NGEN
    This PR (8309) - mean (849ms)  : 813, 885
    master - mean (853ms)  : 811, 896

Loading

@NachoEchevarria
NachoEchevarria marked this pull request as ready for review March 16, 2026 12:30
@NachoEchevarria
NachoEchevarria requested review from a team as code owners March 16, 2026 12:30
@NachoEchevarria
NachoEchevarria merged commit 4972eba into master Mar 16, 2026
140 checks passed
@NachoEchevarria
NachoEchevarria deleted the nacho/AddProxySourceName branch March 16, 2026 15:02
@github-actions github-actions Bot added this to the vNext-v3 milestone Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants