.Net Application Insights 2.5无法跟踪HTTP请求

暴风雪

我有一个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] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Application Insights仅跟踪失败的ASP.NET MVC Web API请求

.NET 5 Web Apps尚不支持Application Insights

Microsoft Application Insights是否支持MVC 6(.Net 5)

在Application Insights上跟踪HTTP正文内容

Application Insights无法跟踪用户和会话

Azure Application Insights无法跟踪SQL查询

无法连接到Application Insights

使用Application Insights在Azure上进行ASP.NET Core跟踪日志记录

如何在 Application Insights 中区分来自不同实例 .net 核心应用程序的跟踪

Application Insights 无法跟踪节点中间件中的请求

.NET Core 3.0 Worker-无法使日志与Application Insights或EventLog一起使用

Application Insights是否跟踪引荐来源网址?

在Application Insights中将跟踪数据用作指标

在Application Insights中查看POST请求正文

Application Insights不会记录成功的请求

Application Insights 请求遥测缺少基本路径

在Application Insights中查看请求正文

Application Insights HTTP 请求性能数据太不可靠

来自 Azure Function (.net Core 3.1) 的调试和跟踪日志在 Application Insights 中不可见

无法在Azure中安装Application Insights

无法获得 Application Insights 以显示调试遥测

asp.net核心-Application Insights:实时指标流

Application Insights和.Net Core-0.0.0.0 IP

ASP.NET Core Application Insights 自适应采样

Application Insights - 从 .net 核心中间件添加属性

使用ASP.NET Core库禁用Application Insights采样

Log4net不会登录到Application Insights

如何在Net Core HostBuilder上配置Application Insights采样?

来自ASP.NET Core身份的Application Insights用户ID