Skip to content

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

@WolfyUK

Description

@WolfyUK

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions