|
2 | 2 | title: Release annotations for Application Insights | Microsoft Docs
|
3 | 3 | description: Learn how to create annotations to track deployment or other significant events with Application Insights.
|
4 | 4 | ms.topic: conceptual
|
5 |
| -ms.date: 05/27/2021 |
| 5 | +ms.date: 07/02/2021 |
6 | 6 |
|
7 | 7 | ---
|
8 | 8 |
|
@@ -53,6 +53,25 @@ If you can't use one the deployment tasks in the previous section, then you need
|
53 | 53 |
|
54 | 54 | :::image type="content" source="./media/annotations/inline-script.png" alt-text="Screenshot of Azure CLI task settings with Script Type, Script Location, Inline Script, and Script Arguments highlighted." lightbox="./media/annotations/inline-script.png":::
|
55 | 55 |
|
| 56 | + Below is an example of metadata you can set in the optional releaseProperties argument using [build](/azure/devops/pipelines/build/variables#build-variables-devops-services) and [release](/azure/devops/pipelines/release/variables#default-variables---release) variables. |
| 57 | + |
| 58 | +
|
| 59 | + ```powershell |
| 60 | + -releaseProperties @{ |
| 61 | + "BuildNumber"="$(Build.BuildNumber)"; |
| 62 | + "BuildRepositoryName"="$(Build.Repository.Name)"; |
| 63 | + "BuildRepositoryProvider"="$(Build.Repository.Provider)"; |
| 64 | + "ReleaseDefinitionName"="$(Build.DefinitionName)"; |
| 65 | + "ReleaseDescription"="Triggered by $(Build.DefinitionName) $(Build.BuildNumber)"; |
| 66 | + "ReleaseEnvironmentName"="$(Release.EnvironmentName)"; |
| 67 | + "ReleaseId"="$(Release.ReleaseId)"; |
| 68 | + "ReleaseName"="$(Release.ReleaseName)"; |
| 69 | + "ReleaseRequestedFor"="$(Release.RequestedFor)"; |
| 70 | + "ReleaseWebUrl"="$(Release.ReleaseWebUrl)"; |
| 71 | + "SourceBranch"="$(Build.SourceBranch)"; |
| 72 | + "TeamFoundationCollectionUri"="$(System.TeamFoundationCollectionUri)" } |
| 73 | + ``` |
| 74 | +
|
56 | 75 | 1. Save.
|
57 | 76 |
|
58 | 77 | ## Create release annotations with Azure CLI
|
@@ -99,6 +118,7 @@ You can use the CreateReleaseAnnotation PowerShell script to create annotations
|
99 | 118 | |releaseName | The name to give the created release annotation. | |
|
100 | 119 | |releaseProperties | Used to attach custom metadata to the annotation. | Optional|
|
101 | 120 |
|
| 121 | +
|
102 | 122 | ## View annotations
|
103 | 123 |
|
104 | 124 | > [!NOTE]
|
@@ -149,7 +169,7 @@ You only need to install the extension once for your Azure DevOps organization.
|
149 | 169 |
|
150 | 170 | Create a separate API key for each of your Azure Pipelines release templates.
|
151 | 171 |
|
152 |
| -1. Sign in to the [Azure portal](https://portal.azure.com) and open the Application Insights resource that monitors your application. Or if you don't have one, [create a new Application Insights resource](./app-insights-overview.md). |
| 172 | +1. Sign in to the [Azure portal](https://portal.azure.com) and open the Application Insights resource that monitors your application. Or if you don't have one, [create a new Application Insights resource](create-workspace-resource.md). |
153 | 173 |
|
154 | 174 | 1. Open the **API Access** tab and copy the **Application Insights ID**.
|
155 | 175 |
|
|
0 commit comments