我已将 Application Insights 添加到我的应用程序中。
一段时间后,我正确地看到了 浏览器页面加载时间 ,但其他图表都没有显示任何数据。
我看到这个:
当我期待这样的事情时:
这是同一个解决方案中的两个 ASP.NET MVC 5 应用程序,并且都部署到 Azure。
在这两种情况下:
dc.services.visualstudio.com/v2/track
); ApplicationInsights.config
在网络根目录中; Application_Start()
中Global.asax.cs
的方法通过 TelemetryConfiguration.Active.InstrumentationKey = "the_key"
请注意,我在
ApplicationInsights.config
中没有检测 key 文件,因为我多次部署网站,并且正在按照 this advice 设置检测 key .我已经重置了所有内容(在 Add Application Insights SDK to monitor your ASP.NET app 之后),但在至少每小时 1/2 之后,我仍然没有看到任何有关服务器响应时间、服务器请求或失败请求的信息。
我该如何解决?
最佳答案
关注来自 Alex Bulankou 的一些离线帮助,我已经解决了这个问题。
很难确定导致问题的确切组合,但我怀疑这是由于 Application Insights 程序集的版本不匹配,格式错误 ApplicationInsights.config
文件以及在通过 Visual Studio 命令添加 Application Insights 和手动执行之间出现问题。
解决问题的最终途径是:
Microsoft.ApplicationInsights.*
项目中的 nuget 包; ApplicationInsights.config
文件; Microsoft.ApplicationInsights.Web
nuget 包 只有 - 它将安装所有必需的依赖项,包括一个新的 ApplicationInsights.config
文件(没有 iKey
,这是我想要的 - 见下文)InstrumentationKey
通过 Global.asax.cs
保持不变最终结果(我在早上 7 点左右修复了这一切):
关于asp.net-mvc - Application Insights 未显示服务器响应时间、服务器请求或失败请求的数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31468825/