I have a problem with Microsoft.ApplicationInsights
objects. Every time the code hits one of those objects for the first time, the time to initialize is ridiculously long (sometimes even around 40 seconds).
Example 1:
Example 2:
What is the cause of this long first time load? How can I fix this?
Click on "Microsoft. ApplicationInsights. AspNetCore" package. On the right, check the checkbox next to Project to select all projects then select Uninstall.
The only way to do that is to delete the entire Application Insights service configuration through the portal. And currently Application Insights has 7 days retention policy, so all data will be deleted automatically in 7 days.
Collects system performance counters such as CPU, memory, and network load from IIS installations. You can specify which counters to collect, including performance counters you have set up yourself. Microsoft. ApplicationInsights.
In the Azure Portal, navigate to the Application Insights resource, and click Log Analytics. Log queries help you to fully leverage the value of the data collected in Azure Monitor Logs. Query your custom events by entering “customEvents” in the prompt and click Run.
Why don't you just disable ApplicationInsight when in debug using a web.config transform?
<?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>
I had similar issues and the answer to this question explained to me how to go about using this snippet in my dev environment (ie. not in the publishing pipeline).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With