-
Notifications
You must be signed in to change notification settings - Fork 145
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
Fix alpine .NET Core 3.1 telemetry failures #6339
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 452139 Passed, 2715 Skipped, 19h 25m 11.41s Total Time |
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 (6339) - mean (71ms) : 65, 77
. : milestone, 71,
master - mean (71ms) : 64, 78
. : milestone, 71,
section CallTarget+Inlining+NGEN
This PR (6339) - mean (1,109ms) : 1089, 1128
. : milestone, 1109,
master - mean (1,109ms) : 1083, 1135
. : milestone, 1109,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6339) - mean (108ms) : 106, 111
. : milestone, 108,
master - mean (109ms) : 106, 112
. : milestone, 109,
section CallTarget+Inlining+NGEN
This PR (6339) - mean (762ms) : 750, 775
. : milestone, 762,
master - mean (772ms) : 752, 791
. : milestone, 772,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6339) - mean (92ms) : 90, 94
. : milestone, 92,
master - mean (92ms) : 91, 94
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (6339) - mean (721ms) : 706, 736
. : milestone, 721,
master - mean (726ms) : 711, 741
. : milestone, 726,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6339) - mean (191ms) : 187, 196
. : milestone, 191,
master - mean (192ms) : 186, 198
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (6339) - mean (1,213ms) : 1189, 1238
. : milestone, 1213,
master - mean (1,214ms) : 1192, 1237
. : milestone, 1214,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6339) - mean (278ms) : 273, 282
. : milestone, 278,
master - mean (278ms) : 272, 284
. : milestone, 278,
section CallTarget+Inlining+NGEN
This PR (6339) - mean (943ms) : 921, 965
. : milestone, 943,
master - mean (949ms) : 933, 965
. : milestone, 949,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6339) - mean (266ms) : 262, 269
. : milestone, 266,
master - mean (266ms) : 262, 270
. : milestone, 266,
section CallTarget+Inlining+NGEN
This PR (6339) - mean (929ms) : 910, 948
. : milestone, 929,
master - mean (931ms) : 914, 948
. : milestone, 931,
|
Benchmarks Report for tracer 🐌Benchmarks for #6339 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.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Faster 🎉 Same allocations ✔️
|
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 | 1.203 | 1,344.05 | 1,117.28 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
net6.0 | 1.34μs | 0.663ns | 2.48ns | 0.0135 | 0 | 0 | 976 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.65μs | 0.742ns | 2.78ns | 0.0131 | 0 | 0 | 976 B |
master | CallElasticsearch |
net472 | 2.62μs | 1.31ns | 5.09ns | 0.158 | 0 | 0 | 995 B |
master | CallElasticsearchAsync |
net6.0 | 1.38μs | 0.896ns | 3.35ns | 0.0131 | 0 | 0 | 952 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.72μs | 0.655ns | 2.36ns | 0.0138 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
net472 | 2.68μs | 0.647ns | 2.42ns | 0.166 | 0 | 0 | 1.05 KB |
#6339 | CallElasticsearch |
net6.0 | 1.12μs | 0.361ns | 1.4ns | 0.0135 | 0 | 0 | 976 B |
#6339 | CallElasticsearch |
netcoreapp3.1 | 1.63μs | 1.47ns | 5.51ns | 0.013 | 0 | 0 | 976 B |
#6339 | CallElasticsearch |
net472 | 2.53μs | 0.911ns | 3.53ns | 0.157 | 0 | 0 | 995 B |
#6339 | CallElasticsearchAsync |
net6.0 | 1.3μs | 0.462ns | 1.73ns | 0.013 | 0 | 0 | 952 B |
#6339 | CallElasticsearchAsync |
netcoreapp3.1 | 1.57μs | 1.09ns | 4.06ns | 0.0134 | 0 | 0 | 1.02 KB |
#6339 | CallElasticsearchAsync |
net472 | 2.61μs | 2.09ns | 8.09ns | 0.166 | 0 | 0 | 1.05 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.26μs | 0.543ns | 2.1ns | 0.0133 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.66μs | 1.3ns | 5.05ns | 0.0124 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 1.84μs | 0.301ns | 1.13ns | 0.145 | 0 | 0 | 915 B |
#6339 | ExecuteAsync |
net6.0 | 1.21μs | 0.775ns | 2.9ns | 0.0134 | 0 | 0 | 952 B |
#6339 | ExecuteAsync |
netcoreapp3.1 | 1.5μs | 0.752ns | 2.81ns | 0.0127 | 0 | 0 | 952 B |
#6339 | ExecuteAsync |
net472 | 1.78μs | 0.614ns | 2.21ns | 0.145 | 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 | 4.31μs | 1.21ns | 4.69ns | 0.0309 | 0 | 0 | 2.31 KB |
master | SendAsync |
netcoreapp3.1 | 5.29μs | 2.35ns | 9.09ns | 0.0372 | 0 | 0 | 2.85 KB |
master | SendAsync |
net472 | 7.39μs | 1.92ns | 7.43ns | 0.496 | 0 | 0 | 3.12 KB |
#6339 | SendAsync |
net6.0 | 4.35μs | 1.97ns | 7.37ns | 0.0327 | 0 | 0 | 2.31 KB |
#6339 | SendAsync |
netcoreapp3.1 | 5.3μs | 2.19ns | 8.47ns | 0.0373 | 0 | 0 | 2.85 KB |
#6339 | SendAsync |
net472 | 7.3μs | 2.77ns | 10.7ns | 0.493 | 0 | 0 | 3.12 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.53μs | 3.18ns | 12.3ns | 0.023 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.16μs | 1.2ns | 4.49ns | 0.0228 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.49μs | 1.29ns | 4.99ns | 0.249 | 0 | 0 | 1.57 KB |
#6339 | EnrichedLog |
net6.0 | 1.47μs | 1.18ns | 4.58ns | 0.0234 | 0 | 0 | 1.64 KB |
#6339 | EnrichedLog |
netcoreapp3.1 | 2.36μs | 2.65ns | 10.3ns | 0.0223 | 0 | 0 | 1.64 KB |
#6339 | EnrichedLog |
net472 | 2.7μs | 1.02ns | 3.94ns | 0.25 | 0 | 0 | 1.57 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 | 121μs | 108ns | 418ns | 0 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 124μs | 114ns | 442ns | 0.0636 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 153μs | 112ns | 434ns | 0.686 | 0.229 | 0 | 4.46 KB |
#6339 | EnrichedLog |
net6.0 | 121μs | 127ns | 492ns | 0.061 | 0 | 0 | 4.28 KB |
#6339 | EnrichedLog |
netcoreapp3.1 | 124μs | 106ns | 410ns | 0 | 0 | 0 | 4.28 KB |
#6339 | EnrichedLog |
net472 | 151μs | 138ns | 535ns | 0.676 | 0.225 | 0 | 4.46 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.09μs | 1.09ns | 4.21ns | 0.0309 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.12μs | 1.34ns | 5.18ns | 0.029 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 5.04μs | 1.16ns | 4.32ns | 0.319 | 0 | 0 | 2.02 KB |
#6339 | EnrichedLog |
net6.0 | 3.05μs | 1.27ns | 4.92ns | 0.0304 | 0 | 0 | 2.2 KB |
#6339 | EnrichedLog |
netcoreapp3.1 | 4.03μs | 1.45ns | 5.62ns | 0.0303 | 0 | 0 | 2.2 KB |
#6339 | EnrichedLog |
net472 | 4.91μs | 1.9ns | 7.36ns | 0.321 | 0 | 0 | 2.02 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.32μs | 1.04ns | 4.03ns | 0.016 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.73μs | 0.644ns | 2.49ns | 0.015 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.13μs | 1.32ns | 4.93ns | 0.183 | 0 | 0 | 1.16 KB |
#6339 | SendReceive |
net6.0 | 1.44μs | 0.602ns | 2.33ns | 0.0157 | 0 | 0 | 1.14 KB |
#6339 | SendReceive |
netcoreapp3.1 | 1.75μs | 0.976ns | 3.65ns | 0.0155 | 0 | 0 | 1.14 KB |
#6339 | SendReceive |
net472 | 2.14μs | 1.21ns | 4.38ns | 0.183 | 0 | 0 | 1.16 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.65μs | 0.864ns | 3.23ns | 0.0225 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.88μs | 1.75ns | 6.55ns | 0.0213 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.37μs | 1.01ns | 3.77ns | 0.324 | 0 | 0 | 2.04 KB |
#6339 | EnrichedLog |
net6.0 | 2.8μs | 1.03ns | 3.99ns | 0.0224 | 0 | 0 | 1.6 KB |
#6339 | EnrichedLog |
netcoreapp3.1 | 4μs | 1.71ns | 6.6ns | 0.0221 | 0 | 0 | 1.65 KB |
#6339 | EnrichedLog |
net472 | 4.38μs | 4.68ns | 18.1ns | 0.322 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6339
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472
1.134
574.57
651.41
Faster 🎉 in #6339
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1
1.146
629.60
549.51
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0
1.139
545.85
479.38
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0
1.138
450.95
396.31
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 | 1.134 | 574.57 | 651.41 |
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 | 1.146 | 629.60 | 549.51 | |
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 | 1.139 | 545.85 | 479.38 | |
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.138 | 450.95 | 396.31 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 450ns | 0.727ns | 2.82ns | 0.00817 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 629ns | 1.04ns | 4.03ns | 0.0075 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 574ns | 0.796ns | 3.08ns | 0.0918 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 547ns | 1.03ns | 4ns | 0.00969 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 686ns | 0.962ns | 3.72ns | 0.00925 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 860ns | 2.17ns | 8.4ns | 0.105 | 0 | 0 | 658 B |
#6339 | StartFinishSpan |
net6.0 | 396ns | 0.717ns | 2.68ns | 0.00817 | 0 | 0 | 576 B |
#6339 | StartFinishSpan |
netcoreapp3.1 | 549ns | 0.941ns | 3.64ns | 0.0077 | 0 | 0 | 576 B |
#6339 | StartFinishSpan |
net472 | 650ns | 1.67ns | 6.26ns | 0.0916 | 0 | 0 | 578 B |
#6339 | StartFinishScope |
net6.0 | 478ns | 1.04ns | 4.03ns | 0.00981 | 0 | 0 | 696 B |
#6339 | StartFinishScope |
netcoreapp3.1 | 750ns | 1.24ns | 4.81ns | 0.00925 | 0 | 0 | 696 B |
#6339 | StartFinishScope |
net472 | 900ns | 1.63ns | 6.3ns | 0.105 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6339
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0
1.140
577.32
658.21
Faster 🎉 in #6339
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1
1.120
956.87
854.29
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 | 1.140 | 577.32 | 658.21 |
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1 | 1.120 | 956.87 | 854.29 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 577ns | 0.762ns | 2.95ns | 0.00983 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 956ns | 0.864ns | 3.23ns | 0.00933 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.15μs | 1.43ns | 5.54ns | 0.104 | 0 | 0 | 658 B |
#6339 | RunOnMethodBegin |
net6.0 | 659ns | 0.931ns | 3.61ns | 0.00967 | 0 | 0 | 696 B |
#6339 | RunOnMethodBegin |
netcoreapp3.1 | 851ns | 1.52ns | 5.88ns | 0.00949 | 0 | 0 | 696 B |
#6339 | RunOnMethodBegin |
net472 | 1.15μs | 2.11ns | 8.17ns | 0.104 | 0 | 0 | 658 B |
## Summary of changes Fix the telemetry issues we saw after updating the VMs recently ## Reason for change We updated the VMs and suddenly .NET Core <=3.1 started failing on alpine when we used the "standalone telemetry agent", only when using the "curl" handler (not the socket handler). We eventually traced it down to the fact we were setting the url to `localhost`, not `127.0.0.1` as we do elsewhere. Presumably an update to the underlying libcurl caused it to choose the IPv6 address, which the listener is not bound to, causing telemetry to fail ## Implementation details - Reverted the change in #6324 - `localhost` -> `127.0.0.1` in the `TelemetryHelper` ## Test coverage The same ## Other details Reverting the change isn't necessary obviously, but it shows that we fixed it.
Summary of changes
Fix the telemetry issues we saw after updating the VMs recently
Reason for change
We updated the VMs and suddenly .NET Core <=3.1 started failing on alpine when we used the "standalone telemetry agent", only when using the "curl" handler (not the socket handler).
We eventually traced it down to the fact we were setting the url to
localhost
, not127.0.0.1
as we do elsewhere. Presumably an update to the underlying libcurl caused it to choose the IPv6 address, which the listener is not bound to, causing telemetry to failImplementation details
localhost
->127.0.0.1
in theTelemetryHelper
Test coverage
The same
Other details
Reverting the change isn't necessary obviously, but it shows that we fixed it.