Wrap ContainerTagsHash around !NETFRAMEWORK#8363
Conversation
It appears that this isn't supposed to be set on .NET Framework and we have a Log.Error for whenever ContainerTagsHash is set. This was intended from what I can tell to be to see if customers were setting this while on .NET Framework, but we set it ourselves on .NET Framework in DiscoveryService
BenchmarksBenchmark execution time: 2026-03-24 21:49:56 Comparing candidate commit 2893a40 in PR branch Found 9 performance improvements and 9 performance regressions! Performance is the same for 256 metrics, 14 unstable metrics.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8363) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-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:
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 chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8363) - mean (69ms) : 67, 71
master - mean (69ms) : 67, 71
section Bailout
This PR (8363) - mean (73ms) : 72, 74
master - mean (73ms) : 71, 74
section CallTarget+Inlining+NGEN
This PR (8363) - mean (1,051ms) : 998, 1103
master - mean (1,046ms) : 981, 1111
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 (8363) - mean (107ms) : 104, 110
master - mean (107ms) : 103, 110
section Bailout
This PR (8363) - mean (108ms) : 106, 110
master - mean (108ms) : 106, 110
section CallTarget+Inlining+NGEN
This PR (8363) - mean (771ms) : 744, 798
master - mean (769ms) : 750, 789
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8363) - mean (94ms) : 92, 96
master - mean (95ms) : 92, 97
section Bailout
This PR (8363) - mean (95ms) : 94, 96
master - mean (95ms) : 94, 96
section CallTarget+Inlining+NGEN
This PR (8363) - mean (763ms) : 743, 783
master - mean (755ms) : 734, 776
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8363) - mean (94ms) : 91, 97
master - mean (93ms) : 91, 95
section Bailout
This PR (8363) - mean (95ms) : 93, 97
master - mean (95ms) : 93, 96
section CallTarget+Inlining+NGEN
This PR (8363) - mean (665ms) : 639, 690
master - mean (663ms) : 639, 687
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 (8363) - mean (225ms) : 210, 241
master - mean (219ms) : 207, 230
section Bailout
This PR (8363) - mean (228ms) : 213, 243
master - mean (226ms) : 211, 241
section CallTarget+Inlining+NGEN
This PR (8363) - mean (1,268ms) : 1210, 1325
master - mean (1,251ms) : 1203, 1299
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 (8363) - mean (322ms) : 300, 344
master - mean (315ms) : 300, 331
section Bailout
This PR (8363) - mean (318ms) : 301, 336
master - mean (317ms) : 304, 330
section CallTarget+Inlining+NGEN
This PR (8363) - mean (1,036ms) : 1001, 1070
master - mean (1,030ms) : 998, 1061
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8363) - mean (318ms) : 299, 337
master - mean (310ms) : 292, 328
section Bailout
This PR (8363) - mean (314ms) : 296, 333
master - mean (311ms) : 293, 329
section CallTarget+Inlining+NGEN
This PR (8363) - mean (1,079ms) : 992, 1165
master - mean (1,061ms) : 1007, 1115
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8363) - mean (310ms) : 293, 327
master - mean (307ms) : 290, 323
section Bailout
This PR (8363) - mean (311ms) : 288, 334
master - mean (310ms) : 289, 331
section CallTarget+Inlining+NGEN
This PR (8363) - mean (1,016ms) : 922, 1111
master - mean (1,025ms) : 944, 1105
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Related: #8061 seems to remove that log message. Should we keep it? The |
|
|
||
| private async Task ProcessDiscoveryResponse(IApiResponse response) | ||
| { | ||
| #if !NETFRAMEWORK |
There was a problem hiding this comment.
I think we can skip this in Windows regardless of .NET version, since we won't have container tags?
But these container tags come from the Agent. What happens if the tracer is running on Windows and the Agent is running in a Linux container, or (less probably) vice-versa?
There was a problem hiding this comment.
I removed the setter code entirely from .NET Framework
Is that what you meant to do? I didn't notice that this was being changed in that other PR as well
Instead of guarding the caller with #if !NETFRAMEWORK, make the setter a silent no-op. This avoids conflict with #8061 which replaces the caller entirely.
Summary of changes
It appears that this isn't supposed to be set on .NET Framework and we have a
Log.Errorfor wheneverContainerTagsHashis set.This was intended from what I can tell to be to see if customers were setting this while on .NET Framework, but we set it ourselves on .NET Framework in
DiscoveryServiceReason for change
Identified by Error Tracking with a large number of errors from the latest release, realistically these are harmless errors and were supposed to indicate to customers that this functionality isn't available on .NET Framework, but instead we are the ones calling it.
Implementation details
Added
!NETFRAMEWORKTest coverage
Used Visual Studio and did a Find all References on it, I think this is it😅
Other details
Fixes APMLP-1140