Sitecore instances hosted in Azure Web Apps cannot be started after enabling any of the following Azure Application Insights options:
The application event log might contain the messages shown below:
CInstrumentationMethod::Initialize - failed to initialize instrumentation method PID: 10128 hr: 80131375 name: Production Breakpoint Instrumentation Method
IfFailRet(pNamedPipe->Read((BYTE*)&controlRequest, sizeof(SnapshotHolderControlStruct))) failed in function CSnapshotHolder::HandleNewPipeConnection: -2147024787
Incoming-calls pipe shutdown.
The reason for such behavior is that some Azure Application Insights features might not work with obfuscated code.
The issue was resolved at Microsoft Azure side by skipping obfuscated assemblies that cannot be processed correctly. The previously described circumstances do not prevent Sitecore solutions hosted in Azure Web Apps from starting anymore.