Skip to content

Differentiate between error states #7030

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 29, 2025

Conversation

andrewlock
Copy link
Member

@andrewlock andrewlock commented May 29, 2025

Summary of changes

Write a different error for null in error condition

Reason for change

We're trying to work out what's happening here. Having the extra information would be handy.

Implementation details

The logs are redacted, so we don't get the type, but the stack and telling whether it's null or something else would be useful

Test coverage

🙈

Other Details

Error logs

@andrewlock andrewlock added area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed) labels May 29, 2025
@andrewlock andrewlock requested review from a team as code owners May 29, 2025 14:37
Copy link
Member

@lucaspimentel lucaspimentel left a comment

Choose a reason for hiding this comment

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

LGTM aside from my comment about the exception message.

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented May 29, 2025

Datadog Report

All test runs 9a66fb8 🔗

2 Total Test Services: 0 Failed, 2 Passed

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Test Service View
dd-trace-dotnet 0 0 0 550043 4223 26h 48m 54.84s Link
exploration_tests 0 0 0 22085 3 2m 13.55s Link

@andrewlock
Copy link
Member Author

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

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 shown 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).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (7030) - mean (74ms)  : 67, 81
     .   : milestone, 74,
    master - mean (75ms)  : 70, 80
     .   : milestone, 75,

    section CallTarget+Inlining+NGEN
    This PR (7030) - mean (1,063ms)  : 1027, 1100
     .   : milestone, 1063,
    master - mean (1,074ms)  : 1032, 1116
     .   : milestone, 1074,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (7030) - mean (112ms)  : 107, 117
     .   : milestone, 112,
    master - mean (112ms)  : 107, 117
     .   : milestone, 112,

    section CallTarget+Inlining+NGEN
    This PR (7030) - mean (736ms)  : 705, 766
     .   : milestone, 736,
    master - mean (745ms)  : 709, 780
     .   : milestone, 745,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (7030) - mean (97ms)  : 93, 102
     .   : milestone, 97,
    master - mean (97ms)  : 92, 103
     .   : milestone, 97,

    section CallTarget+Inlining+NGEN
    This PR (7030) - mean (688ms)  : 661, 716
     .   : milestone, 688,
    master - mean (698ms)  : 671, 725
     .   : milestone, 698,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (7030) - mean (190ms)  : 186, 193
     .   : milestone, 190,
    master - mean (190ms)  : 186, 194
     .   : milestone, 190,

    section CallTarget+Inlining+NGEN
    This PR (7030) - mean (1,113ms)  : 1085, 1142
     .   : milestone, 1113,
    master - mean (1,113ms)  : 1090, 1135
     .   : milestone, 1113,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (7030) - mean (270ms)  : 266, 274
     .   : milestone, 270,
    master - mean (269ms)  : 265, 274
     .   : milestone, 269,

    section CallTarget+Inlining+NGEN
    This PR (7030) - mean (877ms)  : 847, 906
     .   : milestone, 877,
    master - mean (879ms)  : 848, 911
     .   : milestone, 879,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (7030) - mean (262ms)  : 258, 266
     .   : milestone, 262,
    master - mean (262ms)  : 258, 265
     .   : milestone, 262,

    section CallTarget+Inlining+NGEN
    This PR (7030) - mean (862ms)  : 838, 887
     .   : milestone, 862,
    master - mean (868ms)  : 844, 891
     .   : milestone, 868,

Loading

@pr-commenter
Copy link

pr-commenter bot commented May 29, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7030 compared to master:

  • All benchmarks have the same speed
  • 2 benchmarks have fewer allocations
  • 5 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 #7030

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net6.0 5.53 KB 5.58 KB 51 B 0.92%

Fewer allocations 🎉 in #7030

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 6.11 KB 6.07 KB -42 B -0.69%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 11μs 59.2ns 324ns 0 0 0 5.53 KB
master StartStopWithChild netcoreapp3.1 13.5μs 54.8ns 212ns 0 0 0 5.74 KB
master StartStopWithChild net472 22.2μs 116ns 554ns 0.933 0.233 0 6.11 KB
#7030 StartStopWithChild net6.0 10.5μs 56.8ns 321ns 0 0 0 5.58 KB
#7030 StartStopWithChild netcoreapp3.1 13.8μs 68.7ns 299ns 0 0 0 5.72 KB
#7030 StartStopWithChild net472 22.8μs 123ns 696ns 1.02 0.451 0.113 6.07 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 927μs 62.4ns 233ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 56.2ns 203ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.23ms 78.7ns 305ns 0 0 0 3.35 KB
#7030 WriteAndFlushEnrichedTraces net6.0 940μs 325ns 1.26μs 0 0 0 2.7 KB
#7030 WriteAndFlushEnrichedTraces netcoreapp3.1 1.02ms 122ns 473ns 0 0 0 2.7 KB
#7030 WriteAndFlushEnrichedTraces net472 1.26ms 2.83μs 10.9μs 0 0 0 3.35 KB
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 327μs 1.64μs 7.67μs 0 0 0 197.06 KB
master AllCycleSimpleBody netcoreapp3.1 476μs 1.51μs 5.65μs 0 0 0 204.77 KB
master AllCycleSimpleBody net472 443μs 313ns 1.21μs 36.6 2.16 0 236.35 KB
master AllCycleMoreComplexBody net6.0 333μs 1.71μs 7.82μs 0 0 0 200.56 KB
master AllCycleMoreComplexBody netcoreapp3.1 491μs 1.63μs 6.3μs 0 0 0 208.18 KB
master AllCycleMoreComplexBody net472 457μs 165ns 637ns 37.9 2.23 0 239.88 KB
master ObjectExtractorSimpleBody net6.0 307ns 1.78ns 13.3ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 394ns 2.16ns 11.8ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 302ns 0.0454ns 0.176ns 0.0441 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.22μs 22.7ns 87.8ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.67μs 33ns 128ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.72μs 2.49ns 9.66ns 0.603 0 0 3.8 KB
#7030 AllCycleSimpleBody net6.0 330μs 1.53μs 5.92μs 0 0 0 197.06 KB
#7030 AllCycleSimpleBody netcoreapp3.1 485μs 1.11μs 4.29μs 0 0 0 204.77 KB
#7030 AllCycleSimpleBody net472 437μs 78.9ns 284ns 36.6 2.16 0 236.35 KB
#7030 AllCycleMoreComplexBody net6.0 343μs 1.78μs 8.54μs 0 0 0 200.56 KB
#7030 AllCycleMoreComplexBody netcoreapp3.1 487μs 1.91μs 7.4μs 0 0 0 208.18 KB
#7030 AllCycleMoreComplexBody net472 449μs 312ns 1.17μs 37.9 2.23 0 239.88 KB
#7030 ObjectExtractorSimpleBody net6.0 315ns 0.106ns 0.412ns 0 0 0 280 B
#7030 ObjectExtractorSimpleBody netcoreapp3.1 425ns 2.21ns 11.3ns 0 0 0 272 B
#7030 ObjectExtractorSimpleBody net472 302ns 0.0377ns 0.136ns 0.0442 0 0 281 B
#7030 ObjectExtractorMoreComplexBody net6.0 6.4μs 1.74ns 6.74ns 0 0 0 3.78 KB
#7030 ObjectExtractorMoreComplexBody netcoreapp3.1 7.68μs 32.8ns 127ns 0 0 0 3.69 KB
#7030 ObjectExtractorMoreComplexBody net472 6.73μs 3.46ns 13.4ns 0.572 0 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Unknown 🤷 Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 N/A N/A N/A NaN NaN NaN 0 b
master EncodeArgs netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
master EncodeArgs net472 N/A N/A N/A NaN NaN NaN 0 b
master EncodeLegacyArgs net6.0 N/A N/A N/A NaN NaN NaN 0 b
master EncodeLegacyArgs netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
master EncodeLegacyArgs net472 N/A N/A N/A NaN NaN NaN 0 b
#7030 EncodeArgs net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7030 EncodeArgs netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7030 EncodeArgs net472 N/A N/A N/A NaN NaN NaN 0 b
#7030 EncodeLegacyArgs net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7030 EncodeLegacyArgs netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7030 EncodeLegacyArgs net472 N/A N/A N/A NaN NaN NaN 0 b
Benchmarks.Trace.Asm.AppSecWafBenchmark - Unknown 🤷 Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 N/A N/A N/A NaN NaN NaN 0 b
master RunWafRealisticBenchmark netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
master RunWafRealisticBenchmark net472 N/A N/A N/A NaN NaN NaN 0 b
master RunWafRealisticBenchmarkWithAttack net6.0 N/A N/A N/A NaN NaN NaN 0 b
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
master RunWafRealisticBenchmarkWithAttack net472 N/A N/A N/A NaN NaN NaN 0 b
#7030 RunWafRealisticBenchmark net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7030 RunWafRealisticBenchmark netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7030 RunWafRealisticBenchmark net472 N/A N/A N/A NaN NaN NaN 0 b
#7030 RunWafRealisticBenchmarkWithAttack net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7030 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7030 RunWafRealisticBenchmarkWithAttack net472 N/A N/A N/A NaN NaN NaN 0 b
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.3μs 95.5ns 357ns 0 0 0 14.53 KB
master SendRequest netcoreapp3.1 70.3μs 151ns 565ns 0 0 0 17.42 KB
master SendRequest net472 0.0136ns 0.00198ns 0.00766ns 0 0 0 0 b
#7030 SendRequest net6.0 61μs 26.4ns 95ns 0 0 0 14.53 KB
#7030 SendRequest netcoreapp3.1 71.3μs 150ns 561ns 0 0 0 17.42 KB
#7030 SendRequest net472 0.0132ns 0.00123ns 0.00458ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7030

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 41.69 KB 42.4 KB 709 B 1.70%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 723μs 1.91μs 7.39μs 0 0 0 41.69 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 663μs 3.21μs 14μs 0 0 0 41.99 KB
master WriteAndFlushEnrichedTraces net472 951μs 4.52μs 17.5μs 4.46 0 0 55.68 KB
#7030 WriteAndFlushEnrichedTraces net6.0 781μs 4.38μs 27.7μs 0 0 0 42.4 KB
#7030 WriteAndFlushEnrichedTraces netcoreapp3.1 682μs 3.97μs 33.2μs 0 0 0 42.04 KB
#7030 WriteAndFlushEnrichedTraces net472 863μs 3.75μs 14μs 8.33 0 0 55.91 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 2.01μs 0.854ns 3.31ns 0 0 0 1.03 KB
master ExecuteNonQuery netcoreapp3.1 2.45μs 1.76ns 6.8ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.69μs 4.61ns 17.8ns 0.146 0.0132 0 995 B
#7030 ExecuteNonQuery net6.0 1.86μs 9.88ns 53.2ns 0 0 0 1.03 KB
#7030 ExecuteNonQuery netcoreapp3.1 2.49μs 12.1ns 48.5ns 0 0 0 1.02 KB
#7030 ExecuteNonQuery net472 2.7μs 2.66ns 10.3ns 0.146 0.0132 0 995 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.81μs 7.73ns 29.9ns 0 0 0 1.04 KB
master CallElasticsearch netcoreapp3.1 2.18μs 8.75ns 33.9ns 0 0 0 1.04 KB
master CallElasticsearch net472 3.45μs 3.45ns 13.4ns 0.154 0 0 1.05 KB
master CallElasticsearchAsync net6.0 1.78μs 7.7ns 29.8ns 0 0 0 1.02 KB
master CallElasticsearchAsync netcoreapp3.1 2.37μs 8.98ns 34.8ns 0 0 0 1.09 KB
master CallElasticsearchAsync net472 3.68μs 5.85ns 22.7ns 0.165 0 0 1.11 KB
#7030 CallElasticsearch net6.0 1.84μs 1.79ns 6.93ns 0 0 0 1.04 KB
#7030 CallElasticsearch netcoreapp3.1 2.26μs 9.79ns 37.9ns 0 0 0 1.04 KB
#7030 CallElasticsearch net472 3.48μs 2.15ns 8.32ns 0.155 0 0 1.05 KB
#7030 CallElasticsearchAsync net6.0 1.84μs 3.2ns 12.4ns 0 0 0 1.02 KB
#7030 CallElasticsearchAsync netcoreapp3.1 2.43μs 8.07ns 31.3ns 0 0 0 1.09 KB
#7030 CallElasticsearchAsync net472 3.65μs 4.31ns 16.7ns 0.167 0 0 1.11 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 8.71ns 34.8ns 0 0 0 960 B
master ExecuteAsync netcoreapp3.1 2.28μs 10.6ns 40.9ns 0 0 0 960 B
master ExecuteAsync net472 2.57μs 0.742ns 2.78ns 0.141 0 0 923 B
#7030 ExecuteAsync net6.0 1.84μs 6.78ns 26.3ns 0 0 0 960 B
#7030 ExecuteAsync netcoreapp3.1 2.3μs 10.8ns 43ns 0 0 0 960 B
#7030 ExecuteAsync net472 2.6μs 3.49ns 13.5ns 0.143 0 0 923 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.71μs 7.9ns 29.6ns 0 0 0 2.37 KB
master SendAsync netcoreapp3.1 8.46μs 6.54ns 23.6ns 0 0 0 2.9 KB
master SendAsync net472 12.1μs 11.1ns 41.7ns 0.48 0 0 3.19 KB
#7030 SendAsync net6.0 6.99μs 12.4ns 48.2ns 0 0 0 2.37 KB
#7030 SendAsync netcoreapp3.1 8.56μs 21.9ns 84.9ns 0 0 0 2.9 KB
#7030 SendAsync net472 12.1μs 9.38ns 36.3ns 0.483 0 0 3.19 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7030

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 286.72 KB 409.62 KB 122.9 KB 42.87%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 273.18 KB 277.17 KB 3.98 KB 1.46%
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 275.44 KB 278.32 KB 2.88 KB 1.05%

Fewer allocations 🎉 in #7030

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 44.41 KB 43.8 KB -608 B -1.37%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 45.1μs 267ns 2.47μs 0 0 0 44.41 KB
master StringConcatBenchmark netcoreapp3.1 50μs 281ns 2.28μs 0 0 0 43.4 KB
master StringConcatBenchmark net472 56.7μs 204ns 840ns 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 478μs 2.09μs 7.83μs 0 0 0 275.44 KB
master StringConcatAspectBenchmark netcoreapp3.1 536μs 2.6μs 10.7μs 0 0 0 273.18 KB
master StringConcatAspectBenchmark net472 408μs 1.96μs 7.59μs 0 0 0 286.72 KB
#7030 StringConcatBenchmark net6.0 41.5μs 203ns 839ns 0 0 0 43.8 KB
#7030 StringConcatBenchmark netcoreapp3.1 45.9μs 240ns 1.1μs 0 0 0 43.5 KB
#7030 StringConcatBenchmark net472 57.2μs 277ns 1.14μs 0 0 0 57.34 KB
#7030 StringConcatAspectBenchmark net6.0 509μs 1.77μs 6.13μs 0 0 0 278.32 KB
#7030 StringConcatAspectBenchmark netcoreapp3.1 526μs 2.44μs 10.1μs 0 0 0 277.17 KB
#7030 StringConcatAspectBenchmark net472 404μs 2.12μs 15.6μs 0 0 0 409.62 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.59μs 3.36ns 12.6ns 0 0 0 1.76 KB
master EnrichedLog netcoreapp3.1 3.4μs 16.1ns 66.3ns 0 0 0 1.76 KB
master EnrichedLog net472 3.91μs 4.11ns 15.9ns 0.254 0 0 1.69 KB
#7030 EnrichedLog net6.0 2.63μs 12.5ns 51.5ns 0 0 0 1.76 KB
#7030 EnrichedLog netcoreapp3.1 3.56μs 12.9ns 50ns 0 0 0 1.76 KB
#7030 EnrichedLog net472 3.92μs 4.93ns 19.1ns 0.253 0 0 1.69 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 124μs 133ns 517ns 0 0 0 4.37 KB
master EnrichedLog netcoreapp3.1 127μs 201ns 724ns 0 0 0 4.37 KB
master EnrichedLog net472 168μs 253ns 912ns 0 0 0 4.57 KB
#7030 EnrichedLog net6.0 122μs 44.6ns 167ns 0 0 0 4.37 KB
#7030 EnrichedLog netcoreapp3.1 126μs 150ns 560ns 0 0 0 4.37 KB
#7030 EnrichedLog net472 167μs 127ns 475ns 0 0 0 4.57 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.02μs 4.18ns 15.6ns 0 0 0 2.32 KB
master EnrichedLog netcoreapp3.1 6.64μs 22.5ns 81.1ns 0 0 0 2.32 KB
master EnrichedLog net472 7.5μs 5.03ns 18.8ns 0.334 0 0 2.14 KB
#7030 EnrichedLog net6.0 5.04μs 6.33ns 24.5ns 0 0 0 2.32 KB
#7030 EnrichedLog netcoreapp3.1 6.5μs 22.1ns 85.8ns 0 0 0 2.32 KB
#7030 EnrichedLog net472 7.48μs 5.87ns 22.7ns 0.336 0 0 2.14 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 1.98μs 9.96ns 43.4ns 0 0 0 1.21 KB
master SendReceive netcoreapp3.1 2.63μs 5.55ns 21.5ns 0 0 0 1.21 KB
master SendReceive net472 3.03μs 1.48ns 5.34ns 0.181 0 0 1.21 KB
#7030 SendReceive net6.0 1.97μs 2.91ns 10.9ns 0 0 0 1.21 KB
#7030 SendReceive netcoreapp3.1 2.64μs 8.53ns 33.1ns 0 0 0 1.21 KB
#7030 SendReceive net472 2.98μs 3.89ns 15.1ns 0.192 0 0 1.21 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.2μs 6.68ns 25.9ns 0 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 5.71μs 12.6ns 47.2ns 0 0 0 1.69 KB
master EnrichedLog net472 6.5μs 8.52ns 31.9ns 0.322 0 0 2.08 KB
#7030 EnrichedLog net6.0 4.35μs 11.7ns 45.2ns 0 0 0 1.64 KB
#7030 EnrichedLog netcoreapp3.1 5.57μs 15.3ns 59.4ns 0 0 0 1.69 KB
#7030 EnrichedLog net472 6.53μs 4.1ns 14.8ns 0.325 0 0 2.08 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 740ns 0.183ns 0.685ns 0 0 0 584 B
master StartFinishSpan netcoreapp3.1 935ns 3.7ns 13.3ns 0 0 0 584 B
master StartFinishSpan net472 924ns 0.245ns 0.948ns 0.0927 0 0 586 B
master StartFinishScope net6.0 890ns 4.24ns 17.5ns 0 0 0 704 B
master StartFinishScope netcoreapp3.1 1.2μs 2.07ns 8.02ns 0 0 0 704 B
master StartFinishScope net472 1.15μs 0.247ns 0.924ns 0.104 0 0 666 B
#7030 StartFinishSpan net6.0 744ns 3.76ns 18ns 0 0 0 584 B
#7030 StartFinishSpan netcoreapp3.1 937ns 4.86ns 22.8ns 0 0 0 584 B
#7030 StartFinishSpan net472 895ns 0.033ns 0.114ns 0.0899 0 0 586 B
#7030 StartFinishScope net6.0 895ns 4.89ns 26.8ns 0 0 0 704 B
#7030 StartFinishScope netcoreapp3.1 1.12μs 6.03ns 31.9ns 0 0 0 704 B
#7030 StartFinishScope net472 1.06μs 0.074ns 0.277ns 0.101 0 0 666 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.02μs 5.04ns 23.1ns 0 0 0 704 B
master RunOnMethodBegin netcoreapp3.1 1.37μs 6.11ns 23.6ns 0 0 0 704 B
master RunOnMethodBegin net472 1.35μs 0.429ns 1.61ns 0.102 0 0 666 B
#7030 RunOnMethodBegin net6.0 1.02μs 5.24ns 30.1ns 0 0 0 704 B
#7030 RunOnMethodBegin netcoreapp3.1 1.37μs 6.13ns 22.9ns 0 0 0 704 B
#7030 RunOnMethodBegin net472 1.35μs 0.595ns 2.15ns 0.101 0 0 666 B

@andrewlock andrewlock merged commit c821305 into master May 29, 2025
130 checks passed
@andrewlock andrewlock deleted the andrew/differentiate-null-with-other-values branch May 29, 2025 15:58
@github-actions github-actions bot added this to the vNext-v3 milestone May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed) area:integrations area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) identified-by:telemetry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants