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
duration74.61 ± (74.48 - 75.06) ms74.44 ± (74.58 - 75.22) ms-0.2%
.NET Framework 4.8 - Bailout
duration80.03 ± (79.77 - 80.45) ms79.48 ± (79.27 - 79.90) ms-0.7%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1105.86 ± (1108.27 - 1117.48) ms1114.95 ± (1113.46 - 1122.29) ms+0.8%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.93 ± (22.85 - 23.02) ms23.00 ± (22.92 - 23.07) ms+0.3%✅⬆️
process.time_to_main_ms87.75 ± (87.45 - 88.04) ms87.35 ± (87.03 - 87.67) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.88 ± (10.88 - 10.88) MB10.90 ± (10.90 - 10.90) MB+0.2%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.70 ± (22.62 - 22.77) ms23.08 ± (22.98 - 23.18) ms+1.7%✅⬆️
process.time_to_main_ms88.50 ± (88.09 - 88.90) ms90.72 ± (90.22 - 91.22) ms+2.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.92 ± (10.92 - 10.92) MB10.94 ± (10.93 - 10.94) MB+0.2%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms220.26 ± (218.91 - 221.62) ms219.97 ± (218.76 - 221.19) ms-0.1%
process.time_to_main_ms547.90 ± (546.80 - 549.00) ms545.81 ± (544.20 - 547.42) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed52.48 ± (52.46 - 52.50) MB52.58 ± (52.55 - 52.60) MB+0.2%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.5%
.NET 6 - Baseline
process.internal_duration_ms21.62 ± (21.57 - 21.67) ms21.53 ± (21.47 - 21.59) ms-0.4%
process.time_to_main_ms75.38 ± (75.07 - 75.69) ms74.42 ± (74.13 - 74.71) ms-1.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.58 ± (10.58 - 10.58) MB10.62 ± (10.62 - 10.62) MB+0.4%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.52 ± (21.47 - 21.57) ms21.39 ± (21.34 - 21.44) ms-0.6%
process.time_to_main_ms76.18 ± (75.95 - 76.42) ms75.75 ± (75.48 - 76.02) ms-0.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.63 ± (10.63 - 10.63) MB10.66 ± (10.66 - 10.67) MB+0.3%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms205.70 ± (204.46 - 206.95) ms203.92 ± (203.00 - 204.85) ms-0.9%
process.time_to_main_ms511.42 ± (510.35 - 512.49) ms505.01 ± (504.14 - 505.87) ms-1.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed51.65 ± (51.62 - 51.69) MB51.54 ± (51.50 - 51.58) MB-0.2%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 8 - Baseline
process.internal_duration_ms19.76 ± (19.70 - 19.82) ms19.50 ± (19.46 - 19.55) ms-1.3%
process.time_to_main_ms74.28 ± (73.98 - 74.57) ms73.69 ± (73.42 - 73.97) ms-0.8%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.65 ± (7.64 - 7.65) MB7.65 ± (7.65 - 7.66) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.75 ± (19.69 - 19.80) ms19.55 ± (19.48 - 19.61) ms-1.0%
process.time_to_main_ms75.96 ± (75.68 - 76.23) ms75.40 ± (75.01 - 75.78) ms-0.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.68 ± (7.68 - 7.69) MB7.71 ± (7.70 - 7.72) MB+0.3%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms190.27 ± (189.38 - 191.16) ms190.18 ± (189.22 - 191.13) ms-0.0%
process.time_to_main_ms490.02 ± (489.05 - 490.98) ms481.51 ± (480.46 - 482.57) ms-1.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed38.83 ± (38.79 - 38.87) MB38.71 ± (38.67 - 38.75) MB-0.3%
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.89 ± (192.40 - 193.29) ms193.71 ± (193.68 - 194.56) ms+0.4%✅⬆️
.NET Framework 4.8 - Bailout
duration198.58 ± (198.17 - 198.95) ms197.27 ± (197.22 - 198.20) ms-0.7%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1153.51 ± (1158.34 - 1167.74) ms1159.89 ± (1159.80 - 1166.93) ms+0.6%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms187.53 ± (187.18 - 187.88) ms188.91 ± (188.43 - 189.40) ms+0.7%✅⬆️
process.time_to_main_ms80.73 ± (80.50 - 80.96) ms81.28 ± (81.04 - 81.52) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.02 ± (16.00 - 16.05) MB16.02 ± (15.99 - 16.05) MB-0.0%
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+1.1%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms186.90 ± (186.58 - 187.22) ms187.01 ± (186.69 - 187.33) ms+0.1%✅⬆️
process.time_to_main_ms81.85 ± (81.73 - 81.96) ms81.95 ± (81.77 - 82.13) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.10 ± (16.07 - 16.13) MB16.13 ± (16.09 - 16.16) MB+0.2%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)-0.4%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms392.43 ± (389.94 - 394.92) ms393.56 ± (391.16 - 395.97) ms+0.3%✅⬆️
process.time_to_main_ms516.67 ± (516.04 - 517.30) ms517.40 ± (516.29 - 518.51) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed62.73 ± (62.57 - 62.89) MB62.93 ± (62.77 - 63.08) MB+0.3%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms190.62 ± (190.39 - 190.85) ms191.67 ± (191.42 - 191.92) ms+0.6%✅⬆️
process.time_to_main_ms69.49 ± (69.35 - 69.62) ms69.67 ± (69.53 - 69.81) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.08 ± (15.94 - 16.21) MB16.11 ± (15.98 - 16.25) MB+0.2%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 19)18 ± (18 - 18)-0.9%
.NET 6 - Bailout
process.internal_duration_ms190.12 ± (189.90 - 190.34) ms190.32 ± (190.06 - 190.59) ms+0.1%✅⬆️
process.time_to_main_ms70.41 ± (70.32 - 70.50) ms70.69 ± (70.60 - 70.78) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.14 ± (16.00 - 16.27) MB16.02 ± (15.87 - 16.18) MB-0.7%
runtime.dotnet.threads.count19 ± (19 - 20)19 ± (19 - 19)-1.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms411.84 ± (408.73 - 414.96) ms404.94 ± (402.87 - 407.00) ms-1.7%
process.time_to_main_ms484.96 ± (484.37 - 485.56) ms482.68 ± (482.06 - 483.30) ms-0.5%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed62.14 ± (62.00 - 62.28) MB62.21 ± (62.06 - 62.36) MB+0.1%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 30)+0.1%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms189.32 ± (188.98 - 189.66) ms190.04 ± (189.73 - 190.35) ms+0.4%✅⬆️
process.time_to_main_ms69.29 ± (69.08 - 69.49) ms69.53 ± (69.36 - 69.69) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.69 ± (11.66 - 11.72) MB11.68 ± (11.65 - 11.70) MB-0.1%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.2%
.NET 8 - Bailout
process.internal_duration_ms189.02 ± (188.83 - 189.22) ms189.64 ± (189.27 - 190.00) ms+0.3%✅⬆️
process.time_to_main_ms70.07 ± (69.99 - 70.14) ms70.56 ± (70.44 - 70.69) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.79 ± (11.76 - 11.82) MB11.77 ± (11.75 - 11.80) MB-0.2%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.3%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms360.15 ± (358.36 - 361.95) ms360.85 ± (359.30 - 362.41) ms+0.2%✅⬆️
process.time_to_main_ms463.79 ± (463.10 - 464.48) ms458.80 ± (458.25 - 459.35) ms-1.1%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.29 ± (50.25 - 50.33) MB50.36 ± (50.33 - 50.39) MB+0.1%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)+0.1%✅⬆️
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)  : 70, 79
    master - mean (75ms)  : 71, 79

    section Bailout
    This PR (7744) - mean (80ms)  : 75, 84
    master - mean (80ms)  : 75, 85

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (1,118ms)  : 1053, 1182
    master - mean (1,113ms)  : 1047, 1179

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 (118ms)  : 112, 124
    master - mean (118ms)  : 113, 123

    section Bailout
    This PR (7744) - mean (122ms)  : 111, 133
    master - mean (119ms)  : 110, 127

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (808ms)  : 762, 855
    master - mean (808ms)  : 774, 842

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7744) - mean (103ms)  : 98, 108
    master - mean (104ms)  : 98, 109

    section Bailout
    This PR (7744) - mean (104ms)  : 100, 109
    master - mean (105ms)  : 100, 109

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (749ms)  : 720, 777
    master - mean (747ms)  : 714, 780

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

    section Bailout
    This PR (7744) - mean (103ms)  : 98, 109
    master - mean (104ms)  : 99, 110

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (713ms)  : 679, 747
    master - mean (720ms)  : 684, 756

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 (194ms)  : 188, 200
    master - mean (193ms)  : 188, 198

    section Bailout
    This PR (7744) - mean (198ms)  : 191, 204
    master - mean (199ms)  : 194, 203

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (1,163ms)  : 1112, 1215
    master - mean (1,163ms)  : 1093, 1233

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 (279ms)  : 272, 285
    master - mean (277ms)  : 271, 282

    section Bailout
    This PR (7744) - mean (277ms)  : 272, 282
    master - mean (277ms)  : 272, 282

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (954ms)  : 902, 1006
    master - mean (944ms)  : 906, 981

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7744) - mean (270ms)  : 267, 272
    master - mean (268ms)  : 264, 273

    section Bailout
    This PR (7744) - mean (269ms)  : 266, 272
    master - mean (268ms)  : 264, 273

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (919ms)  : 873, 965
    master - mean (931ms)  : 874, 989

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7744) - mean (269ms)  : 265, 273
    master - mean (268ms)  : 264, 272

    section Bailout
    This PR (7744) - mean (270ms)  : 266, 273
    master - mean (268ms)  : 265, 271

    section CallTarget+Inlining+NGEN
    This PR (7744) - mean (852ms)  : 827, 877
    master - mean (856ms)  : 835, 876

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:

  • 1 benchmarks are faster, with geometric mean 2.443
  • 1 benchmarks are slower, with geometric mean 1.153
  • 4 benchmarks have fewer allocations
  • 4 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 ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.7μs 60ns 365ns 0 0 0 5.52 KB
master StartStopWithChild netcoreapp3.1 13.6μs 69.5ns 311ns 0 0 0 5.67 KB
master StartStopWithChild net472 21.7μs 115ns 619ns 0.994 0.331 0.11 6.06 KB
#7744 StartStopWithChild net6.0 10.6μs 58.4ns 360ns 0 0 0 5.5 KB
#7744 StartStopWithChild netcoreapp3.1 14.3μs 69.6ns 278ns 0 0 0 5.67 KB
#7744 StartStopWithChild net472 22.3μs 121ns 639ns 0.883 0.221 0 6.08 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 935μs 70.9ns 256ns 0 0 0 2.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.03ms 214ns 831ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.21ms 68ns 263ns 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.12μs 1.56ns 6.06ns 0 0 0 1.22 KB
master AllCycleSimpleBody netcoreapp3.1 1.43μs 7.91ns 49.4ns 0 0 0 1.2 KB
master AllCycleSimpleBody net472 1.03μs 0.786ns 2.94ns 0.195 0 0 1.23 KB
master AllCycleMoreComplexBody net6.0 7.21μs 36.9ns 169ns 0 0 0 4.72 KB
master AllCycleMoreComplexBody netcoreapp3.1 9.22μs 36ns 139ns 0 0 0 4.62 KB
master AllCycleMoreComplexBody net472 7.67μs 4.4ns 17ns 0.726 0 0 4.74 KB
master ObjectExtractorSimpleBody net6.0 326ns 1.41ns 5.82ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 406ns 1.98ns 8.17ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 298ns 0.0502ns 0.194ns 0.0434 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.35μs 3.3ns 12.8ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.85μs 4.37ns 16.9ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.7μs 2.97ns 11.5ns 0.603 0 0 3.8 KB
#7744 AllCycleSimpleBody net6.0 1.08μs 6.06ns 38.8ns 0 0 0 1.22 KB
#7744 AllCycleSimpleBody netcoreapp3.1 1.41μs 7.82ns 46.2ns 0 0 0 1.2 KB
#7744 AllCycleSimpleBody net472 1.03μs 0.591ns 2.13ns 0.191 0 0 1.23 KB
#7744 AllCycleMoreComplexBody net6.0 7.32μs 37.7ns 177ns 0 0 0 4.72 KB
#7744 AllCycleMoreComplexBody netcoreapp3.1 9.16μs 30.6ns 118ns 0 0 0 4.62 KB
#7744 AllCycleMoreComplexBody net472 7.73μs 2.65ns 10.3ns 0.734 0 0 4.74 KB
#7744 ObjectExtractorSimpleBody net6.0 329ns 1.51ns 5.83ns 0 0 0 280 B
#7744 ObjectExtractorSimpleBody netcoreapp3.1 411ns 2.23ns 12.2ns 0 0 0 272 B
#7744 ObjectExtractorSimpleBody net472 305ns 0.0494ns 0.185ns 0.0433 0 0 281 B
#7744 ObjectExtractorMoreComplexBody net6.0 6.41μs 31.5ns 134ns 0 0 0 3.78 KB
#7744 ObjectExtractorMoreComplexBody netcoreapp3.1 7.73μs 37.9ns 165ns 0 0 0 3.69 KB
#7744 ObjectExtractorMoreComplexBody net472 6.74μs 5.25ns 18.9ns 0.578 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 78.7μs 223ns 865ns 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 96.9μs 208ns 805ns 0 0 0 32.4 KB
master EncodeArgs net472 109μs 44ns 170ns 4.9 0 0 32.51 KB
master EncodeLegacyArgs net6.0 144μs 19.2ns 74.2ns 0 0 0 2.15 KB
master EncodeLegacyArgs netcoreapp3.1 197μs 328ns 1.27μs 0 0 0 2.14 KB
master EncodeLegacyArgs net472 267μs 39.7ns 154ns 0 0 0 2.16 KB
#7744 EncodeArgs net6.0 77.6μs 231ns 833ns 0 0 0 32.4 KB
#7744 EncodeArgs netcoreapp3.1 95.5μs 301ns 1.13μs 0 0 0 32.4 KB
#7744 EncodeArgs net472 109μs 36.2ns 140ns 4.92 0 0 32.5 KB
#7744 EncodeLegacyArgs net6.0 144μs 35.4ns 137ns 0 0 0 2.15 KB
#7744 EncodeLegacyArgs netcoreapp3.1 200μs 248ns 962ns 0 0 0 2.14 KB
#7744 EncodeLegacyArgs net472 264μs 222ns 858ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #7744

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 2.443 724,570.61 296,593.30

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 393μs 60.6ns 227ns 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 413μs 343ns 1.33μs 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 431μs 35.5ns 138ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 284μs 35.2ns 132ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 696μs 11μs 104μs 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 310μs 47.2ns 177ns 0 0 0 2.29 KB
#7744 RunWafRealisticBenchmark net6.0 391μs 78ns 302ns 0 0 0 4.55 KB
#7744 RunWafRealisticBenchmark netcoreapp3.1 417μs 736ns 2.75μs 0 0 0 4.48 KB
#7744 RunWafRealisticBenchmark net472 426μs 49.4ns 185ns 0 0 0 4.66 KB
#7744 RunWafRealisticBenchmarkWithAttack net6.0 286μs 51.3ns 192ns 0 0 0 2.24 KB
#7744 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 297μs 64.8ns 251ns 0 0 0 2.22 KB
#7744 RunWafRealisticBenchmarkWithAttack net472 311μs 35.7ns 129ns 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.1μs 83.3ns 300ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 72.8μs 215ns 774ns 0 0 0 17.42 KB
master SendRequest net472 0.00198ns 0.000924ns 0.00358ns 0 0 0 0 b
#7744 SendRequest net6.0 61.9μs 50.7ns 183ns 0 0 0 14.52 KB
#7744 SendRequest netcoreapp3.1 71.5μs 224ns 807ns 0 0 0 17.42 KB
#7744 SendRequest net472 0.00354ns 0.00145ns 0.00563ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7744

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 1.153 1,899,066.07 2,188,682.14

More allocations ⚠️ in #7744

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 4 B 6 B 2 B 50.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 2.03ms 1.6μs 5.98μs 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.11ms 6.93μs 25.9μs 0 0 0 640 KB
master OriginalCharSlice net472 2.68ms 103ns 400ns 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.34ms 360ns 1.39μs 0 0 0 4 B
master OptimizedCharSlice netcoreapp3.1 1.72ms 392ns 1.52μs 0 0 0 1 B
master OptimizedCharSlice net472 1.9ms 243ns 940ns 0 0 0 0 b
master OptimizedCharSliceWithPool net6.0 799μs 16.9ns 63.2ns 0 0 0 4 B
master OptimizedCharSliceWithPool netcoreapp3.1 813μs 200ns 776ns 0 0 0 1 B
master OptimizedCharSliceWithPool net472 1.14ms 78.4ns 304ns 0 0 0 0 b
#7744 OriginalCharSlice net6.0 1.92ms 210ns 813ns 0 0 0 640.01 KB
#7744 OriginalCharSlice netcoreapp3.1 2.1ms 7.84μs 30.3μs 0 0 0 640 KB
#7744 OriginalCharSlice net472 2.6ms 1.5μs 5.8μs 100 0 0 641.95 KB
#7744 OptimizedCharSlice net6.0 1.38ms 194ns 750ns 0 0 0 6 B
#7744 OptimizedCharSlice netcoreapp3.1 1.7ms 391ns 1.51μs 0 0 0 1 B
#7744 OptimizedCharSlice net472 2.19ms 208ns 806ns 0 0 0 0 b
#7744 OptimizedCharSliceWithPool net6.0 798μs 29.9ns 116ns 0 0 0 4 B
#7744 OptimizedCharSliceWithPool netcoreapp3.1 837μs 90.5ns 351ns 0 0 0 1 B
#7744 OptimizedCharSliceWithPool net472 1.15ms 104ns 402ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7744

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 42.01 KB 43.04 KB 1.04 KB 2.47%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 655μs 1.39μs 5.4μs 0 0 0 41.63 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 745μs 457ns 1.77μs 0 0 0 42.01 KB
master WriteAndFlushEnrichedTraces net472 848μs 1.13μs 4.08μs 8.33 0 0 56.22 KB
#7744 WriteAndFlushEnrichedTraces net6.0 655μs 3.32μs 15.6μs 0 0 0 41.65 KB
#7744 WriteAndFlushEnrichedTraces netcoreapp3.1 750μs 3.15μs 12.2μs 0 0 0 43.04 KB
#7744 WriteAndFlushEnrichedTraces net472 890μs 3.5μs 13.6μs 4.46 0 0 56.1 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.89μs 9.34ns 41.8ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.62μs 13.1ns 57.3ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.86μs 4.43ns 17.1ns 0.144 0.0144 0 987 B
#7744 ExecuteNonQuery net6.0 1.95μs 6.68ns 25.9ns 0 0 0 1.02 KB
#7744 ExecuteNonQuery netcoreapp3.1 2.63μs 2.15ns 7.76ns 0 0 0 1.02 KB
#7744 ExecuteNonQuery net472 2.92μs 5.12ns 19.8ns 0.143 0.0143 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.73μs 7.87ns 31.5ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.2μs 11ns 49.3ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.5μs 4.32ns 16.7ns 0.157 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.86μs 1.32ns 5.12ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.46μs 11.1ns 42.9ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.65μs 3.41ns 13.2ns 0.164 0 0 1.1 KB
#7744 CallElasticsearch net6.0 1.78μs 8.85ns 36.5ns 0 0 0 1.03 KB
#7744 CallElasticsearch netcoreapp3.1 2.26μs 10.9ns 45ns 0 0 0 1.03 KB
#7744 CallElasticsearch net472 3.47μs 2.9ns 10.8ns 0.158 0 0 1.04 KB
#7744 CallElasticsearchAsync net6.0 1.8μs 8.82ns 36.4ns 0 0 0 1.01 KB
#7744 CallElasticsearchAsync netcoreapp3.1 2.44μs 12.1ns 51.5ns 0 0 0 1.08 KB
#7744 CallElasticsearchAsync net472 3.64μs 3.48ns 13.5ns 0.164 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.92μs 9.41ns 41ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.46μs 8.3ns 32.2ns 0 0 0 952 B
master ExecuteAsync net472 2.58μs 1.44ns 5.58ns 0.142 0 0 915 B
#7744 ExecuteAsync net6.0 1.9μs 2.84ns 11ns 0 0 0 952 B
#7744 ExecuteAsync netcoreapp3.1 2.36μs 10ns 38.9ns 0 0 0 952 B
#7744 ExecuteAsync net472 2.5μs 1.66ns 6.43ns 0.138 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.74μs 21ns 78.4ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.69μs 19.8ns 76.8ns 0 0 0 2.9 KB
master SendAsync net472 12.2μs 12.1ns 46.7ns 0.491 0 0 3.18 KB
#7744 SendAsync net6.0 7.02μs 8.78ns 31.6ns 0 0 0 2.36 KB
#7744 SendAsync netcoreapp3.1 8.42μs 11.9ns 46.2ns 0 0 0 2.9 KB
#7744 SendAsync net472 12.3μs 6.99ns 26.1ns 0.494 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‑net6.0 257.96 KB 286 KB 28.04 KB 10.87%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 247.29 KB 256.98 KB 9.69 KB 3.92%

Fewer allocations 🎉 in #7744

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 44.22 KB 42.9 KB -1.31 KB -2.97%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 50.5μs 713ns 7.05μs 0 0 0 44.22 KB
master StringConcatBenchmark netcoreapp3.1 50.1μs 283ns 2.68μs 0 0 0 42.81 KB
master StringConcatBenchmark net472 56.1μs 271ns 1.12μs 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 461μs 1.99μs 6.89μs 0 0 0 257.96 KB
master StringConcatAspectBenchmark netcoreapp3.1 505μs 2.6μs 11.6μs 0 0 0 247.29 KB
master StringConcatAspectBenchmark net472 412μs 2.25μs 12.9μs 0 0 0 278.36 KB
#7744 StringConcatBenchmark net6.0 42.6μs 238ns 1.45μs 0 0 0 42.9 KB
#7744 StringConcatBenchmark netcoreapp3.1 51.9μs 430ns 4.17μs 0 0 0 42.78 KB
#7744 StringConcatBenchmark net472 56.8μs 227ns 849ns 0 0 0 57.34 KB
#7744 StringConcatAspectBenchmark net6.0 475μs 2.46μs 11.8μs 0 0 0 286 KB
#7744 StringConcatAspectBenchmark netcoreapp3.1 530μs 2.43μs 9.08μs 0 0 0 256.98 KB
#7744 StringConcatAspectBenchmark net472 405μs 2.35μs 18.8μs 0 0 0 279.13 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.63μs 13.3ns 61ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.61μs 16ns 61.8ns 0 0 0 1.7 KB
master EnrichedLog net472 3.85μs 3.41ns 13.2ns 0.249 0 0 1.64 KB
#7744 EnrichedLog net6.0 2.67μs 14.2ns 76.7ns 0 0 0 1.7 KB
#7744 EnrichedLog netcoreapp3.1 3.66μs 7.51ns 29.1ns 0 0 0 1.7 KB
#7744 EnrichedLog net472 3.81μs 3.11ns 11.6ns 0.25 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 122μs 64.1ns 248ns 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 128μs 551ns 2.59μs 0 0 0 4.31 KB
master EnrichedLog net472 168μs 192ns 744ns 0 0 0 4.52 KB
#7744 EnrichedLog net6.0 124μs 134ns 463ns 0 0 0 4.31 KB
#7744 EnrichedLog netcoreapp3.1 129μs 277ns 999ns 0 0 0 4.31 KB
#7744 EnrichedLog net472 166μs 114ns 425ns 0 0 0 4.52 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 5.08μs 4.77ns 18.5ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.84μs 24.1ns 93.5ns 0 0 0 2.26 KB
master EnrichedLog net472 7.57μs 6.05ns 23.4ns 0.302 0 0 2.08 KB
#7744 EnrichedLog net6.0 5.14μs 14.2ns 54.8ns 0 0 0 2.26 KB
#7744 EnrichedLog netcoreapp3.1 6.84μs 6.86ns 25.7ns 0 0 0 2.26 KB
#7744 EnrichedLog net472 7.41μs 3.9ns 14.6ns 0.297 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.03μs 3.98ns 15.4ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.62μs 12.8ns 52.8ns 0 0 0 1.2 KB
master SendReceive net472 3.12μs 4.36ns 16.9ns 0.187 0 0 1.2 KB
#7744 SendReceive net6.0 2μs 6.03ns 21.7ns 0 0 0 1.2 KB
#7744 SendReceive netcoreapp3.1 2.52μs 12.7ns 56.9ns 0 0 0 1.2 KB
#7744 SendReceive net472 3.03μs 3.79ns 14.7ns 0.182 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.29μs 4.33ns 16.8ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.49μs 21.5ns 83.1ns 0 0 0 1.63 KB
master EnrichedLog net472 6.66μs 6.95ns 26.9ns 0.298 0 0 2.03 KB
#7744 EnrichedLog net6.0 4.37μs 3.21ns 12.4ns 0 0 0 1.58 KB
#7744 EnrichedLog netcoreapp3.1 5.8μs 14.6ns 56.6ns 0 0 0 1.63 KB
#7744 EnrichedLog net472 6.71μs 6.86ns 26.6ns 0.299 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 806ns 0.171ns 0.638ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 971ns 5.31ns 29.5ns 0 0 0 576 B
master StartFinishSpan net472 944ns 0.26ns 0.974ns 0.0904 0 0 578 B
master StartFinishScope net6.0 907ns 4.53ns 21.3ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.17μs 5.44ns 21.1ns 0 0 0 696 B
master StartFinishScope net472 1.14μs 0.437ns 1.69ns 0.103 0 0 658 B
#7744 StartFinishSpan net6.0 802ns 3.98ns 15.4ns 0 0 0 576 B
#7744 StartFinishSpan netcoreapp3.1 992ns 4.74ns 19ns 0 0 0 576 B
#7744 StartFinishSpan net472 920ns 0.293ns 1.06ns 0.0876 0 0 578 B
#7744 StartFinishScope net6.0 955ns 4.69ns 19.4ns 0 0 0 696 B
#7744 StartFinishScope netcoreapp3.1 1.23μs 6.32ns 28.2ns 0 0 0 696 B
#7744 StartFinishScope net472 1.12μs 0.216ns 0.835ns 0.101 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.06μs 4.48ns 17.3ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.45μs 6.68ns 25.9ns 0 0 0 696 B
master RunOnMethodBegin net472 1.44μs 0.428ns 1.6ns 0.101 0 0 658 B
#7744 RunOnMethodBegin net6.0 1.09μs 5.12ns 20.5ns 0 0 0 696 B
#7744 RunOnMethodBegin netcoreapp3.1 1.42μs 4.88ns 18.9ns 0 0 0 696 B
#7744 RunOnMethodBegin net472 1.44μs 1.35ns 5.22ns 0.102 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 2 times, most recently 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
@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from 10ce7a6 to 47ddbf9 Compare November 11, 2025 10:04
@andrewlock andrewlock force-pushed the andrew/settings/6-fix-telemetry-reporting branch from 2fbbd7f to c677778 Compare November 11, 2025 10:04
@andrewlock andrewlock force-pushed the andrew/settings/6a-stop-using-tracer-instance branch from 47ddbf9 to 62b1d54 Compare November 11, 2025 18:13
@andrewlock andrewlock force-pushed the andrew/settings/6-fix-telemetry-reporting branch from c677778 to 1ad1119 Compare November 11, 2025 18:13
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