New issue checklist
Task name
AzureRmWebAppDeployment
Task version
4.247.1
Issue Description
A web application originally using APPINSIGHTS_INSTRUMENTATIONKEY would push release annotations Application Insights instance during deployment to the app service using the above task. Since moving the web application over to APPLICATIONINSIGHTS_CONNECTION_STRING (as recommended), the release annotations are no longer being set during deployment. The following is shown in the debug logs:
##[debug]Application Insights is not configured for the App Service. Skipping adding release annotation.
Looking at the code, it can be seen that there is a hard dependency on APPINSIGHTS_INSTRUMENTATIONKEY in this version of the task. This same issue was not observed when the same configuration change recently went into function apps deployed using AzureFunctionApp@2. Looking at that code, both APPINSIGHTS_INSTRUMENTATIONKEY and APPLICATIONINSIGHTS_CONNECTION_STRING seem to be supported. It is expected that both would be supported here too.
In the short term, both settings will be added to the web application in order to restore release annotations.
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Ubuntu 22.04.5
Relevant log output
##[debug]Application Insights is not configured for the App Service. Skipping adding release annotation.
Full task logs with system.debug enabled
No response
Repro steps