Azure Application Insights不跟踪SQL查询

问题描述 投票:0回答:1

将Web应用程序升级到.Net Core 3.1后,我们再也看不到Application Insights中正在执行的实际SQL查询。由于EF Core 3.x出现一些严重的性能问题,我们将EF Core保留在2.2版中,所以不确定是否与此有关?我们现在看到的只是目标数据库的详细信息:

enter image description here

在我们使用带有EF Core 2.2的AspNetCore 2.2之前,一切工作正常,Application Insights向我们展示了正在执行的实际SQL语句。

我们已经尝试过建议形式Microsoft here,该建议建议将Microsoft.Data.SqlClient nuget包添加到项目中,但是绝对没有做任何事情。

我们还尝试过在我们的App Service中打开“ Application Insights-> Sql Commands”选项,但也没有执行任何操作。

enter image description here

有人对如何使它重新工作有任何建议吗?

谢谢

编辑:

我们正在引用的Nuget软件包:

enter image description here

azure-application-insights asp.net-core-3.1
1个回答
0
投票

似乎是有关Microsoft.ApplicationInsights.AspNetCore 2.14.0最新版本的问题。我可以在2.14.0中重现该问题,但是当我将其降级为2.12.0时,它可以工作。

使用Microsoft.ApplicationInsights.AspNetCore 2.12.0的测试结果:

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.