Fix `DatadogLoggingScope` sometimes injecting incorrect values for `ILogger` logs injection by andrewlock · Pull Request #7880 · DataDog/dd-trace-dotnet

.NET Framework 4.8 - Baseline duration192.40 ± (192.45 - 193.31) ms193.47 ± (193.34 - 194.23) ms+0.6%✅⬆️ .NET Framework 4.8 - Bailout duration195.04 ± (194.82 - 195.27) ms196.53 ± (196.26 - 196.85) ms+0.8%✅⬆️ .NET Framework 4.8 - CallTarget+Inlining+NGEN duration1104.03 ± (1110.09 - 1119.81) ms1126.80 ± (1128.54 - 1138.12) ms+2.1%✅⬆️ .NET Core 3.1 - Baseline process.internal_duration_ms186.65 ± (186.33 - 186.96) ms188.04 ± (187.69 - 188.38) ms+0.7%✅⬆️ process.time_to_main_ms80.03 ± (79.85 - 80.21) ms80.95 ± (80.75 - 81.15) ms+1.1%✅⬆️ runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%✅ runtime.dotnet.mem.committed16.19 ± (16.17 - 16.21) MB16.09 ± (16.07 - 16.12) MB-0.6%✅ runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+0.1%✅⬆️ .NET Core 3.1 - Bailout process.internal_duration_ms186.67 ± (186.35 - 187.00) ms188.09 ± (187.69 - 188.48) ms+0.8%✅⬆️ process.time_to_main_ms81.53 ± (81.35 - 81.70) ms82.18 ± (82.00 - 82.36) ms+0.8%✅⬆️ runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%✅ runtime.dotnet.mem.committed16.18 ± (16.11 - 16.25) MB16.13 ± (16.10 - 16.16) MB-0.3%✅ runtime.dotnet.threads.count21 ± (20 - 21)21 ± (20 - 21)+0.1%✅⬆️ .NET Core 3.1 - CallTarget+Inlining+NGEN process.internal_duration_ms396.58 ± (393.84 - 399.32) ms401.18 ± (398.61 - 403.74) ms+1.2%✅⬆️ process.time_to_main_ms470.63 ± (470.00 - 471.26) ms473.17 ± (472.48 - 473.86) ms+0.5%✅⬆️ runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%✅ runtime.dotnet.mem.committed58.58 ± (58.43 - 58.72) MB58.51 ± (58.37 - 58.65) MB-0.1%✅ runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)-0.0%✅ .NET 6 - Baseline process.internal_duration_ms190.63 ± (190.38 - 190.88) ms192.60 ± (192.33 - 192.88) ms+1.0%✅⬆️ process.time_to_main_ms69.37 ± (69.26 - 69.49) ms70.16 ± (69.99 - 70.33) ms+1.1%✅⬆️ runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%✅ runtime.dotnet.mem.committed16.26 ± (16.14 - 16.37) MB16.05 ± (15.91 - 16.20) MB-1.3%✅ runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.8%✅ .NET 6 - Bailout process.internal_duration_ms190.63 ± (190.25 - 191.01) ms191.80 ± (191.49 - 192.11) ms+0.6%✅⬆️ process.time_to_main_ms70.51 ± (70.39 - 70.64) ms70.97 ± (70.89 - 71.05) ms+0.6%✅⬆️ runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%✅ runtime.dotnet.mem.committed16.04 ± (15.88 - 16.20) MB15.84 ± (15.67 - 16.01) MB-1.3%✅ runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-0.8%✅ .NET 6 - CallTarget+Inlining+NGEN process.internal_duration_ms405.02 ± (402.64 - 407.40) ms406.82 ± (405.00 - 408.64) ms+0.4%✅⬆️ process.time_to_main_ms438.30 ± (437.78 - 438.81) ms442.77 ± (442.22 - 443.33) ms+1.0%✅⬆️ runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%✅ runtime.dotnet.mem.committed58.38 ± (58.22 - 58.54) MB58.88 ± (58.73 - 59.03) MB+0.9%✅⬆️ runtime.dotnet.threads.count29 ± (29 - 30)30 ± (30 - 30)+0.3%✅⬆️ .NET 8 - Baseline process.internal_duration_ms190.33 ± (189.96 - 190.69) ms191.43 ± (191.02 - 191.84) ms+0.6%✅⬆️ process.time_to_main_ms69.35 ± (69.12 - 69.58) ms69.91 ± (69.73 - 70.09) ms+0.8%✅⬆️ runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%✅ runtime.dotnet.mem.committed11.75 ± (11.72 - 11.77) MB11.75 ± (11.72 - 11.78) MB+0.0%✅⬆️ runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.2%✅⬆️ .NET 8 - Bailout process.internal_duration_ms188.05 ± (187.85 - 188.25) ms190.00 ± (189.72 - 190.28) ms+1.0%✅⬆️ process.time_to_main_ms70.00 ± (69.91 - 70.09) ms70.47 ± (70.36 - 70.58) ms+0.7%✅⬆️ runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%✅ runtime.dotnet.mem.committed11.83 ± (11.80 - 11.86) MB11.80 ± (11.77 - 11.83) MB-0.2%✅ runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.4%✅⬆️ .NET 8 - CallTarget+Inlining+NGEN process.internal_duration_ms364.31 ± (362.97 - 365.64) ms367.36 ± (365.95 - 368.77) ms+0.8%✅⬆️ process.time_to_main_ms426.43 ± (425.83 - 427.03) ms429.33 ± (428.69 - 429.98) ms+0.7%✅⬆️ runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%✅ runtime.dotnet.mem.committed47.83 ± (47.79 - 47.86) MB47.91 ± (47.88 - 47.94) MB+0.2%✅⬆️ runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)-0.5%✅