Skip to content

Conversation

@andrewlock
Copy link
Member

@andrewlock andrewlock commented Oct 30, 2025

Summary of changes

Updates a couple of places where we're calling Tracer.Instance where we don't need to

Reason for change

In one of my other PRs I accidentally broke something that should only have affected integration tests, but a bunch of unit tests broke. It highlighted where they were using Tracer.Instance and setting the global tracer for tests. In other places, it revealed that code that tests that looked independent of other tests really wasn't...

Calling Tracer.Instance potentially does a lot of work, as it initializes the tracer. It's also hard to follow if we're making static calls out in places we don't need to. So just pass through the settings we want instead.

Implementation details

Instead of calling Tracer.Instance.Settings, use the value of Tracer or TracerSettings that's already available wherever possible. It makes the tests cleaner too.

Test coverage

Same coverage, just a bit cleaner

Other details

Included as part of the config stack, just because I already refactored some of this code, and can't be bothered to faff with merge conflicts:

https://datadoghq.atlassian.net/browse/LANGPLAT-819

@andrewlock andrewlock requested review from a team as code owners October 30, 2025 17:42
@andrewlock andrewlock added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) area:tests unit tests, integration tests type:reliability area:data-streams-monitoring labels Oct 30, 2025
CommandType = typeof(TCommand);

if (TryGetIntegrationDetails(CommandType.FullName, out var integrationId, out var dbTypeName))
if (TryGetIntegrationDetails(Tracer.Instance.Settings.DisabledAdoNetCommandTypes, CommandType.FullName, out var integrationId, out var dbTypeName))
Copy link
Member Author

Choose a reason for hiding this comment

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

This one is actually kind of annoying. As it's in a static cctor, we can't pass it in anywhere, which means there's one DbScopeFactoryTests test which will use this and end up initializing the global tracer. Oh well.

Copy link
Collaborator

@bouwkast bouwkast Oct 30, 2025

Choose a reason for hiding this comment

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

:sorry: pretty sure this was me

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm. I understand that we want to minimize work but I feel like we should calculate all DbCommands regardless of config (i.e. no dependency here) and then we do the config check on the hot path, which allows this setting to be hot-reloadable or "config at runtime" ready

Copy link
Contributor

@zacharycmontoya zacharycmontoya Oct 30, 2025

Choose a reason for hiding this comment

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

Concretely, I'm suggesting that we remove the TryGetIntegrationDetails call in the static constructor of Cache<TCommand> and refactor the other call in CreateDbCommandScope a bit. Perhaps in a separate PR

Copy link
Member Author

Choose a reason for hiding this comment

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

I can see arguments both ways tbh.

The only downside to @zacharycmontoya's proposal would be more work to do for custom DbCommands (ones that we don't explicitly know about), which are also marked as disabled initially, and which customers have marked as disabled. The question I would have is whether that's ok - e.g. if they're disabled because we're erroring out literally running TryGetIntegrationDetails, and that's why they disabled it, then that could be a problem. If it's just an optimization, then yes, it probably is fine.

That said, this actually is technically already hot-reloadable. The DisabledAdoNetCommandTypes setting passed in here is used to decide whether to populate the cache for custom types, but if we don't populate the cache, then we run TryGetIntegrationDetails() and check DisabledAdoNetCommandTypes at runtime anyway. So if this changes, then the result changes, it will just never be cached in that scenario.

So on that basis, I think removing the TryGetIntegrationDetails has a small amount of risk (if customer disabled adonet due to errors - not sure if that's really possible, but I can believe it), means a small bit more work (calculating values which will never be used), and doesn't change how hot-reloadable we are in general (though if we made it hot reloadable, we'd have to rethink how caching works). The plus side is it removes the static access to Tracer.Instance which is better for tests.

So yeah, I'm torn 🤷‍♂️ I'd say separate PR either way, given the questions, as the current behaviour in this PR is identical to the existing. But it's worth thinking about

@datadog-datadog-prod-us1

This comment has been minimized.

CommandType = typeof(TCommand);

if (TryGetIntegrationDetails(CommandType.FullName, out var integrationId, out var dbTypeName))
if (TryGetIntegrationDetails(Tracer.Instance.Settings.DisabledAdoNetCommandTypes, CommandType.FullName, out var integrationId, out var dbTypeName))
Copy link
Collaborator

@bouwkast bouwkast Oct 30, 2025

Choose a reason for hiding this comment

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

:sorry: pretty sure this was me

[Fact]
public void CanRoundTripPathwayContext()
[Theory]
[CombinatorialData]
Copy link
Collaborator

Choose a reason for hiding this comment

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

😃

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

dd-trace-dotnet-ci-bot bot commented Oct 30, 2025

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (7744) 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) ms74.35 ± (74.51 - 75.44) ms-1.7%
.NET Framework 4.8 - Bailout
duration78.77 ± (78.77 - 79.36) ms78.88 ± (78.61 - 79.51) ms+0.1%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1114.22 ± (1117.39 - 1128.56) ms1106.24 ± (1106.76 - 1115.21) ms-0.7%
.NET Core 3.1 - Baseline
process.internal_duration_ms22.95 ± (22.88 - 23.03) ms23.06 ± (22.97 - 23.14) ms+0.4%✅⬆️
process.time_to_main_ms86.94 ± (86.52 - 87.37) ms87.95 ± (87.44 - 88.45) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.92 ± (10.92 - 10.93) MB10.88 ± (10.88 - 10.89) MB-0.4%
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.81 ± (22.75 - 22.88) ms-0.5%
process.time_to_main_ms88.80 ± (88.36 - 89.25) ms87.87 ± (87.50 - 88.24) ms-1.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.95 ± (10.94 - 10.95) MB10.91 ± (10.91 - 10.92) MB-0.3%
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) ms222.57 ± (221.12 - 224.01) ms+0.6%✅⬆️
process.time_to_main_ms551.39 ± (549.98 - 552.81) ms549.77 ± (548.57 - 550.97) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed52.64 ± (52.61 - 52.66) MB52.54 ± (52.52 - 52.56) MB-0.2%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.5%
.NET 6 - Baseline
process.internal_duration_ms21.73 ± (21.66 - 21.79) ms21.74 ± (21.67 - 21.81) ms+0.1%✅⬆️
process.time_to_main_ms75.68 ± (75.36 - 75.99) ms75.44 ± (75.09 - 75.79) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.60 ± (10.60 - 10.61) MB10.60 ± (10.60 - 10.60) MB-0.0%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.75 ± (21.67 - 21.83) ms21.63 ± (21.57 - 21.70) ms-0.5%
process.time_to_main_ms77.29 ± (76.91 - 77.66) ms76.65 ± (76.30 - 77.00) ms-0.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.66 ± (10.66 - 10.66) MB10.64 ± (10.64 - 10.64) MB-0.2%
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) ms205.04 ± (203.96 - 206.12) ms-0.8%
process.time_to_main_ms514.40 ± (513.32 - 515.49) ms504.52 ± (503.61 - 505.43) ms-1.9%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed51.87 ± (51.84 - 51.89) MB51.65 ± (51.60 - 51.71) MB-0.4%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.1%
.NET 8 - Baseline
process.internal_duration_ms20.13 ± (20.04 - 20.22) ms19.61 ± (19.54 - 19.67) ms-2.6%
process.time_to_main_ms77.56 ± (77.04 - 78.09) ms73.26 ± (72.88 - 73.63) ms-5.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.64 ± (7.64 - 7.65) MB7.62 ± (7.61 - 7.62) MB-0.3%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.79 ± (19.73 - 19.86) ms19.73 ± (19.66 - 19.80) ms-0.3%
process.time_to_main_ms75.93 ± (75.62 - 76.25) ms75.92 ± (75.47 - 76.37) ms-0.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.71 ± (7.70 - 7.72) MB7.68 ± (7.67 - 7.69) 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) ms190.15 ± (188.99 - 191.31) ms+0.2%✅⬆️
process.time_to_main_ms492.66 ± (491.56 - 493.77) ms479.04 ± (478.01 - 480.07) ms-2.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed39.01 ± (38.97 - 39.04) MB38.75 ± (38.71 - 38.79) MB-0.7%
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) ms192.74 ± (192.68 - 193.48) ms+0.4%✅⬆️
.NET Framework 4.8 - Bailout
duration196.17 ± (196.13 - 196.85) ms196.17 ± (196.23 - 197.21) ms+0.0%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1150.43 ± (1152.67 - 1159.10) ms1173.11 ± (1173.23 - 1180.51) ms+2.0%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms187.57 ± (187.13 - 188.02) ms190.66 ± (190.24 - 191.08) ms+1.6%✅⬆️
process.time_to_main_ms80.42 ± (80.19 - 80.65) ms81.81 ± (81.57 - 82.06) ms+1.7%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.09 ± (16.06 - 16.11) MB16.05 ± (16.03 - 16.06) MB-0.3%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (19 - 20)-1.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms186.34 ± (186.09 - 186.60) ms191.32 ± (190.66 - 191.98) ms+2.7%✅⬆️
process.time_to_main_ms81.40 ± (81.27 - 81.53) ms83.75 ± (83.45 - 84.05) ms+2.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.11 ± (16.06 - 16.17) MB16.09 ± (16.07 - 16.11) MB-0.1%
runtime.dotnet.threads.count21 ± (20 - 21)21 ± (21 - 21)-0.2%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms391.82 ± (389.14 - 394.51) ms393.55 ± (391.38 - 395.72) ms+0.4%✅⬆️
process.time_to_main_ms515.23 ± (514.60 - 515.86) ms520.64 ± (519.71 - 521.57) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed62.87 ± (62.71 - 63.03) MB62.95 ± (62.81 - 63.10) MB+0.1%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 30)+0.1%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms190.34 ± (189.97 - 190.72) ms191.52 ± (191.10 - 191.93) ms+0.6%✅⬆️
process.time_to_main_ms69.28 ± (69.08 - 69.47) ms69.37 ± (69.24 - 69.51) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed15.94 ± (15.78 - 16.09) MB16.03 ± (15.88 - 16.18) MB+0.6%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.5%
.NET 6 - Bailout
process.internal_duration_ms204.21 ± (203.77 - 204.64) ms195.83 ± (195.27 - 196.40) ms-4.1%
process.time_to_main_ms75.97 ± (75.71 - 76.23) ms72.12 ± (71.88 - 72.35) ms-5.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.25 ± (16.22 - 16.27) MB16.36 ± (16.34 - 16.39) MB+0.7%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.2%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms419.32 ± (416.21 - 422.43) ms404.52 ± (402.42 - 406.63) ms-3.5%
process.time_to_main_ms496.23 ± (495.06 - 497.40) ms483.76 ± (482.89 - 484.63) ms-2.5%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed62.56 ± (62.43 - 62.69) MB62.29 ± (62.14 - 62.43) MB-0.4%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 30)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms192.36 ± (191.87 - 192.86) ms193.49 ± (192.95 - 194.03) ms+0.6%✅⬆️
process.time_to_main_ms69.82 ± (69.61 - 70.02) ms70.23 ± (70.01 - 70.45) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.64 ± (11.62 - 11.65) MB11.64 ± (11.63 - 11.66) MB+0.1%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.4%
.NET 8 - Bailout
process.internal_duration_ms191.25 ± (190.76 - 191.75) ms189.65 ± (189.26 - 190.04) ms-0.8%
process.time_to_main_ms70.67 ± (70.52 - 70.83) ms70.40 ± (70.26 - 70.54) ms-0.4%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.75 - 11.81) MB11.74 ± (11.71 - 11.77) MB-0.3%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.1%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms364.26 ± (362.74 - 365.77) ms363.43 ± (362.03 - 364.84) ms-0.2%
process.time_to_main_ms470.00 ± (468.94 - 471.06) ms461.38 ± (460.67 - 462.09) ms-1.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.64 ± (50.60 - 50.67) MB50.33 ± (50.30 - 50.36) MB-0.6%
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 (7744) - mean (75ms)  : 68, 82
    master - mean (76ms)  : 71, 80

    section Bailout
    This PR (7744) - mean (79ms)  : 72, 86
    master - mean (79ms)  : 75, 83

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (1,111ms)  : 1049, 1173
    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 (7744) - mean (119ms)  : 109, 128
    master - mean (117ms)  : 110, 125

    section Bailout
    This PR (7744) - mean (118ms)  : 112, 124
    master - mean (119ms)  : 110, 129

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (809ms)  : 775, 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 (7744) - mean (104ms)  : 97, 111
    master - mean (105ms)  : 99, 110

    section Bailout
    This PR (7744) - mean (105ms)  : 99, 111
    master - mean (106ms)  : 99, 113

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (741ms)  : 715, 767
    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 (7744) - mean (101ms)  : 93, 109
    master - mean (107ms)  : 97, 116

    section Bailout
    This PR (7744) - mean (104ms)  : 95, 113
    master - mean (104ms)  : 97, 111

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (700ms)  : 666, 734
    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 (7744) - mean (193ms)  : 189, 197
    master - mean (192ms)  : 189, 196

    section Bailout
    This PR (7744) - mean (197ms)  : 192, 202
    master - mean (196ms)  : 193, 200

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (1,177ms)  : 1124, 1230
    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 (7744) - mean (281ms)  : 271, 291
    master - mean (276ms)  : 271, 282

    section Bailout
    This PR (7744) - mean (284ms)  : 267, 301
    master - mean (276ms)  : 272, 280

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (950ms)  : 907, 994
    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 (7744) - mean (269ms)  : 264, 274
    master - mean (268ms)  : 262, 274

    section Bailout
    This PR (7744) - mean (276ms)  : 263, 289
    master - mean (289ms)  : 282, 296

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (919ms)  : 874, 965
    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 (7744) - mean (274ms)  : 262, 285
    master - mean (272ms)  : 261, 282

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

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (857ms)  : 831, 882
    master - mean (865ms)  : 827, 904

Loading

@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from 8a3aee6 to 753da8d Compare October 31, 2025 18:04
@andrewlock andrewlock requested review from a team as code owners October 31, 2025 18:04
@andrewlock andrewlock requested review from anna-git and removed request for a team October 31, 2025 18:04
@andrewlock andrewlock force-pushed the andrew/settings/5-remove-mutablesettings branch from 1b1f494 to f94e51b Compare October 31, 2025 18:04
@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from 753da8d to 3a96423 Compare November 3, 2025 17:30
@andrewlock andrewlock force-pushed the andrew/settings/5-remove-mutablesettings branch from f94e51b to 75937f5 Compare November 3, 2025 17:30
@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from 3a96423 to f01f8c6 Compare November 4, 2025 09:26
@andrewlock andrewlock force-pushed the andrew/settings/5-remove-mutablesettings branch from 75937f5 to 8111379 Compare November 4, 2025 09:26
@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from f01f8c6 to 4fd8303 Compare November 4, 2025 10:30
@andrewlock andrewlock force-pushed the andrew/settings/5-remove-mutablesettings branch from 8111379 to 177c2a0 Compare November 4, 2025 10:30
@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from 4fd8303 to 3ef006d Compare November 4, 2025 15:36
@andrewlock andrewlock force-pushed the andrew/settings/5-remove-mutablesettings branch from 177c2a0 to 83efef1 Compare November 4, 2025 15:36
@pr-commenter
Copy link

pr-commenter bot commented Nov 4, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7744 compared to master:

  • 2 benchmarks are slower, with geometric mean 1.507
  • 8 benchmarks have fewer allocations
  • 6 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7744

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 6.01 KB 6.09 KB 82 B 1.36%
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net6.0 5.49 KB 5.53 KB 38 B 0.69%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.7μs 59.6ns 363ns 0 0 0 5.49 KB
master StartStopWithChild netcoreapp3.1 13.6μs 71.6ns 365ns 0 0 0 5.73 KB
master StartStopWithChild net472 21.8μs 117ns 664ns 0.865 0.324 0 6.01 KB
#7744 StartStopWithChild net6.0 11.2μs 59.7ns 316ns 0 0 0 5.53 KB
#7744 StartStopWithChild netcoreapp3.1 13.9μs 73.9ns 370ns 0 0 0 5.73 KB
#7744 StartStopWithChild net472 22μs 91.6ns 420ns 0.972 0.324 0.108 6.09 KB
Benchmarks.Trace.AgentWriterBenchmark - Unknown 🤷 Fewer allocations 🎉

Fewer allocations 🎉 in #7744

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 2.71 KB 0 b -2.71 KB -100.00%
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 2.7 KB 0 b -2.7 KB -100.00%
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 3.31 KB 0 b -3.31 KB -100.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 928μs 169ns 656ns 0 0 0 2.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 137ns 496ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.21ms 784ns 3.04μs 0 0 0 3.31 KB
#7744 WriteAndFlushEnrichedTraces net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7744 WriteAndFlushEnrichedTraces netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7744 WriteAndFlushEnrichedTraces net472 N/A N/A N/A NaN NaN NaN 0 b
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 1.03μs 6.1ns 59.7ns 0 0 0 1.22 KB
master AllCycleSimpleBody netcoreapp3.1 1.39μs 7.51ns 42.5ns 0 0 0 1.2 KB
master AllCycleSimpleBody net472 1.03μs 0.42ns 1.52ns 0.193 0 0 1.23 KB
master AllCycleMoreComplexBody net6.0 7.15μs 39.1ns 225ns 0 0 0 4.72 KB
master AllCycleMoreComplexBody netcoreapp3.1 9.16μs 5.11ns 19.8ns 0 0 0 4.62 KB
master AllCycleMoreComplexBody net472 7.56μs 3ns 11.6ns 0.722 0 0 4.74 KB
master ObjectExtractorSimpleBody net6.0 315ns 1.71ns 9.68ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 400ns 2.26ns 15.2ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 295ns 0.0839ns 0.325ns 0.0441 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.28μs 32.1ns 161ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.71μs 37.8ns 151ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.71μs 2.52ns 9.75ns 0.57 0 0 3.8 KB
#7744 AllCycleSimpleBody net6.0 1.08μs 5.66ns 27.2ns 0 0 0 1.22 KB
#7744 AllCycleSimpleBody netcoreapp3.1 1.43μs 7.52ns 38.3ns 0 0 0 1.2 KB
#7744 AllCycleSimpleBody net472 1.01μs 0.336ns 1.26ns 0.191 0 0 1.23 KB
#7744 AllCycleMoreComplexBody net6.0 7.34μs 4.7ns 17.6ns 0 0 0 4.72 KB
#7744 AllCycleMoreComplexBody netcoreapp3.1 9.04μs 46.1ns 201ns 0 0 0 4.62 KB
#7744 AllCycleMoreComplexBody net472 7.63μs 2.98ns 11.6ns 0.727 0 0 4.74 KB
#7744 ObjectExtractorSimpleBody net6.0 329ns 1.65ns 7.55ns 0 0 0 280 B
#7744 ObjectExtractorSimpleBody netcoreapp3.1 405ns 0.212ns 0.823ns 0 0 0 272 B
#7744 ObjectExtractorSimpleBody net472 308ns 0.0818ns 0.317ns 0.0433 0 0 281 B
#7744 ObjectExtractorMoreComplexBody net6.0 6.18μs 33.3ns 173ns 0 0 0 3.79 KB
#7744 ObjectExtractorMoreComplexBody netcoreapp3.1 7.79μs 28.6ns 111ns 0 0 0 3.69 KB
#7744 ObjectExtractorMoreComplexBody net472 6.67μs 3.05ns 11.8ns 0.602 0 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 79.6μs 369ns 1.48μs 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 96.2μs 238ns 923ns 0 0 0 32.4 KB
master EncodeArgs net472 111μs 73.7ns 285ns 5.02 0 0 32.5 KB
master EncodeLegacyArgs net6.0 142μs 13.4ns 50.2ns 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 200μs 209ns 754ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 262μs 31.3ns 113ns 0 0 0 2.16 KB
#7744 EncodeArgs net6.0 77.4μs 116ns 448ns 0 0 0 32.4 KB
#7744 EncodeArgs netcoreapp3.1 98.7μs 276ns 1.03μs 0 0 0 32.4 KB
#7744 EncodeArgs net472 111μs 26.7ns 103ns 5 0 0 32.51 KB
#7744 EncodeLegacyArgs net6.0 145μs 17.7ns 68.5ns 0 0 0 2.15 KB
#7744 EncodeLegacyArgs netcoreapp3.1 201μs 437ns 1.69μs 0 0 0 2.14 KB
#7744 EncodeLegacyArgs net472 266μs 53.8ns 208ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #7744

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 2.011 423,895.04 852,613.51

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 396μs 42.9ns 155ns 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 424μs 77ns 298ns 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 427μs 40.4ns 146ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 286μs 51ns 197ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 695μs 12.9μs 125μs 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 309μs 25.1ns 97.2ns 0 0 0 2.29 KB
#7744 RunWafRealisticBenchmark net6.0 392μs 54.7ns 212ns 0 0 0 4.55 KB
#7744 RunWafRealisticBenchmark netcoreapp3.1 811μs 12.8μs 127μs 0 0 0 4.48 KB
#7744 RunWafRealisticBenchmark net472 429μs 55.5ns 215ns 0 0 0 4.66 KB
#7744 RunWafRealisticBenchmarkWithAttack net6.0 290μs 77.3ns 299ns 0 0 0 2.24 KB
#7744 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 716μs 3.44μs 15μs 0 0 0 2.22 KB
#7744 RunWafRealisticBenchmarkWithAttack net472 312μs 24.2ns 93.6ns 0 0 0 2.29 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 61.5μs 59ns 221ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 73.8μs 400ns 2.26μs 0 0 0 17.42 KB
master SendRequest net472 0.00304ns 0.00132ns 0.00512ns 0 0 0 0 b
#7744 SendRequest net6.0 61.9μs 282ns 1.13μs 0 0 0 14.52 KB
#7744 SendRequest netcoreapp3.1 71.2μs 338ns 1.47μs 0 0 0 17.42 KB
#7744 SendRequest net472 0.00671ns 0.00232ns 0.00898ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #7744

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 5 B 4 B -1 B -20.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 7 B 4 B -3 B -42.86%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.88ms 2.96μs 11.1μs 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.12ms 6.37μs 23.8μs 0 0 0 640 KB
master OriginalCharSlice net472 2.7ms 294ns 1.1μs 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.35ms 160ns 619ns 0 0 0 7 B
master OptimizedCharSlice netcoreapp3.1 1.73ms 332ns 1.29μs 0 0 0 1 B
master OptimizedCharSlice net472 1.95ms 200ns 776ns 0 0 0 0 b
master OptimizedCharSliceWithPool net6.0 864μs 39.6ns 143ns 0 0 0 5 B
master OptimizedCharSliceWithPool netcoreapp3.1 835μs 58.2ns 225ns 0 0 0 0 b
master OptimizedCharSliceWithPool net472 1.15ms 107ns 401ns 0 0 0 0 b
#7744 OriginalCharSlice net6.0 1.93ms 6.65μs 24.9μs 0 0 0 640.01 KB
#7744 OriginalCharSlice netcoreapp3.1 2.3ms 11μs 42.7μs 0 0 0 640 KB
#7744 OriginalCharSlice net472 2.71ms 492ns 1.84μs 100 0 0 641.95 KB
#7744 OptimizedCharSlice net6.0 1.48ms 196ns 758ns 0 0 0 4 B
#7744 OptimizedCharSlice netcoreapp3.1 1.78ms 244ns 943ns 0 0 0 1 B
#7744 OptimizedCharSlice net472 1.99ms 208ns 805ns 0 0 0 0 b
#7744 OptimizedCharSliceWithPool net6.0 815μs 37.2ns 139ns 0 0 0 4 B
#7744 OptimizedCharSliceWithPool netcoreapp3.1 814μs 225ns 873ns 0 0 0 0 b
#7744 OptimizedCharSliceWithPool net472 1.13ms 128ns 497ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7744

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 1.129 635,625.96 717,370.19

More allocations ⚠️ in #7744

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 56.01 KB 56.46 KB 443 B 0.79%

Fewer allocations 🎉 in #7744

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 41.98 KB 41.77 KB -213 B -0.51%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 639μs 2.2μs 8.23μs 0 0 0 41.63 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 637μs 760ns 2.74μs 0 0 0 41.98 KB
master WriteAndFlushEnrichedTraces net472 904μs 4.54μs 20.3μs 4.46 0 0 56.01 KB
#7744 WriteAndFlushEnrichedTraces net6.0 698μs 3.08μs 13.4μs 0 0 0 41.76 KB
#7744 WriteAndFlushEnrichedTraces netcoreapp3.1 718μs 791ns 3.06μs 0 0 0 41.77 KB
#7744 WriteAndFlushEnrichedTraces net472 871μs 3.46μs 13.4μs 8.33 0 0 56.46 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.96μs 1.84ns 7.13ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.57μs 10.8ns 41.6ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.87μs 3.64ns 14.1ns 0.143 0.0143 0 987 B
#7744 ExecuteNonQuery net6.0 1.96μs 7.61ns 29.5ns 0 0 0 1.02 KB
#7744 ExecuteNonQuery netcoreapp3.1 2.58μs 9.4ns 36.4ns 0 0 0 1.02 KB
#7744 ExecuteNonQuery net472 2.84μs 3.8ns 14.7ns 0.156 0.0142 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.69μs 0.722ns 2.8ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.23μs 4.61ns 17.9ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.53μs 5.63ns 21.8ns 0.158 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.91μs 9.52ns 42.6ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.33μs 11ns 42.8ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.63μs 2.38ns 9.21ns 0.162 0 0 1.1 KB
#7744 CallElasticsearch net6.0 1.79μs 2.62ns 10.1ns 0 0 0 1.03 KB
#7744 CallElasticsearch netcoreapp3.1 2.24μs 10.5ns 42ns 0 0 0 1.03 KB
#7744 CallElasticsearch net472 3.67μs 3.84ns 14.9ns 0.165 0 0 1.04 KB
#7744 CallElasticsearchAsync net6.0 1.82μs 1.84ns 6.63ns 0 0 0 1.01 KB
#7744 CallElasticsearchAsync netcoreapp3.1 2.38μs 11.4ns 44.3ns 0 0 0 1.08 KB
#7744 CallElasticsearchAsync net472 3.9μs 2.57ns 9.95ns 0.156 0 0 1.1 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.83μs 2.73ns 10.6ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.51μs 12ns 46.4ns 0 0 0 952 B
master ExecuteAsync net472 2.67μs 5.01ns 19.4ns 0.135 0 0 915 B
#7744 ExecuteAsync net6.0 1.95μs 9.67ns 43.3ns 0 0 0 952 B
#7744 ExecuteAsync netcoreapp3.1 2.46μs 11.7ns 45.5ns 0 0 0 952 B
#7744 ExecuteAsync net472 2.61μs 1.27ns 4.74ns 0.144 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 6.93μs 25.7ns 96.1ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.52μs 20ns 77.4ns 0 0 0 2.9 KB
master SendAsync net472 12.3μs 11ns 42.5ns 0.491 0 0 3.18 KB
#7744 SendAsync net6.0 6.78μs 2.65ns 9.57ns 0 0 0 2.36 KB
#7744 SendAsync netcoreapp3.1 8.47μs 22.5ns 84ns 0 0 0 2.9 KB
#7744 SendAsync net472 12.2μs 9.46ns 36.7ns 0.487 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7744

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 250.18 KB 255.89 KB 5.71 KB 2.28%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 278.53 KB 282.18 KB 3.65 KB 1.31%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑netcoreapp3.1 42.64 KB 43.12 KB 480 B 1.13%

Fewer allocations 🎉 in #7744

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 44.06 KB 43.82 KB -248 B -0.56%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 266.99 KB 258.29 KB -8.7 KB -3.26%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 45μs 251ns 2.04μs 0 0 0 44.06 KB
master StringConcatBenchmark netcoreapp3.1 46.9μs 221ns 1.08μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 57.6μs 75.3ns 261ns 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 458μs 1.78μs 7.78μs 0 0 0 266.99 KB
master StringConcatAspectBenchmark netcoreapp3.1 512μs 552ns 1.99μs 0 0 0 250.18 KB
master StringConcatAspectBenchmark net472 408μs 2.32μs 16.7μs 0 0 0 278.53 KB
#7744 StringConcatBenchmark net6.0 49.3μs 263ns 1.8μs 0 0 0 43.82 KB
#7744 StringConcatBenchmark netcoreapp3.1 54.1μs 644ns 6.41μs 0 0 0 43.12 KB
#7744 StringConcatBenchmark net472 57.2μs 267ns 1.19μs 0 0 0 57.34 KB
#7744 StringConcatAspectBenchmark net6.0 452μs 2.09μs 7.81μs 0 0 0 258.29 KB
#7744 StringConcatAspectBenchmark netcoreapp3.1 492μs 2.03μs 7.59μs 0 0 0 255.89 KB
#7744 StringConcatAspectBenchmark net472 411μs 2.38μs 18.7μs 0 0 0 282.18 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.64μs 13.8ns 68.8ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.69μs 16.2ns 62.8ns 0 0 0 1.7 KB
master EnrichedLog net472 3.82μs 4.01ns 15.5ns 0.247 0 0 1.64 KB
#7744 EnrichedLog net6.0 2.87μs 15.1ns 79.8ns 0 0 0 1.71 KB
#7744 EnrichedLog netcoreapp3.1 3.65μs 8.84ns 33.1ns 0 0 0 1.7 KB
#7744 EnrichedLog net472 3.9μs 3ns 11.6ns 0.254 0 0 1.64 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 135μs 326ns 1.26μs 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 135μs 502ns 1.94μs 0 0 0 4.31 KB
master EnrichedLog net472 177μs 611ns 2.37μs 0 0 0 4.52 KB
#7744 EnrichedLog net6.0 123μs 103ns 387ns 0 0 0 4.31 KB
#7744 EnrichedLog netcoreapp3.1 127μs 109ns 393ns 0 0 0 4.31 KB
#7744 EnrichedLog net472 166μs 90.1ns 349ns 0 0 0 4.51 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 4.96μs 20.5ns 79.2ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.68μs 21.6ns 83.8ns 0 0 0 2.26 KB
master EnrichedLog net472 7.48μs 5.54ns 21.5ns 0.298 0 0 2.08 KB
#7744 EnrichedLog net6.0 5.01μs 19.1ns 71.6ns 0 0 0 2.26 KB
#7744 EnrichedLog netcoreapp3.1 6.8μs 14.8ns 57.5ns 0 0 0 2.26 KB
#7744 EnrichedLog net472 7.58μs 15.1ns 58.3ns 0.299 0 0 2.08 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 2.08μs 4ns 15.5ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.66μs 13.8ns 66.1ns 0 0 0 1.2 KB
master SendReceive net472 3.03μs 0.991ns 3.71ns 0.182 0 0 1.2 KB
#7744 SendReceive net6.0 2.01μs 10.5ns 50.3ns 0 0 0 1.2 KB
#7744 SendReceive netcoreapp3.1 2.57μs 12.7ns 56.7ns 0 0 0 1.2 KB
#7744 SendReceive net472 3.13μs 1.83ns 6.85ns 0.19 0 0 1.2 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 4.28μs 4.24ns 15.9ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.69μs 13.2ns 51ns 0 0 0 1.63 KB
master EnrichedLog net472 6.65μs 7.12ns 26.6ns 0.299 0 0 2.03 KB
#7744 EnrichedLog net6.0 4.39μs 1.96ns 7.58ns 0 0 0 1.58 KB
#7744 EnrichedLog netcoreapp3.1 5.6μs 7.04ns 26.3ns 0 0 0 1.63 KB
#7744 EnrichedLog net472 6.75μs 7.76ns 30.1ns 0.303 0 0 2.03 KB
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 775ns 0.272ns 1.06ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 957ns 4.88ns 23.4ns 0 0 0 576 B
master StartFinishSpan net472 945ns 0.211ns 0.762ns 0.0899 0 0 578 B
master StartFinishScope net6.0 925ns 3.18ns 12.3ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.21μs 6.14ns 27.5ns 0 0 0 696 B
master StartFinishScope net472 1.14μs 0.352ns 1.36ns 0.103 0 0 658 B
#7744 StartFinishSpan net6.0 785ns 0.338ns 1.31ns 0 0 0 576 B
#7744 StartFinishSpan netcoreapp3.1 967ns 5.1ns 26ns 0 0 0 576 B
#7744 StartFinishSpan net472 934ns 2.42ns 9.35ns 0.0891 0 0 578 B
#7744 StartFinishScope net6.0 929ns 4.6ns 19ns 0 0 0 696 B
#7744 StartFinishScope netcoreapp3.1 1.19μs 6.2ns 31ns 0 0 0 697 B
#7744 StartFinishScope net472 1.1μs 0.498ns 1.93ns 0.0994 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 1.05μs 5.6ns 27.4ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.47μs 5.94ns 23ns 0 0 0 696 B
master RunOnMethodBegin net472 1.47μs 1.29ns 5ns 0.102 0 0 658 B
#7744 RunOnMethodBegin net6.0 1.09μs 5.1ns 20.4ns 0 0 0 696 B
#7744 RunOnMethodBegin netcoreapp3.1 1.45μs 7.63ns 37.4ns 0 0 0 696 B
#7744 RunOnMethodBegin net472 1.45μs 1.78ns 6.67ns 0.101 0 0 658 B

@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from 3ef006d to e5c8a18 Compare November 5, 2025 08:10
@andrewlock andrewlock force-pushed the andrew/settings/5-remove-mutablesettings branch from 83efef1 to 40cc2d6 Compare November 5, 2025 08:10
@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from e5c8a18 to 75e54ce Compare November 5, 2025 11:55
@andrewlock andrewlock force-pushed the andrew/settings/5-remove-mutablesettings branch from 40cc2d6 to d08d676 Compare November 5, 2025 11:55
@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from 75e54ce to 6027e13 Compare November 5, 2025 13:40
@andrewlock andrewlock force-pushed the andrew/settings/5-remove-mutablesettings branch from d08d676 to 85a6731 Compare November 5, 2025 13:40
@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from 6027e13 to bab50b1 Compare November 6, 2025 08:32
@andrewlock andrewlock force-pushed the andrew/settings/5-remove-mutablesettings branch from 85a6731 to 5ee2a7f Compare November 6, 2025 08:32
@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from bab50b1 to ff45b9a Compare November 6, 2025 11:54
@andrewlock andrewlock force-pushed the andrew/settings/5-remove-mutablesettings branch from 5ee2a7f to 53d59b0 Compare November 6, 2025 11:54
@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from ff45b9a to b2fc233 Compare November 6, 2025 14:55
@andrewlock andrewlock force-pushed the andrew/settings/5-remove-mutablesettings branch from 53d59b0 to 95e3713 Compare November 6, 2025 14:55
@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from b2fc233 to 51ec16a Compare November 7, 2025 18:09
@andrewlock andrewlock force-pushed the andrew/settings/5-remove-mutablesettings branch from 95e3713 to 3238b3e Compare November 7, 2025 18:09
@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from 51ec16a to fade217 Compare November 10, 2025 12:25
@andrewlock andrewlock force-pushed the andrew/settings/5-remove-mutablesettings branch from 3238b3e to 11c23d3 Compare November 10, 2025 12:25
@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from fade217 to 1c51ccb Compare November 10, 2025 12:35
@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from 1c51ccb to 10ce7a6 Compare November 10, 2025 12:38
@andrewlock andrewlock changed the base branch from andrew/settings/5-remove-mutablesettings to andrew/settings/6-fix-telemetry-reporting November 10, 2025 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:data-streams-monitoring area:tests unit tests, integration tests area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) type:reliability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants