in src/commands/createWebApp/WebAppCreateStep.ts [155:217]
private getAppSettings(context: IWebAppWizardContext): WebSiteManagementModels.NameValuePair[] {
const appSettings: WebSiteManagementModels.NameValuePair[] = [];
const disabled: string = 'disabled';
const trueString: string = 'true';
const runtime: WebAppStackValue = nonNullProp(context, 'newSiteStack').stack.value;
if (context.newSiteOS === WebsiteOS.linux && (runtime === 'node' || runtime === 'python')) {
appSettings.push({
name: 'SCM_DO_BUILD_DURING_DEPLOYMENT',
value: trueString
});
}
if (context.appInsightsComponent) {
appSettings.push({
name: 'APPINSIGHTS_INSTRUMENTATIONKEY',
value: context.appInsightsComponent.instrumentationKey
});
// all these settings are set on the portal if AI is enabled for Windows apps
if (context.newSiteOS === WebsiteOS.windows) {
appSettings.push(
{
name: 'APPINSIGHTS_PROFILERFEATURE_VERSION',
value: disabled
},
{
name: 'APPINSIGHTS_SNAPSHOTFEATURE_VERSION',
value: disabled
},
{
name: 'ApplicationInsightsAgent_EXTENSION_VERSION',
value: '~2'
},
{
name: 'DiagnosticServices_EXTENSION_VERSION',
value: disabled
},
{
name: 'InstrumentationEngine_EXTENSION_VERSION',
value: disabled
},
{
name: 'SnapshotDebugger_EXTENSION_VERSION',
value: disabled
},
{
name: 'XDT_MicrosoftApplicationInsights_BaseExtensions',
value: disabled
},
{
name: 'XDT_MicrosoftApplicationInsights_Mode',
value: 'default'
});
} else {
appSettings.push({
name: 'APPLICATIONINSIGHTSAGENT_EXTENSION_ENABLED',
value: trueString
});
}
}
return appSettings;
}