Skip to content

Conversation

@vandonr
Copy link
Contributor

@vandonr vandonr commented Nov 6, 2025

Summary of changes

adding process tags at the ClientStatsPayload level.
See proto in the agent

Reason for change

AIDM-195

Implementation details

Test coverage

piggybacked on existing tests

Other details

I realized that dotnet doesn't write the service name at the top level, but only in the buckets. Doesn't seem to be a big issue, but there could be a win here by writing the service in the buckets only when there is an override.

@vandonr vandonr requested review from a team as code owners November 6, 2025 16:48
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

var api = new Api(new FakeApiRequestFactory(settings.Exporter.AgentUri), statsd: null, updateSampleRates: null, partialFlushEnabled: false);

P1 Badge Update benchmark call to new Api constructor

The Api constructor now requires a propagateProcessTags boolean, and all production call sites were updated accordingly. The benchmark still calls the old four-argument overload (new Api(..., partialFlushEnabled: false)), so the Benchmarks.Trace project no longer compiles. Building or running benchmarks will fail with a missing parameter error until this call passes the new argument (and any trailing optional parameters).

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

@dd-trace-dotnet-ci-bot
Copy link

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (7791) 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.64 ± (75.38 - 75.99) ms73.72 ± (73.90 - 74.51) ms-2.5%
.NET Framework 4.8 - Bailout
duration78.77 ± (78.77 - 79.36) ms80.00 ± (79.75 - 80.81) ms+1.6%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1114.22 ± (1117.39 - 1128.56) ms1094.21 ± (1102.27 - 1113.58) ms-1.8%
.NET Core 3.1 - Baseline
process.internal_duration_ms22.95 ± (22.88 - 23.03) ms22.97 ± (22.90 - 23.05) ms+0.1%✅⬆️
process.time_to_main_ms86.94 ± (86.52 - 87.37) ms86.50 ± (86.05 - 86.94) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.92 ± (10.92 - 10.93) MB10.86 ± (10.86 - 10.87) MB-0.5%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.94 ± (22.87 - 23.01) ms22.93 ± (22.86 - 23.00) ms-0.1%
process.time_to_main_ms88.80 ± (88.36 - 89.25) ms89.17 ± (88.71 - 89.64) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.95 ± (10.94 - 10.95) MB10.88 ± (10.87 - 10.89) MB-0.6%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms221.20 ± (219.64 - 222.75) ms221.62 ± (220.15 - 223.08) ms+0.2%✅⬆️
process.time_to_main_ms551.39 ± (549.98 - 552.81) ms546.68 ± (545.19 - 548.16) ms-0.9%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed52.64 ± (52.61 - 52.66) MB52.41 ± (52.39 - 52.43) MB-0.4%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.73 ± (21.66 - 21.79) ms21.52 ± (21.46 - 21.58) ms-1.0%
process.time_to_main_ms75.68 ± (75.36 - 75.99) ms74.25 ± (73.89 - 74.60) ms-1.9%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.60 ± (10.60 - 10.61) MB10.57 ± (10.57 - 10.57) MB-0.3%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.75 ± (21.67 - 21.83) ms21.56 ± (21.49 - 21.64) ms-0.9%
process.time_to_main_ms77.29 ± (76.91 - 77.66) ms75.21 ± (74.84 - 75.57) ms-2.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.66 ± (10.66 - 10.66) MB10.61 ± (10.61 - 10.62) MB-0.4%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms206.65 ± (205.37 - 207.92) ms206.81 ± (205.59 - 208.02) ms+0.1%✅⬆️
process.time_to_main_ms514.40 ± (513.32 - 515.49) ms505.83 ± (504.63 - 507.04) ms-1.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed51.87 ± (51.84 - 51.89) MB51.59 ± (51.56 - 51.63) MB-0.5%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 8 - Baseline
process.internal_duration_ms20.13 ± (20.04 - 20.22) ms19.54 ± (19.48 - 19.60) ms-2.9%
process.time_to_main_ms77.56 ± (77.04 - 78.09) ms73.53 ± (73.23 - 73.83) ms-5.2%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.64 ± (7.64 - 7.65) MB7.63 ± (7.62 - 7.64) MB-0.2%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.79 ± (19.73 - 19.86) ms19.51 ± (19.45 - 19.57) ms-1.4%
process.time_to_main_ms75.93 ± (75.62 - 76.25) ms74.69 ± (74.37 - 75.00) ms-1.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.71 ± (7.70 - 7.72) MB7.67 ± (7.67 - 7.68) MB-0.4%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms189.72 ± (188.80 - 190.63) ms187.78 ± (186.92 - 188.64) ms-1.0%
process.time_to_main_ms492.66 ± (491.56 - 493.77) ms480.03 ± (478.91 - 481.16) ms-2.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed39.01 ± (38.97 - 39.04) MB38.77 ± (38.73 - 38.80) MB-0.6%
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.0%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration192.06 ± (192.08 - 192.76) ms195.23 ± (194.83 - 195.71) ms+1.6%✅⬆️
.NET Framework 4.8 - Bailout
duration196.17 ± (196.13 - 196.85) ms199.19 ± (199.04 - 199.99) ms+1.5%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1150.43 ± (1152.67 - 1159.10) ms1165.90 ± (1177.16 - 1188.61) ms+1.3%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms187.57 ± (187.13 - 188.02) ms188.34 ± (187.88 - 188.79) ms+0.4%✅⬆️
process.time_to_main_ms80.42 ± (80.19 - 80.65) ms80.78 ± (80.55 - 81.02) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.09 ± (16.06 - 16.11) MB16.00 ± (15.98 - 16.03) MB-0.5%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (19 - 20)-0.9%
.NET Core 3.1 - Bailout
process.internal_duration_ms186.34 ± (186.09 - 186.60) ms189.84 ± (189.33 - 190.35) ms+1.9%✅⬆️
process.time_to_main_ms81.40 ± (81.27 - 81.53) ms82.87 ± (82.68 - 83.07) ms+1.8%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.11 ± (16.06 - 16.17) MB16.04 ± (16.02 - 16.06) MB-0.5%
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (21 - 21)-0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms391.82 ± (389.14 - 394.51) ms397.29 ± (394.58 - 400.01) ms+1.4%✅⬆️
process.time_to_main_ms515.23 ± (514.60 - 515.86) ms517.74 ± (517.02 - 518.46) ms+0.5%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed62.87 ± (62.71 - 63.03) MB62.79 ± (62.64 - 62.95) MB-0.1%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)-0.0%
.NET 6 - Baseline
process.internal_duration_ms190.34 ± (189.97 - 190.72) ms192.41 ± (191.97 - 192.84) ms+1.1%✅⬆️
process.time_to_main_ms69.28 ± (69.08 - 69.47) ms70.04 ± (69.84 - 70.25) ms+1.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed15.94 ± (15.78 - 16.09) MB16.11 ± (16.00 - 16.23) MB+1.1%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 19)+1.0%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms204.21 ± (203.77 - 204.64) ms190.52 ± (190.23 - 190.81) ms-6.7%
process.time_to_main_ms75.97 ± (75.71 - 76.23) ms70.46 ± (70.34 - 70.58) ms-7.2%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.25 ± (16.22 - 16.27) MB16.14 ± (16.00 - 16.29) MB-0.6%
runtime.dotnet.threads.count20 ± (20 - 20)19 ± (19 - 19)-5.5%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms419.32 ± (416.21 - 422.43) ms411.02 ± (408.27 - 413.78) ms-2.0%
process.time_to_main_ms496.23 ± (495.06 - 497.40) ms485.74 ± (484.72 - 486.75) ms-2.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed62.56 ± (62.43 - 62.69) MB62.38 ± (62.26 - 62.51) MB-0.3%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 30)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms192.36 ± (191.87 - 192.86) ms191.65 ± (191.22 - 192.09) ms-0.4%
process.time_to_main_ms69.82 ± (69.61 - 70.02) ms69.79 ± (69.58 - 69.99) ms-0.0%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.64 ± (11.62 - 11.65) MB11.68 ± (11.66 - 11.71) MB+0.4%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.4%
.NET 8 - Bailout
process.internal_duration_ms191.25 ± (190.76 - 191.75) ms190.02 ± (189.68 - 190.37) ms-0.6%
process.time_to_main_ms70.67 ± (70.52 - 70.83) ms70.63 ± (70.47 - 70.79) ms-0.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.75 - 11.81) MB11.78 ± (11.75 - 11.81) MB+0.0%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.2%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms364.26 ± (362.74 - 365.77) ms363.87 ± (362.55 - 365.19) ms-0.1%
process.time_to_main_ms470.00 ± (468.94 - 471.06) ms460.65 ± (459.90 - 461.40) ms-2.0%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.64 ± (50.60 - 50.67) MB50.30 ± (50.27 - 50.33) MB-0.7%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+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 (7791) - mean (74ms)  : 70, 79
    master - mean (76ms)  : 71, 80

    section Bailout
    This PR (7791) - mean (80ms)  : 72, 88
    master - mean (79ms)  : 75, 83

    section CallTarget+Inlining+NGEN
    This PR (7791) - mean (1,108ms)  : 1027, 1189
    master - mean (1,123ms)  : 1040, 1206

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 (7791) - mean (117ms)  : 108, 126
    master - mean (117ms)  : 110, 125

    section Bailout
    This PR (7791) - mean (119ms)  : 111, 128
    master - mean (119ms)  : 110, 129

    section CallTarget+Inlining+NGEN
    This PR (7791) - mean (803ms)  : 761, 844
    master - mean (815ms)  : 772, 857

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7791) - mean (102ms)  : 95, 110
    master - mean (105ms)  : 99, 110

    section Bailout
    This PR (7791) - mean (103ms)  : 97, 110
    master - mean (106ms)  : 99, 113

    section CallTarget+Inlining+NGEN
    This PR (7791) - mean (742ms)  : 708, 777
    master - mean (759ms)  : 720, 799

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

    section Bailout
    This PR (7791) - mean (102ms)  : 96, 109
    master - mean (104ms)  : 97, 111

    section CallTarget+Inlining+NGEN
    This PR (7791) - mean (698ms)  : 668, 729
    master - mean (724ms)  : 697, 751

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 (7791) - mean (195ms)  : 191, 200
    master - mean (192ms)  : 189, 196

    section Bailout
    This PR (7791) - mean (200ms)  : 195, 204
    master - mean (196ms)  : 193, 200

    section CallTarget+Inlining+NGEN
    This PR (7791) - mean (1,183ms)  : 1094, 1272
    master - mean (1,156ms)  : 1110, 1202

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 (7791) - mean (277ms)  : 270, 284
    master - mean (276ms)  : 271, 282

    section Bailout
    This PR (7791) - mean (281ms)  : 269, 293
    master - mean (276ms)  : 272, 280

    section CallTarget+Inlining+NGEN
    This PR (7791) - mean (947ms)  : 894, 1000
    master - mean (938ms)  : 893, 983

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7791) - mean (271ms)  : 262, 279
    master - mean (268ms)  : 262, 274

    section Bailout
    This PR (7791) - mean (269ms)  : 265, 273
    master - mean (289ms)  : 282, 296

    section CallTarget+Inlining+NGEN
    This PR (7791) - mean (930ms)  : 873, 987
    master - mean (948ms)  : 882, 1015

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7791) - mean (271ms)  : 265, 278
    master - mean (272ms)  : 261, 282

    section Bailout
    This PR (7791) - mean (270ms)  : 265, 276
    master - mean (272ms)  : 264, 280

    section CallTarget+Inlining+NGEN
    This PR (7791) - mean (856ms)  : 834, 879
    master - mean (865ms)  : 827, 904

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants