Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: AzureRmWebAppDeployment@4 fails to add release annotation when APPLICATIONINSIGHTS_CONNECTION_STRING used instead of APPINSIGHTS_INSTRUMENTATIONKEY #20857

Open
4 of 7 tasks
WolfyUK opened this issue Feb 14, 2025 · 1 comment

Comments

@WolfyUK
Copy link

WolfyUK commented Feb 14, 2025

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)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

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

@v-schhabra
Copy link
Contributor

Hi @WolfyUK
I created the PR for the fix. Will update here once the deployments are completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants