【发布时间】:2018-02-16 10:36:49
【问题描述】:
我对@987654325@ 对象有疑问。每次代码第一次遇到其中一个对象时,初始化时间都非常长(有时甚至大约 40 秒)。
示例 1:
示例 2:
第一次加载这么长的原因是什么?我该如何解决这个问题?
【问题讨论】:
标签: c# azure-application-insights
我对@987654325@ 对象有疑问。每次代码第一次遇到其中一个对象时,初始化时间都非常长(有时甚至大约 40 秒)。
示例 1:
示例 2:
第一次加载这么长的原因是什么?我该如何解决这个问题?
【问题讨论】:
标签: c# azure-application-insights
在使用 web.config 转换进行调试时,为什么不直接禁用 ApplicationInsight?
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.web>
<httpModules>
<add xdt:Transform="Remove" xdt:Locator="Match(name)" name="ApplicationInsightsWebTracking" />
</httpModules>
</system.web>
<system.webServer>
<modules>
<add xdt:Transform="Remove" xdt:Locator="Match(name)" name="ApplicationInsightsWebTracking" />
</modules>
</system.webServer>
</configuration>
我遇到了类似的问题,question 的答案向我解释了如何在我的开发环境中使用这个 sn-p(即不在发布管道中)。
【讨论】:
<system.webServer> <modules> <add xdt:Transform="Remove" xdt:Locator="Match(name)" name="TelemetryCorrelationHttpModule" /> </modules> </system.webServer>
<system.diagnostics> <trace> <listeners> <add xdt:Transform="Remove" xdt:Locator="Match(name)" name="myAppInsightsListener" /> </listeners> </trace> </system.diagnostics>...现在很安静 :) @LeonardoSeccia 将其添加到您的答案中怎么样?