-
Notifications
You must be signed in to change notification settings - Fork 140
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
Tiny cleanup of static Tracer
instance usages
#4936
Conversation
Datadog ReportBranch report: ✅ |
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.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4936) - mean (68ms) : 64, 73
. : milestone, 68,
master - mean (69ms) : 61, 77
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (4936) - mean (1,005ms) : 983, 1026
. : milestone, 1005,
master - mean (1,003ms) : 978, 1028
. : milestone, 1003,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4936) - mean (106ms) : 103, 109
. : milestone, 106,
master - mean (106ms) : 103, 109
. : milestone, 106,
section CallTarget+Inlining+NGEN
This PR (4936) - mean (689ms) : 674, 704
. : milestone, 689,
master - mean (685ms) : 667, 703
. : milestone, 685,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4936) - mean (90ms) : 88, 92
. : milestone, 90,
master - mean (90ms) : 86, 94
. : milestone, 90,
section CallTarget+Inlining+NGEN
This PR (4936) - mean (663ms) : 639, 686
. : milestone, 663,
master - mean (659ms) : 635, 682
. : milestone, 659,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4936) - mean (189ms) : 185, 193
. : milestone, 189,
master - mean (189ms) : 186, 191
. : milestone, 189,
section CallTarget+Inlining+NGEN
This PR (4936) - mean (1,132ms) : 1112, 1153
. : milestone, 1132,
master - mean (1,132ms) : 1111, 1153
. : milestone, 1132,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4936) - mean (273ms) : 269, 277
. : milestone, 273,
master - mean (272ms) : 269, 275
. : milestone, 272,
section CallTarget+Inlining+NGEN
This PR (4936) - mean (1,096ms) : 1075, 1116
. : milestone, 1096,
master - mean (1,094ms) : 1069, 1119
. : milestone, 1094,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4936) - mean (262ms) : 257, 267
. : milestone, 262,
master - mean (262ms) : 259, 265
. : milestone, 262,
section CallTarget+Inlining+NGEN
This PR (4936) - mean (1,059ms) : 1035, 1082
. : milestone, 1059,
master - mean (1,061ms) : 1031, 1091
. : milestone, 1061,
|
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.
Looks good to me!
Benchmarks Report 🐌Benchmarks for #4936 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 ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Fewer allocations 🎉
|
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.89 KB | 41.51 KB | -378 B | -0.90% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 571μs | 1.72μs | 6.68μs | 0.566 | 0 | 0 | 41.89 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 652μs | 665ns | 2.49μs | 0.332 | 0 | 0 | 41.72 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 818μs | 3.07μs | 11.9μs | 8.22 | 2.47 | 0.411 | 53.25 KB |
#4936 | WriteAndFlushEnrichedTraces |
net6.0 | 545μs | 230ns | 862ns | 0.607 | 0 | 0 | 41.51 KB |
#4936 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 655μs | 359ns | 1.29μs | 0.329 | 0 | 0 | 41.82 KB |
#4936 | WriteAndFlushEnrichedTraces |
net472 | 827μs | 2.63μs | 9.84μs | 8.28 | 2.48 | 0.414 | 53.26 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.16μs | 0.586ns | 2.27ns | 0.0104 | 0 | 0 | 768 B |
master | ExecuteNonQuery |
netcoreapp3.1 | 1.45μs | 0.879ns | 3.4ns | 0.0103 | 0 | 0 | 768 B |
master | ExecuteNonQuery |
net472 | 1.72μs | 3.4ns | 13.2ns | 0.116 | 0 | 0 | 730 B |
#4936 | ExecuteNonQuery |
net6.0 | 1.2μs | 0.592ns | 2.29ns | 0.0108 | 0 | 0 | 768 B |
#4936 | ExecuteNonQuery |
netcoreapp3.1 | 1.41μs | 0.703ns | 2.72ns | 0.0106 | 0 | 0 | 768 B |
#4936 | ExecuteNonQuery |
net472 | 1.79μs | 1.02ns | 3.95ns | 0.115 | 0 | 0 | 730 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.13μs | 0.626ns | 2.34ns | 0.0133 | 0 | 0 | 936 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.52μs | 0.877ns | 3.28ns | 0.0128 | 0 | 0 | 936 B |
master | CallElasticsearch |
net472 | 2.46μs | 0.945ns | 3.66ns | 0.152 | 0 | 0 | 955 B |
master | CallElasticsearchAsync |
net6.0 | 1.23μs | 0.438ns | 1.69ns | 0.0123 | 0 | 0 | 912 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.64μs | 0.594ns | 2.22ns | 0.0131 | 0 | 0 | 984 B |
master | CallElasticsearchAsync |
net472 | 2.47μs | 1.14ns | 4.43ns | 0.16 | 0 | 0 | 1.01 KB |
#4936 | CallElasticsearch |
net6.0 | 1.22μs | 0.511ns | 1.98ns | 0.0134 | 0 | 0 | 936 B |
#4936 | CallElasticsearch |
netcoreapp3.1 | 1.52μs | 1.35ns | 5.04ns | 0.0122 | 0 | 0 | 936 B |
#4936 | CallElasticsearch |
net472 | 2.57μs | 0.721ns | 2.7ns | 0.151 | 0 | 0 | 955 B |
#4936 | CallElasticsearchAsync |
net6.0 | 1.27μs | 0.742ns | 2.57ns | 0.0127 | 0 | 0 | 912 B |
#4936 | CallElasticsearchAsync |
netcoreapp3.1 | 1.6μs | 0.957ns | 3.32ns | 0.0129 | 0 | 0 | 984 B |
#4936 | CallElasticsearchAsync |
net472 | 2.57μs | 0.596ns | 2.23ns | 0.16 | 0 | 0 | 1.01 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.32μs | 0.765ns | 2.86ns | 0.0125 | 0 | 0 | 912 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.64μs | 0.729ns | 2.73ns | 0.0123 | 0 | 0 | 912 B |
master | ExecuteAsync |
net472 | 1.81μs | 1.71ns | 6.61ns | 0.138 | 0 | 0 | 875 B |
#4936 | ExecuteAsync |
net6.0 | 1.24μs | 0.904ns | 3.38ns | 0.0124 | 0 | 0 | 912 B |
#4936 | ExecuteAsync |
netcoreapp3.1 | 1.58μs | 0.628ns | 2.43ns | 0.0126 | 0 | 0 | 912 B |
#4936 | ExecuteAsync |
net472 | 1.79μs | 1.74ns | 6.74ns | 0.139 | 0 | 0 | 875 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 | 4.12μs | 1.2ns | 4.65ns | 0.0288 | 0 | 0 | 2.1 KB |
master | SendAsync |
netcoreapp3.1 | 4.93μs | 1.18ns | 4.24ns | 0.0345 | 0 | 0 | 2.63 KB |
master | SendAsync |
net472 | 7.68μs | 2.02ns | 7.83ns | 0.522 | 0 | 0 | 3.31 KB |
#4936 | SendAsync |
net6.0 | 4.15μs | 12.1ns | 45.2ns | 0.0285 | 0 | 0 | 2.1 KB |
#4936 | SendAsync |
netcoreapp3.1 | 4.99μs | 1.85ns | 7.17ns | 0.0349 | 0 | 0 | 2.63 KB |
#4936 | SendAsync |
net472 | 7.77μs | 2.6ns | 10.1ns | 0.525 | 0 | 0 | 3.31 KB |
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️
More allocations ⚠️ in #4936
Benchmark
Base Allocated
Diff Allocated
Change
Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark(parameters: System.Collections.Generic.List`1[System.String])‑net472
58.26 KB
59.7 KB
1.43 KB
2.46%
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark(parameters: System.Collections.Generic.List`1[System.String])‑net472 | 58.26 KB | 59.7 KB | 1.43 KB | 2.46% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StringConcatBenchmark(parameters=Syste(...)ring] [48]) |
net6.0 | 60.3μs | 770ns | 7.63μs | 0 | 0 | 0 | 43.44 KB |
master | StringConcatBenchmark(parameters=Syste(...)ring] [48]) |
netcoreapp3.1 | 53.2μs | 119ns | 461ns | 0 | 0 | 0 | 42.64 KB |
master | StringConcatBenchmark(parameters=Syste(...)ring] [48]) |
net472 | 37.8μs | 97.8ns | 366ns | 0 | 0 | 0 | 58.26 KB |
master | StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) |
net6.0 | 98.8μs | 2.72μs | 27.2μs | 0 | 0 | 0 | 43.29 KB |
master | StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) |
netcoreapp3.1 | 97.1μs | 2.8μs | 28μs | 0 | 0 | 0 | 42.64 KB |
master | StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) |
net472 | 61.9μs | 284ns | 1.06μs | 0 | 0 | 0 | 57.34 KB |
#4936 | StringConcatBenchmark(parameters=Syste(...)ring] [48]) |
net6.0 | 60.8μs | 827ns | 8.1μs | 0 | 0 | 0 | 43.44 KB |
#4936 | StringConcatBenchmark(parameters=Syste(...)ring] [48]) |
netcoreapp3.1 | 53.5μs | 236ns | 1.11μs | 0 | 0 | 0 | 42.64 KB |
#4936 | StringConcatBenchmark(parameters=Syste(...)ring] [48]) |
net472 | 37.4μs | 90.9ns | 340ns | 0 | 0 | 0 | 59.7 KB |
#4936 | StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) |
net6.0 | 81.4μs | 2.77μs | 27.7μs | 0 | 0 | 0 | 43.29 KB |
#4936 | StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) |
netcoreapp3.1 | 103μs | 3.54μs | 35.1μs | 0 | 0 | 0 | 42.64 KB |
#4936 | StringConcatAspectBenchmark(parameters=Syste(...)ring] [48]) |
net472 | 62.7μs | 308ns | 1.31μs | 0 | 0 | 0 | 57.34 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 | 1.49μs | 0.682ns | 2.55ns | 0.0218 | 0 | 0 | 1.57 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.15μs | 0.695ns | 2.41ns | 0.0215 | 0 | 0 | 1.57 KB |
master | EnrichedLog |
net472 | 2.54μs | 2.87ns | 11.1ns | 0.238 | 0 | 0 | 1.5 KB |
#4936 | EnrichedLog |
net6.0 | 1.4μs | 0.397ns | 1.43ns | 0.0222 | 0 | 0 | 1.57 KB |
#4936 | EnrichedLog |
netcoreapp3.1 | 2.17μs | 0.969ns | 3.63ns | 0.0217 | 0 | 0 | 1.57 KB |
#4936 | EnrichedLog |
net472 | 2.48μs | 2.03ns | 7.87ns | 0.237 | 0 | 0 | 1.5 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 | 113μs | 165ns | 638ns | 0.0564 | 0 | 0 | 4.21 KB |
master | EnrichedLog |
netcoreapp3.1 | 119μs | 314ns | 1.22μs | 0.0597 | 0 | 0 | 4.21 KB |
master | EnrichedLog |
net472 | 148μs | 146ns | 564ns | 0.667 | 0.222 | 0 | 4.39 KB |
#4936 | EnrichedLog |
net6.0 | 114μs | 152ns | 587ns | 0.0564 | 0 | 0 | 4.21 KB |
#4936 | EnrichedLog |
netcoreapp3.1 | 120μs | 144ns | 540ns | 0.0598 | 0 | 0 | 4.21 KB |
#4936 | EnrichedLog |
net472 | 146μs | 102ns | 383ns | 0.66 | 0.22 | 0 | 4.39 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 | 3.1μs | 1.45ns | 5.42ns | 0.0288 | 0 | 0 | 2.13 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.22μs | 3.68ns | 14.3ns | 0.0278 | 0 | 0 | 2.13 KB |
master | EnrichedLog |
net472 | 4.84μs | 4.21ns | 16.3ns | 0.307 | 0 | 0 | 1.95 KB |
#4936 | EnrichedLog |
net6.0 | 3.05μs | 1.3ns | 4.88ns | 0.0289 | 0 | 0 | 2.13 KB |
#4936 | EnrichedLog |
netcoreapp3.1 | 4.2μs | 2.61ns | 10.1ns | 0.0291 | 0 | 0 | 2.13 KB |
#4936 | EnrichedLog |
net472 | 4.81μs | 5.57ns | 21.6ns | 0.308 | 0 | 0 | 1.95 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.34μs | 0.903ns | 3.38ns | 0.0154 | 0 | 0 | 1.1 KB |
master | SendReceive |
netcoreapp3.1 | 1.74μs | 1.13ns | 4.37ns | 0.0151 | 0 | 0 | 1.1 KB |
master | SendReceive |
net472 | 2.13μs | 1.61ns | 6.25ns | 0.176 | 0 | 0 | 1.12 KB |
#4936 | SendReceive |
net6.0 | 1.38μs | 1.23ns | 4.77ns | 0.0151 | 0 | 0 | 1.1 KB |
#4936 | SendReceive |
netcoreapp3.1 | 1.73μs | 0.911ns | 3.41ns | 0.0147 | 0 | 0 | 1.1 KB |
#4936 | SendReceive |
net472 | 2.07μs | 0.96ns | 3.72ns | 0.177 | 0 | 0 | 1.12 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 | 2.81μs | 0.717ns | 2.68ns | 0.0211 | 0 | 0 | 1.53 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.03μs | 1.66ns | 6.45ns | 0.0201 | 0 | 0 | 1.58 KB |
master | EnrichedLog |
net472 | 4.3μs | 1.22ns | 4.71ns | 0.31 | 0 | 0 | 1.97 KB |
#4936 | EnrichedLog |
net6.0 | 2.83μs | 0.871ns | 3.26ns | 0.0212 | 0 | 0 | 1.53 KB |
#4936 | EnrichedLog |
netcoreapp3.1 | 3.83μs | 2.05ns | 7.68ns | 0.021 | 0 | 0 | 1.58 KB |
#4936 | EnrichedLog |
net472 | 4.47μs | 1.8ns | 6.99ns | 0.311 | 0 | 0 | 1.97 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 | 521ns | 0.186ns | 0.719ns | 0.00741 | 0 | 0 | 536 B |
master | StartFinishSpan |
netcoreapp3.1 | 719ns | 0.251ns | 0.938ns | 0.00731 | 0 | 0 | 536 B |
master | StartFinishSpan |
net472 | 722ns | 0.417ns | 1.61ns | 0.0851 | 0 | 0 | 538 B |
master | StartFinishScope |
net6.0 | 564ns | 0.258ns | 1ns | 0.00917 | 0 | 0 | 656 B |
master | StartFinishScope |
netcoreapp3.1 | 862ns | 0.453ns | 1.75ns | 0.00895 | 0 | 0 | 656 B |
master | StartFinishScope |
net472 | 926ns | 0.374ns | 1.4ns | 0.0981 | 0 | 0 | 618 B |
#4936 | StartFinishSpan |
net6.0 | 503ns | 0.141ns | 0.508ns | 0.0076 | 0 | 0 | 536 B |
#4936 | StartFinishSpan |
netcoreapp3.1 | 679ns | 0.35ns | 1.31ns | 0.00725 | 0 | 0 | 536 B |
#4936 | StartFinishSpan |
net472 | 797ns | 0.181ns | 0.703ns | 0.0851 | 0 | 0 | 538 B |
#4936 | StartFinishScope |
net6.0 | 585ns | 0.204ns | 0.79ns | 0.00908 | 0 | 0 | 656 B |
#4936 | StartFinishScope |
netcoreapp3.1 | 908ns | 1.1ns | 4.25ns | 0.00888 | 0 | 0 | 656 B |
#4936 | StartFinishScope |
net472 | 968ns | 0.429ns | 1.66ns | 0.098 | 0 | 0 | 618 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 | 667ns | 0.276ns | 1.03ns | 0.00902 | 0 | 0 | 656 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 978ns | 0.274ns | 1.06ns | 0.00902 | 0 | 0 | 656 B |
master | RunOnMethodBegin |
net472 | 1.1μs | 0.419ns | 1.57ns | 0.098 | 0 | 0 | 618 B |
#4936 | RunOnMethodBegin |
net6.0 | 622ns | 0.17ns | 0.638ns | 0.00937 | 0 | 0 | 656 B |
#4936 | RunOnMethodBegin |
netcoreapp3.1 | 979ns | 0.371ns | 1.44ns | 0.00884 | 0 | 0 | 656 B |
#4936 | RunOnMethodBegin |
net472 | 1.11μs | 0.449ns | 1.74ns | 0.0976 | 0 | 0 | 618 B |
Throughput/Crank Report:zap:Throughput results for AspNetCoreSimpleController comparing the following branches/commits: Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red. Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards! gantt
title Throughput Linux x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4936) (10.832M) : 0, 10832114
master (11.077M) : 0, 11077020
benchmarks/2.9.0 (11.143M) : 0, 11142820
section Automatic
This PR (4936) (7.555M) : 0, 7555307
master (7.716M) : 0, 7715976
benchmarks/2.9.0 (8.193M) : 0, 8192573
section Trace stats
This PR (4936) (7.843M) : 0, 7843349
master (8.166M) : 0, 8165739
section Manual
This PR (4936) (9.258M) : crit ,0, 9257558
master (10.081M) : 0, 10081357
section Manual + Automatic
This PR (4936) (6.894M) : crit ,0, 6894107
master (7.302M) : 0, 7302104
section Version Conflict
This PR (4936) (6.034M) : crit ,0, 6034348
master (6.485M) : 0, 6484599
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4936) (9.339M) : 0, 9339328
master (9.329M) : 0, 9328988
benchmarks/2.9.0 (9.251M) : 0, 9251121
section Automatic
This PR (4936) (6.596M) : 0, 6596129
master (6.570M) : 0, 6569593
section Trace stats
This PR (4936) (6.851M) : 0, 6850642
master (6.706M) : 0, 6705822
section Manual
This PR (4936) (8.189M) : 0, 8189067
master (8.346M) : 0, 8345824
section Manual + Automatic
This PR (4936) (6.030M) : 0, 6030130
master (6.092M) : 0, 6092428
section Version Conflict
This PR (4936) (5.708M) : 0, 5708348
master (5.758M) : 0, 5757731
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4936) (10.885M) : 0, 10884606
master (10.683M) : 0, 10683420
benchmarks/2.9.0 (10.246M) : 0, 10245668
section Automatic
This PR (4936) (7.451M) : 0, 7451206
master (7.444M) : 0, 7444053
benchmarks/2.9.0 (7.548M) : 0, 7548392
section Trace stats
This PR (4936) (7.745M) : 0, 7745004
master (7.807M) : 0, 7806630
section Manual
This PR (4936) (9.589M) : 0, 9588509
master (9.421M) : 0, 9420919
section Manual + Automatic
This PR (4936) (7.219M) : 0, 7219202
master (7.146M) : 0, 7146261
section Version Conflict
This PR (4936) (6.449M) : 0, 6449464
master (6.484M) : 0, 6484232
gantt
title Throughput Linux x64 (ASM) (Total requests)
dateFormat X
axisFormat %s
section Baseline
master (7.443M) : 0, 7443080
benchmarks/2.9.0 (7.835M) : 0, 7834773
section No attack
master (2.004M) : 0, 2004124
benchmarks/2.9.0 (3.220M) : 0, 3219927
section Attack
master (1.575M) : 0, 1575145
benchmarks/2.9.0 (2.545M) : 0, 2545308
section Blocking
master (3.284M) : 0, 3284355
section IAST default
master (6.444M) : 0, 6444298
section IAST full
master (5.750M) : 0, 5750291
section Base vuln
master (0.967M) : 0, 967013
section IAST vuln
master (0.830M) : 0, 830046
|
@@ -61,8 +59,10 @@ private static void AgentConvertSpan<TInner>(TInner activity, Span span) | |||
} | |||
|
|||
// Fixup "version" tag | |||
if (Tracer.Instance.Settings.ServiceVersionInternal is 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.
Good catch.
@@ -38,6 +38,11 @@ public static class SpanExtensions | |||
public static void SetTraceSamplingPriority(this ISpan span, SamplingPriority samplingPriority) | |||
{ | |||
TelemetryFactory.Metrics.Record(PublicApiUsage.SpanExtensions_SetTraceSamplingPriority); | |||
SetTraceSamplingPriorityInternal(span, samplingPriority); |
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.
fwiw, I think longer term we should move away from using the SamplingPriority
enum or even numeric values (-1, 0, 1, 2) in the public API. From a user's perspective, it should be a Boolean keep/drop. Internally, we already use int
everywhere instead of SamplingPriority
.
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.
Sounds good to me! v3? 😄
Summary of changes
Tracer
instance associated with a span inOtelHelpers
Reason for change
While tracking down flakiness in a manual instrumentation sample I'm working on, I noticed that we're accessing the global tracer version. Technically that may have different settings than the tracer used to create the span, and we should use that instead AFAIK.
The "internal" methods are just to make it easier to incrementally work on the v3-public-api changes. Moving those changes here will reduce the footprint of the v3 PRs when they land.
Implementation details
We expose the tracer instance that created the span at
Span.Context.TracerContext.Tracer
.The other changes are just creating "internal" versions of methods
Test coverage
Should be covered by existing.
Other details