0

Our Sitecore is 9.0 update 2 with SXA.

We have 3 environments on Azure all using Azure Web App: BUILD(standalone), UAT(standalone) and Production(CM and CD).

All of them have exactly the same files in wwwroot, all configurations are overwritten in Azure Web APP's App Settings. Databases are different.

Application Insights have been setup as normal, with correct instrument ID in App Settings and Connection Strings.

However

  1. Only UAT Application Insights captures data, nothing comes in for BUILD and Production.
  2. Couldn't see any thing relevant in event logs or other log files for BUILD and Production.
  3. During Production deployments, Application Insights actually captures data, which I assume they are actually from the slot.
  4. We also tried disconnecting and reconnecting Application Insights, no changes.
  5. We tried removing all the extract App Settings that are added when you connect Application Insights extensions.
  6. We tried creating a new Application Insights account and connect with BUILD or Production, no data.
  7. And following item 6, we reconnect it with the original Application Insights, no data

We have raised a support ticket with Sitecore and am waiting for their responses. Also have plan to submit a ticket to Azure.

The most puzzling part for me is that since all files are the same for all environments, there should be no chance issue is caused by any configuration files or dll files. Then the possible places are only Azure settings on Web App and Application Insights. However after trying for so long, I have ran out of things that I can try.

Not expecting if anyone can tell me directly the issue, but at least wonder if there is a list which contains all necessary things for this to work?

Thanks in advance!

5
  • Have a read of this answer and update your question with things you've checked off sitecore.stackexchange.com/a/13865/1278 Commented Feb 19, 2019 at 2:08
  • @MarkGibbons thanks for replying, I actually came across this already since I have been trying to figure out this issue for a while now. There aren't actually many checklist items there since most of it are for advanced features. But for the ones that are there. I have checked, configuration files are all presented and since UAT is working fine and they all have exactly the same files so this is ruled out. instrumentationkey is correct in application settings and connectionstrings. Daily cap we have 100G per day setup so should be fine. To be continued in next comment.
    – zhanke
    Commented Feb 21, 2019 at 4:49
  • @MarkGibbons continue from previous comment: I compared showconfig of uat and other envs, they are the same too since all config files are the same. So really running out of ideas here.
    – zhanke
    Commented Feb 21, 2019 at 4:50
  • Have you checked if there's an instrumentation key overriding the config in the Web App app settings section? docs.microsoft.com/en-us/azure/app-service/web-sites-configure Commented Feb 21, 2019 at 5:18
  • @MarkGibbons hi Mark, issue resolved, please see my answer below. thanks for helping out!
    – zhanke
    Commented Mar 1, 2019 at 3:51

1 Answer 1

1

Found the issue. The direct cause is missing sections in web.config.

ApplicationInsights HttpModule is for capturing requests information in App Insights.

myAppInsightsListener in system.diagnostics is for capturing the traces.

The problem that caused this complicated and long process of troubleshooting is that when we thought it's exactly the same code works in UAT but not others, it's actually not UAT that's pushing data, it's actually one of UAT's slot that's pushing data which had a different web.config that contains those missing sections. In the end, it's the logging of UAT doesn't match the time of some schedule tasks defined time made me thinking if that's from the correct UAT environment.

Sitecore support provided help however only ApplicationInsights HttpModule was mentioned so it didn't resolve the issue when it was tested.

This could have been easy, lesson learned is that should have compared the web.config with Sitecore official package from the beginning. That would have saved all those effort.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.