使用 PowerShell 在没有 Application Insights 的情况下创建 Azure Function

Create Azure Function without Application Insights using PowerShell

我正在尝试在没有 Application Insights 实例的情况下部署 Azure Functions created/connected。假设这可以解决问题,使用 'DisableApplicationInsights':

New-AzFunctionApp -ResourceGroupName $ResourceGroupName -Name $FunctionAppName -Runtime $Runtime -StorageAccountName $StorageAccountName -PlanName $AppServicePlanName -RuntimeVersion $RuntimeVersion -DisableApplicationInsights

它确实创建了一个 Application Insights 实例,但没有将它连接到函数。我原以为不会创建 Application Insights 实例。不确定为什么创建它但未连接到函数。

目前有一个 open issue 正在为下一个主要版本积压。在此之前,您需要在创建函数后删除创建的应用程序洞察资源。

Remove-AzApplicationInsights $ResourceGroupName -Name $FunctionAppName