Azure app insights are not working after the application is being deployed to Azure App Service but it's totally looking good on the local.
I have added the Instrumentation key on ApplicationInsights.config file that's being provided by the Azure App Service on the local app and saw the requests are logging on the portal.
In some articles, it suggests that we should not keep some DLLs like
Microsoft.ApplicationInsights.dll
Microsoft.AspNet.TelemetryCorrelation.dll
System.Diagnostics.DiagnosticSource.dll
But seems like it's essential for the App insights. I am not sure where I am missing. Could anyone of you guide me on this?
Here are few reasons and solutions that you can have a look why application insights aren't working after deployment.
SCENARIO - 1 Disabled Application insights on portal
Like @Vinez mentioned You can enable them from your appinsights overview page. Scroll down on the same page to see the left pane that shows an option of Application Insights and then “Turn On Application Insights”.
SCENARIO - 2 Missing AppInsights settings
You can navigate to Configuration -> Application settings and check if the appinsights settings (i.e.. APPINSIGHTS_INSTRUMENTATIONKEY
, APPLICATIONINSIGHTS_CONNECTION_STRING
, ApplicationInsightsAgent_EXTENSION_VERSION
, XDT_MicrosoftApplicationInsights_Mode
) have been added or not with appropriate values.
SCENARIO - 3 ApplicationInsights.Config not deployed with the application.
You can go to App Service Editor (preview) and check whether the AppInsights.config file is being deployed.
You can check this similar thread which deals with build and publish.
SCENARIO - 4 Due to restricted firewall.
Please try checking Enable Azure Application Insights on the VM-Series Firewall
Further you can log the traces and act accodingly using perfview.
REFERENCES :