We are following post below for the steps to configure ApplicationInsights and also have applied the patch as specified in the article. After setting things we are getting a NullReferenceException (details below). We have verified, all steps were followed as per
Any suggestions on what could be the issue or next steps to troubleshoot this?
Article Azure Application Insights not working on Sitecore 9.1 PaaS
Also from blog at - https://sitecoresysadmin.wordpress.com/2019/04/05/solved-application-insights-not-working-on-sitecore-9-1-paas/
Application Insights version: 2.5.1 (as provided by SiteCore Patch).
Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[NullReferenceException: Object reference not set to an instance of an object.] Sitecore.Cloud.ApplicationInsights.TelemertyInitializers.AppInsightsInitializer.Process(PipelineArgs args) +74
========================================================================== Update: 06/20 - Based on the links above, I updated Log4NET appenders to use ApplicationInsights appenders (instead of writing to FS). Removing this, clears the error, but Application Insights does not seem to work.
Do we need to update update Log4NET appender for SiteCore 9.1 AI integartion? Or "Sitecore.Cloud.ApplicationInsights.config", should kick-in automatically after updating instrumentation key and patch.