我有一个ASP .Net MVC应用程序,该应用程序使用Application Insights进行遥测跟踪。当从具有localhost的任何开发人员机器上调试应用程序时,它运行良好,但是当部署到我们的主要开发环境Web服务器时,不再跟踪HTTP请求。
包括异常,依赖项,跟踪在内的所有其他内容均已被正确跟踪。但是HTTP请求不是。如何找到此问题的原因?我不确定从哪里开始。
我们正在使用Application Insights SDK 2.5.0.61767。所有计算机上的配置文件都相同。不知道还会导致什么。任何建议欢迎。
编辑:我注意到它也没有收集服务器响应时间,服务器请求和失败的请求。
我在ApplicationInsights.config文件中具有以下模块配置:
<Add Type="Microsoft.ApplicationInsights.Web.RequestTrackingTelemetryModule, Microsoft.AI.Web">
<Handlers>
<!--
Add entries here to filter out additional handlers:
NOTE: handler configuration will be lost upon NuGet upgrade.
-->
<Add>System.Web.Handlers.TransferRequestHandler</Add>
<Add>Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.RequestDataHttpHandler</Add>
<Add>System.Web.StaticFileHandler</Add>
<Add>System.Web.Handlers.AssemblyResourceLoader</Add>
<Add>System.Web.Optimization.BundleHandler</Add>
<Add>System.Web.Script.Services.ScriptHandlerFactory</Add>
<Add>System.Web.Handlers.TraceHandler</Add>
<Add>System.Web.Services.Discovery.DiscoveryRequestHandler</Add>
<Add>System.Web.HttpDebugHandler</Add>
</Handlers>
</Add>
在我的内容中添加以下部分已为我web.config
解决了此问题。
<system.webServer>
<modules>
<add name="TelemetryCorrelationHttpModule" type="Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule, Microsoft.AspNet.TelemetryCorrelation" preCondition="integratedMode,managedHandler" />
<add name="ApplicationInsightsHttpModule" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
</modules>
</system.webServer>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句