我正在使用 Azure Application Insights。 经过一些配置步骤和官方文档后,我发现我的应用程序见解在我的本地构建上运行良好。请求、异常、依赖和自定义事件的数据都出现在azure门户中。
但是,一旦我将其部署到 Azure Web 应用程序,我就无法在 Azure 门户中看到任何 Application Insights 数据。
我已经根据本文的“自从我将应用程序发布到我的服务器以来没有(服务器)数据”部分验证了 Application Insights Dll 和 Microsoft.Diagnostics.Tracing.EventSource.dll 均已复制到 azure: https://azure.microsoft.com/en-us/documentation/articles/app-insights-asp-net-troubleshoot-no-data/#q03
其他一些奇怪的事情是,当我远程调试我的 Azure Web 应用程序时,我发现所有 TelemetryClient 都显示为“未配置”,但是我的 Instrumentation key 在 ApplicationInsights.config 中正确写入
还有一件事是,当我像这样更改代码时:
var client = new TelemetryClient();
client.Context.InstrumentationKey = "The Key";
client.TrackEvent("TestEvent");
自定义事件出现在 Azure 门户中。但其他数据如请求、异常、依赖项不会自动记录在门户中。
我的应用程序有什么问题?
最佳答案
在azure支持工程师的帮助下,问题已经解决。
原因是在azure门户的应用程序设置中,有一个配置集“MOBILESERVICESDOTNET_EXTENSION_VERSION”= 1.0.478
删除此配置后,一切正常。
但我仍然不确定其根本原因。为什么这个配置会造成这么大的麻烦?
关于c# - Application Insights 自部署到 Azure Web 应用程序后没有数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37248753/