-
Notifications
You must be signed in to change notification settings - Fork 147
Fix bug in dd-dotnet
's ExporterSettings
#7044
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
base: master
Are you sure you want to change the base?
Conversation
var agentUri = GetValue(configuration, ConfigurationKeys.AgentUri); | ||
var tracePipeName = GetValue(configuration, ConfigurationKeys.TracesPipeName); | ||
var agentHost = GetValue(configuration, ConfigurationKeys.AgentHost, "DD_TRACE_AGENT_HOSTNAME", "DATADOG_TRACE_AGENT_HOSTNAME"); | ||
var agentPortStr = GetValue(configuration, ConfigurationKeys.AgentPort, "DATADOG_TRACE_AGENT_PORT"); | ||
var unixDomainSocketPath = GetValue(configuration, ConfigurationKeys.TracesUnixDomainSocketPath); | ||
|
||
int.TryParse(agentPortStr, out var agentPort); | ||
int? agentPort = int.TryParse(agentPortStr, out var port) ? port : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the actual bug, everything else is just testing and refactoring
/// <summary> | ||
/// Testing for the parts of exporter settings that are shared between Datadog.Trace and the dd-dotnet tool | ||
/// </summary> | ||
public partial class ExporterSettingsTests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the tests in here are cut-and-paste directly from ExporterSettings
/// <summary> | ||
/// Testing for the parts of exporter settings that is specific to Datadog.Trace (not the dd-dotnet tool) | ||
/// </summary> | ||
public partial class ExporterSettingsTests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything left in here is stuff that is specific to the tracer implementation (i.e. metrics etc) and is not available in the dd-dotnet
implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Datadog ReportAll test runs ✅ 2 Total Test Services: 0 Failed, 2 Passed Test Services
|
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:
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 (7044) - mean (68ms) : 65, 72
. : milestone, 68,
master - mean (68ms) : 65, 71
. : milestone, 68,
section CallTarget+Inlining+NGEN
This PR (7044) - mean (1,010ms) : 982, 1038
. : milestone, 1010,
master - mean (1,005ms) : 981, 1030
. : milestone, 1005,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (7044) - mean (103ms) : 101, 105
. : milestone, 103,
master - mean (102ms) : 100, 104
. : milestone, 102,
section CallTarget+Inlining+NGEN
This PR (7044) - mean (694ms) : 675, 713
. : milestone, 694,
master - mean (692ms) : 670, 714
. : milestone, 692,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (7044) - mean (89ms) : 87, 92
. : milestone, 89,
master - mean (89ms) : 87, 91
. : milestone, 89,
section CallTarget+Inlining+NGEN
This PR (7044) - mean (651ms) : 635, 666
. : milestone, 651,
master - mean (657ms) : 639, 674
. : milestone, 657,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (7044) - mean (190ms) : 186, 194
. : milestone, 190,
master - mean (189ms) : 185, 193
. : milestone, 189,
section CallTarget+Inlining+NGEN
This PR (7044) - mean (1,111ms) : 1087, 1135
. : milestone, 1111,
master - mean (1,112ms) : 1086, 1139
. : milestone, 1112,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (7044) - mean (269ms) : 264, 274
. : milestone, 269,
master - mean (274ms) : 252, 296
. : milestone, 274,
section CallTarget+Inlining+NGEN
This PR (7044) - mean (879ms) : 847, 911
. : milestone, 879,
master - mean (882ms) : 855, 910
. : milestone, 882,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (7044) - mean (262ms) : 259, 265
. : milestone, 262,
master - mean (262ms) : 258, 267
. : milestone, 262,
section CallTarget+Inlining+NGEN
This PR (7044) - mean (869ms) : 841, 897
. : milestone, 869,
master - mean (872ms) : 835, 909
. : milestone, 872,
|
BenchmarksBenchmarks Report for benchmark platform 🐌Benchmarks for #99 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Fewer allocations 🎉
|
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 | 6.22 KB | 6.17 KB | -42 B | -0.68% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartStopWithChild |
net6.0 | 10.3μs | 54.7ns | 346ns | 0 | 0 | 0 | 5.54 KB |
master | StartStopWithChild |
netcoreapp3.1 | 12.8μs | 38.9ns | 140ns | 0 | 0 | 0 | 5.75 KB |
master | StartStopWithChild |
net472 | 22.3μs | 119ns | 619ns | 0.965 | 0.214 | 0 | 6.22 KB |
#99 | StartStopWithChild |
net6.0 | 10.6μs | 53.1ns | 254ns | 0 | 0 | 0 | 5.55 KB |
#99 | StartStopWithChild |
netcoreapp3.1 | 13.9μs | 67.6ns | 287ns | 0 | 0 | 0 | 5.75 KB |
#99 | StartStopWithChild |
net472 | 21.7μs | 120ns | 709ns | 0.891 | 0.334 | 0 | 6.17 KB |
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Fewer allocations 🎉
Fewer allocations 🎉 in #99
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472
3.33 KB
3.31 KB
-23 B
-0.69%
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 | 3.33 KB | 3.31 KB | -23 B | -0.69% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 925μs | 62ns | 223ns | 0 | 0 | 0 | 2.71 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.03ms | 42.3ns | 153ns | 0 | 0 | 0 | 2.7 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 1.26ms | 323ns | 1.25μs | 0 | 0 | 0 | 3.33 KB |
#99 | WriteAndFlushEnrichedTraces |
net6.0 | 924μs | 52.5ns | 182ns | 0 | 0 | 0 | 2.7 KB |
#99 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 1.02ms | 95.8ns | 332ns | 0 | 0 | 0 | 2.7 KB |
#99 | WriteAndFlushEnrichedTraces |
net472 | 1.21ms | 263ns | 1.02μs | 0 | 0 | 0 | 3.31 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 | 329μs | 186ns | 695ns | 0 | 0 | 0 | 197.06 KB |
master | AllCycleSimpleBody |
netcoreapp3.1 | 500μs | 1.76μs | 6.81μs | 0 | 0 | 0 | 204.77 KB |
master | AllCycleSimpleBody |
net472 | 442μs | 186ns | 719ns | 36.6 | 2.16 | 0 | 236.35 KB |
master | AllCycleMoreComplexBody |
net6.0 | 337μs | 1.48μs | 5.74μs | 0 | 0 | 0 | 200.56 KB |
master | AllCycleMoreComplexBody |
netcoreapp3.1 | 493μs | 2.25μs | 8.72μs | 0 | 0 | 0 | 208.18 KB |
master | AllCycleMoreComplexBody |
net472 | 448μs | 172ns | 667ns | 37.9 | 2.23 | 0 | 239.88 KB |
master | ObjectExtractorSimpleBody |
net6.0 | 338ns | 0.159ns | 0.573ns | 0 | 0 | 0 | 280 B |
master | ObjectExtractorSimpleBody |
netcoreapp3.1 | 394ns | 2.14ns | 11.7ns | 0 | 0 | 0 | 272 B |
master | ObjectExtractorSimpleBody |
net472 | 308ns | 0.018ns | 0.0674ns | 0.0435 | 0 | 0 | 281 B |
master | ObjectExtractorMoreComplexBody |
net6.0 | 6.26μs | 31.6ns | 134ns | 0 | 0 | 0 | 3.78 KB |
master | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.82μs | 39.6ns | 194ns | 0 | 0 | 0 | 3.69 KB |
master | ObjectExtractorMoreComplexBody |
net472 | 6.67μs | 1.34ns | 4.65ns | 0.571 | 0 | 0 | 3.8 KB |
#99 | AllCycleSimpleBody |
net6.0 | 330μs | 1.36μs | 5.78μs | 0 | 0 | 0 | 197.06 KB |
#99 | AllCycleSimpleBody |
netcoreapp3.1 | 499μs | 2.25μs | 8.72μs | 0 | 0 | 0 | 204.77 KB |
#99 | AllCycleSimpleBody |
net472 | 453μs | 353ns | 1.37μs | 35.7 | 2.23 | 0 | 236.37 KB |
#99 | AllCycleMoreComplexBody |
net6.0 | 342μs | 1.88μs | 10.6μs | 0 | 0 | 0 | 200.56 KB |
#99 | AllCycleMoreComplexBody |
netcoreapp3.1 | 521μs | 918ns | 3.55μs | 0 | 0 | 0 | 208.18 KB |
#99 | AllCycleMoreComplexBody |
net472 | 463μs | 170ns | 659ns | 37 | 0 | 0 | 239.87 KB |
#99 | ObjectExtractorSimpleBody |
net6.0 | 331ns | 1.68ns | 7.49ns | 0 | 0 | 0 | 280 B |
#99 | ObjectExtractorSimpleBody |
netcoreapp3.1 | 396ns | 2.08ns | 9.96ns | 0 | 0 | 0 | 272 B |
#99 | ObjectExtractorSimpleBody |
net472 | 303ns | 0.0533ns | 0.206ns | 0.0444 | 0 | 0 | 281 B |
#99 | ObjectExtractorMoreComplexBody |
net6.0 | 6.41μs | 32.6ns | 149ns | 0 | 0 | 0 | 3.78 KB |
#99 | ObjectExtractorMoreComplexBody |
netcoreapp3.1 | 7.82μs | 3.27ns | 12.7ns | 0 | 0 | 0 | 3.69 KB |
#99 | ObjectExtractorMoreComplexBody |
net472 | 6.7μs | 2.65ns | 9.9ns | 0.603 | 0 | 0 | 3.8 KB |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Unknown 🤷 More allocations ⚠️
More allocations ⚠️ in #99
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs‑net6.0
0 b
32.41 KB
32.41 KB
∞
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs‑netcoreapp3.1
0 b
32.4 KB
32.4 KB
∞
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs‑net472
0 b
32.5 KB
32.5 KB
∞
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net6.0
0 b
2.16 KB
2.16 KB
∞
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑netcoreapp3.1
0 b
2.14 KB
2.14 KB
∞
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net472
0 b
2.17 KB
2.17 KB
∞
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs‑net6.0 | 0 b | 32.41 KB | 32.41 KB | ∞ |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs‑netcoreapp3.1 | 0 b | 32.4 KB | 32.4 KB | ∞ |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs‑net472 | 0 b | 32.5 KB | 32.5 KB | ∞ |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net6.0 | 0 b | 2.16 KB | 2.16 KB | ∞ |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑netcoreapp3.1 | 0 b | 2.14 KB | 2.14 KB | ∞ |
Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs‑net472 | 0 b | 2.17 KB | 2.17 KB | ∞ |
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 |
#99 | EncodeArgs |
net6.0 | 72.7μs | 266ns | 1.03μs | 0 | 0 | 0 | 32.41 KB |
#99 | EncodeArgs |
netcoreapp3.1 | 95.2μs | 336ns | 1.3μs | 0 | 0 | 0 | 32.4 KB |
#99 | EncodeArgs |
net472 | 104μs | 54.4ns | 211ns | 4.68 | 0 | 0 | 32.5 KB |
#99 | EncodeLegacyArgs |
net6.0 | 143μs | 131ns | 489ns | 0 | 0 | 0 | 2.16 KB |
#99 | EncodeLegacyArgs |
netcoreapp3.1 | 198μs | 137ns | 530ns | 0 | 0 | 0 | 2.14 KB |
#99 | EncodeLegacyArgs |
net472 | 261μs | 49.2ns | 191ns | 0 | 0 | 0 | 2.17 KB |
Benchmarks.Trace.Asm.AppSecWafBenchmark - Unknown 🤷 More allocations ⚠️
More allocations ⚠️ in #99
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net6.0
0 b
4.55 KB
4.55 KB
∞
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1
0 b
4.48 KB
4.48 KB
∞
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net472
0 b
4.66 KB
4.66 KB
∞
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net6.0
0 b
2.24 KB
2.24 KB
∞
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1
0 b
2.22 KB
2.22 KB
∞
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net472
0 b
2.28 KB
2.28 KB
∞
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net6.0 | 0 b | 4.55 KB | 4.55 KB | ∞ |
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 | 0 b | 4.48 KB | 4.48 KB | ∞ |
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑net472 | 0 b | 4.66 KB | 4.66 KB | ∞ |
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net6.0 | 0 b | 2.24 KB | 2.24 KB | ∞ |
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑netcoreapp3.1 | 0 b | 2.22 KB | 2.22 KB | ∞ |
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack‑net472 | 0 b | 2.28 KB | 2.28 KB | ∞ |
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 |
#99 | RunWafRealisticBenchmark |
net6.0 | 269μs | 73ns | 283ns | 0 | 0 | 0 | 4.55 KB |
#99 | RunWafRealisticBenchmark |
netcoreapp3.1 | 294μs | 374ns | 1.4μs | 0 | 0 | 0 | 4.48 KB |
#99 | RunWafRealisticBenchmark |
net472 | 308μs | 51.3ns | 185ns | 0 | 0 | 0 | 4.66 KB |
#99 | RunWafRealisticBenchmarkWithAttack |
net6.0 | 182μs | 57.3ns | 214ns | 0 | 0 | 0 | 2.24 KB |
#99 | RunWafRealisticBenchmarkWithAttack |
netcoreapp3.1 | 193μs | 54.6ns | 189ns | 0 | 0 | 0 | 2.22 KB |
#99 | RunWafRealisticBenchmarkWithAttack |
net472 | 207μs | 20.6ns | 71.5ns | 0 | 0 | 0 | 2.28 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μs | 155ns | 582ns | 0 | 0 | 0 | 14.53 KB |
master | SendRequest |
netcoreapp3.1 | 71.7μs | 347ns | 1.84μs | 0 | 0 | 0 | 17.42 KB |
master | SendRequest |
net472 | 0.0114ns | 0.00164ns | 0.00634ns | 0 | 0 | 0 | 0 b |
#99 | SendRequest |
net6.0 | 61.8μs | 111ns | 401ns | 0 | 0 | 0 | 14.53 KB |
#99 | SendRequest |
netcoreapp3.1 | 71.4μs | 344ns | 1.38μs | 0 | 0 | 0 | 17.45 KB |
#99 | SendRequest |
net472 | 0.011ns | 0.00212ns | 0.00821ns | 0 | 0 | 0 | 0 b |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #99
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1
41.98 KB
42.36 KB
381 B
0.91%
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0
41.64 KB
41.86 KB
219 B
0.53%
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 41.98 KB | 42.36 KB | 381 B | 0.91% |
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.64 KB | 41.86 KB | 219 B | 0.53% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 741μs | 3.45μs | 13.4μs | 0 | 0 | 0 | 41.64 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 660μs | 580ns | 2.01μs | 0 | 0 | 0 | 41.98 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 1ms | 5.43μs | 29.2μs | 4.46 | 0 | 0 | 55.84 KB |
#99 | WriteAndFlushEnrichedTraces |
net6.0 | 672μs | 3.67μs | 20.8μs | 0 | 0 | 0 | 41.86 KB |
#99 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 637μs | 2.19μs | 11.6μs | 0 | 0 | 0 | 42.36 KB |
#99 | WriteAndFlushEnrichedTraces |
net472 | 906μs | 2.87μs | 10.8μs | 4.81 | 0 | 0 | 55.68 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.9μs | 9.03ns | 38.3ns | 0 | 0 | 0 | 1.03 KB |
master | ExecuteNonQuery |
netcoreapp3.1 | 2.47μs | 9.49ns | 36.8ns | 0 | 0 | 0 | 1.02 KB |
master | ExecuteNonQuery |
net472 | 2.83μs | 7.79ns | 30.2ns | 0.154 | 0.014 | 0 | 995 B |
#99 | ExecuteNonQuery |
net6.0 | 1.88μs | 1.21ns | 4.54ns | 0 | 0 | 0 | 1.03 KB |
#99 | ExecuteNonQuery |
netcoreapp3.1 | 2.48μs | 11.1ns | 43.1ns | 0 | 0 | 0 | 1.02 KB |
#99 | ExecuteNonQuery |
net472 | 2.72μs | 3.26ns | 12.6ns | 0.148 | 0.0134 | 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.79μs | 7.36ns | 28.5ns | 0 | 0 | 0 | 1.04 KB |
master | CallElasticsearch |
netcoreapp3.1 | 2.24μs | 10.3ns | 40ns | 0 | 0 | 0 | 1.04 KB |
master | CallElasticsearch |
net472 | 3.54μs | 2.27ns | 8.17ns | 0.159 | 0 | 0 | 1.05 KB |
master | CallElasticsearchAsync |
net6.0 | 1.78μs | 6.25ns | 24.2ns | 0 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
netcoreapp3.1 | 2.41μs | 9.53ns | 36.9ns | 0 | 0 | 0 | 1.09 KB |
master | CallElasticsearchAsync |
net472 | 3.77μs | 1.95ns | 7.54ns | 0.169 | 0 | 0 | 1.11 KB |
#99 | CallElasticsearch |
net6.0 | 1.89μs | 10.1ns | 53.6ns | 0 | 0 | 0 | 1.04 KB |
#99 | CallElasticsearch |
netcoreapp3.1 | 2.29μs | 11.2ns | 50.1ns | 0 | 0 | 0 | 1.04 KB |
#99 | CallElasticsearch |
net472 | 3.53μs | 2.57ns | 9.94ns | 0.158 | 0 | 0 | 1.05 KB |
#99 | CallElasticsearchAsync |
net6.0 | 1.87μs | 1.29ns | 4.84ns | 0 | 0 | 0 | 1.02 KB |
#99 | CallElasticsearchAsync |
netcoreapp3.1 | 2.38μs | 7.7ns | 29.8ns | 0 | 0 | 0 | 1.09 KB |
#99 | CallElasticsearchAsync |
net472 | 3.79μs | 5.75ns | 21.5ns | 0.171 | 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.78μs | 3.2ns | 12ns | 0 | 0 | 0 | 960 B |
master | ExecuteAsync |
netcoreapp3.1 | 2.29μs | 8.25ns | 31.9ns | 0 | 0 | 0 | 960 B |
master | ExecuteAsync |
net472 | 2.57μs | 0.932ns | 3.61ns | 0.142 | 0 | 0 | 923 B |
#99 | ExecuteAsync |
net6.0 | 1.84μs | 7.66ns | 29.7ns | 0 | 0 | 0 | 960 B |
#99 | ExecuteAsync |
netcoreapp3.1 | 2.31μs | 9.3ns | 36ns | 0 | 0 | 0 | 960 B |
#99 | ExecuteAsync |
net472 | 2.47μs | 2.6ns | 10.1ns | 0.137 | 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 | 7.19μs | 11.5ns | 44.5ns | 0 | 0 | 0 | 2.37 KB |
master | SendAsync |
netcoreapp3.1 | 8.75μs | 31.5ns | 122ns | 0 | 0 | 0 | 2.9 KB |
master | SendAsync |
net472 | 12.3μs | 14.1ns | 54.7ns | 0.494 | 0 | 0 | 3.19 KB |
#99 | SendAsync |
net6.0 | 7.04μs | 8.72ns | 32.6ns | 0 | 0 | 0 | 2.37 KB |
#99 | SendAsync |
netcoreapp3.1 | 8.25μs | 21.6ns | 83.8ns | 0 | 0 | 0 | 2.9 KB |
#99 | SendAsync |
net472 | 12.3μs | 9.21ns | 35.7ns | 0.49 | 0 | 0 | 3.19 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Slower ⚠️ More allocations ⚠️
Slower ⚠️ in #99
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0
1.126
467,800.00
526,650.00
More allocations ⚠️ in #99
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0
43.19 KB
43.52 KB
328 B
0.76%
Fewer allocations 🎉 in #99
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1
275.55 KB
272.67 KB
-2.88 KB
-1.05%
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 1.126 | 467,800.00 | 526,650.00 |
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 43.19 KB | 43.52 KB | 328 B | 0.76% |
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 275.55 KB | 272.67 KB | -2.88 KB | -1.05% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StringConcatBenchmark |
net6.0 | 44.8μs | 242ns | 1.28μs | 0 | 0 | 0 | 43.19 KB |
master | StringConcatBenchmark |
netcoreapp3.1 | 50μs | 296ns | 2.73μs | 0 | 0 | 0 | 86.54 KB |
master | StringConcatBenchmark |
net472 | 57.3μs | 246ns | 984ns | 0 | 0 | 0 | 57.34 KB |
master | StringConcatAspectBenchmark |
net6.0 | 470μs | 2.17μs | 7.82μs | 0 | 0 | 0 | 277.27 KB |
master | StringConcatAspectBenchmark |
netcoreapp3.1 | 519μs | 2.17μs | 8.42μs | 0 | 0 | 0 | 275.55 KB |
master | StringConcatAspectBenchmark |
net472 | 409μs | 2.08μs | 10.2μs | 0 | 0 | 0 | 286.72 KB |
#99 | StringConcatBenchmark |
net6.0 | 44.4μs | 256ns | 1.9μs | 0 | 0 | 0 | 43.52 KB |
#99 | StringConcatBenchmark |
netcoreapp3.1 | 49.9μs | 285ns | 2.5μs | 0 | 0 | 0 | 86.24 KB |
#99 | StringConcatBenchmark |
net472 | 57.2μs | 270ns | 1.11μs | 0 | 0 | 0 | 57.34 KB |
#99 | StringConcatAspectBenchmark |
net6.0 | 529μs | 1.78μs | 6.18μs | 0 | 0 | 0 | 278.12 KB |
#99 | StringConcatAspectBenchmark |
netcoreapp3.1 | 501μs | 2.2μs | 8.22μs | 0 | 0 | 0 | 272.67 KB |
#99 | StringConcatAspectBenchmark |
net472 | 416μs | 1.88μs | 7.27μs | 0 | 0 | 0 | 287.48 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.57μs | 9.97ns | 35.9ns | 0 | 0 | 0 | 1.76 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.72μs | 17.6ns | 72.7ns | 0 | 0 | 0 | 1.76 KB |
master | EnrichedLog |
net472 | 3.96μs | 5.46ns | 20.4ns | 0.256 | 0 | 0 | 1.69 KB |
#99 | EnrichedLog |
net6.0 | 2.58μs | 7.31ns | 28.3ns | 0 | 0 | 0 | 1.76 KB |
#99 | EnrichedLog |
netcoreapp3.1 | 3.53μs | 13ns | 50.4ns | 0 | 0 | 0 | 1.76 KB |
#99 | EnrichedLog |
net472 | 4.05μs | 3.05ns | 11ns | 0.262 | 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 | 123μs | 54.9ns | 198ns | 0 | 0 | 0 | 4.37 KB |
master | EnrichedLog |
netcoreapp3.1 | 128μs | 61.6ns | 230ns | 0 | 0 | 0 | 4.37 KB |
master | EnrichedLog |
net472 | 168μs | 59.9ns | 232ns | 0 | 0 | 0 | 4.57 KB |
#99 | EnrichedLog |
net6.0 | 123μs | 172ns | 644ns | 0 | 0 | 0 | 4.37 KB |
#99 | EnrichedLog |
netcoreapp3.1 | 129μs | 508ns | 2.03μs | 0 | 0 | 0 | 4.37 KB |
#99 | EnrichedLog |
net472 | 167μs | 140ns | 505ns | 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.04μs | 20.8ns | 77.7ns | 0 | 0 | 0 | 2.32 KB |
master | EnrichedLog |
netcoreapp3.1 | 6.56μs | 21.4ns | 80ns | 0 | 0 | 0 | 2.32 KB |
master | EnrichedLog |
net472 | 7.66μs | 7.85ns | 30.4ns | 0.306 | 0 | 0 | 2.14 KB |
#99 | EnrichedLog |
net6.0 | 4.94μs | 22.1ns | 85.5ns | 0 | 0 | 0 | 2.32 KB |
#99 | EnrichedLog |
netcoreapp3.1 | 6.53μs | 4.43ns | 17.2ns | 0 | 0 | 0 | 2.32 KB |
#99 | EnrichedLog |
net472 | 7.41μs | 6.46ns | 25ns | 0.338 | 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 | 2μs | 2.46ns | 9.53ns | 0 | 0 | 0 | 1.21 KB |
master | SendReceive |
netcoreapp3.1 | 2.61μs | 12.9ns | 53ns | 0 | 0 | 0 | 1.21 KB |
master | SendReceive |
net472 | 3.13μs | 1.47ns | 5.69ns | 0.187 | 0 | 0 | 1.21 KB |
#99 | SendReceive |
net6.0 | 1.94μs | 3.53ns | 13.7ns | 0 | 0 | 0 | 1.21 KB |
#99 | SendReceive |
netcoreapp3.1 | 2.54μs | 13.1ns | 63ns | 0 | 0 | 0 | 1.21 KB |
#99 | SendReceive |
net472 | 3.28μs | 4.11ns | 14.8ns | 0.18 | 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.06μs | 1.06ns | 3.67ns | 0 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 5.56μs | 7.29ns | 28.2ns | 0 | 0 | 0 | 1.69 KB |
master | EnrichedLog |
net472 | 6.86μs | 5.61ns | 21.7ns | 0.307 | 0 | 0 | 2.08 KB |
#99 | EnrichedLog |
net6.0 | 4.14μs | 9.82ns | 38ns | 0 | 0 | 0 | 1.64 KB |
#99 | EnrichedLog |
netcoreapp3.1 | 5.53μs | 7.55ns | 29.2ns | 0 | 0 | 0 | 1.69 KB |
#99 | EnrichedLog |
net472 | 6.64μs | 3.97ns | 15.4ns | 0.331 | 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 | 746ns | 4.17ns | 23.2ns | 0 | 0 | 0 | 584 B |
master | StartFinishSpan |
netcoreapp3.1 | 974ns | 1.28ns | 4.95ns | 0 | 0 | 0 | 584 B |
master | StartFinishSpan |
net472 | 907ns | 0.12ns | 0.467ns | 0.0913 | 0 | 0 | 586 B |
master | StartFinishScope |
net6.0 | 899ns | 0.252ns | 0.873ns | 0 | 0 | 0 | 704 B |
master | StartFinishScope |
netcoreapp3.1 | 1.16μs | 5.34ns | 21.4ns | 0 | 0 | 0 | 704 B |
master | StartFinishScope |
net472 | 1.12μs | 0.161ns | 0.622ns | 0.103 | 0 | 0 | 666 B |
#99 | StartFinishSpan |
net6.0 | 781ns | 0.198ns | 0.713ns | 0 | 0 | 0 | 584 B |
#99 | StartFinishSpan |
netcoreapp3.1 | 927ns | 4.88ns | 25.8ns | 0 | 0 | 0 | 584 B |
#99 | StartFinishSpan |
net472 | 936ns | 0.707ns | 2.74ns | 0.0892 | 0 | 0 | 586 B |
#99 | StartFinishScope |
net6.0 | 907ns | 0.238ns | 0.923ns | 0 | 0 | 0 | 704 B |
#99 | StartFinishScope |
netcoreapp3.1 | 1.17μs | 6.07ns | 27.8ns | 0 | 0 | 0 | 704 B |
#99 | StartFinishScope |
net472 | 1.1μs | 0.269ns | 1.04ns | 0.105 | 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μs | 4.83ns | 19.9ns | 0 | 0 | 0 | 704 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 1.38μs | 7.18ns | 33.7ns | 0 | 0 | 0 | 704 B |
master | RunOnMethodBegin |
net472 | 1.37μs | 0.115ns | 0.415ns | 0.103 | 0 | 0 | 666 B |
#99 | RunOnMethodBegin |
net6.0 | 1.03μs | 5.12ns | 23.5ns | 0 | 0 | 0 | 704 B |
#99 | RunOnMethodBegin |
netcoreapp3.1 | 1.38μs | 6.43ns | 25.7ns | 0 | 0 | 0 | 704 B |
#99 | RunOnMethodBegin |
net472 | 1.35μs | 0.104ns | 0.402ns | 0.102 | 0 | 0 | 666 B |
Summary of changes
ExporterSettingsTests
so that we test thedd-dotnet
implementation tooExporterSettingsTests
withdd-dotnet
testsdd-dotnet
'sExporterSettings
Reason for change
We had a report that the
dd-dotnet
tool was using the wrong port when only theDD_AGENT_HOST
value was provided (andDD_TRACE_AGENT_PORT
or similar was not provided). Note that this only affected thedd-dotnet check process
commands et al. The tracer itself is functioning correctly:The reason for the discrepancy is that
dd-dotnet
uses various "slimmed down" objects that are compatible with NativeAOT and various other aspects. There was a bug in this code which was defaulting the port to0
.To make sure there were no other lingering issues, I refactored the existing
ExporterSettingsTests
file by splitting it in two (much as we do forExporterSettings
) so that we can run the applicable tests against both of theExporterSettings
tests (thedd-dotnet
version doesn't care about metrics etc currently, for example).Implementation details
ExporterSettingsTests
andExporterSettingsTests.Shared
dd-dotnet
's slimmed-downExporterSettings
dd-dotnet
's slimmed-downExporterSettings
Test coverage
More now
Other details