Skip to content
Howard van Rooijen By Howard van Rooijen Co-Founder
TeamCity MetaRunner for creating Release Annotations in Azure Application Insights

We're currently working on a project to migrate a customer from AWS to Azure. As always, we like to put a Continuous Delivery pipeline at the heart of the project to ensure there is zero friction pushing out changes across all dev, test and production environments.

Two years ago I wrote about the process we used with a previous customer, who used NewRelic for application monitoring. In our current project the customer is using Azure Application Insights, which has just released support for Release Annotations, which allows you to notify Application Insights that a deployment has occurred.

To make it easy to use, I wrapped the Release Annotations PowerShell Script with a TeamCity MetaRunner which allows you to pass in values from the build server (build number, user who triggered deployment, git hash etc) into the script:

MetaRunner-Configuration

By adding the Release Annotation as a build step, Application Insights is automatically notified every time a deployment occurs. To view the Release Annotation, click the "Metrics Explorer" button and the annotation should be visible as a blue circle with an "i" in the centre. If you click this icon, the Release Annotation blade appears which contains the values passed in by TeamCity.

AppInsightsAnnotations

The data captured in the Release Annotation is just a property bag, and can be easily customised; simply add more fields into the MetaRunner configuration screen and add these to the $releaseProperties array and the values will pushed through to Application Insights.

The source code for the MetaRunner is available on GitHub.

@HowardvRooijen

Azure Weekly is a summary of the week's top Microsoft Azure news from AI to Availability Zones. Keep on top of all the latest Azure developments!

Howard van Rooijen

Co-Founder

Howard van Rooijen

Howard spent 10 years as a technology consultant helping some of the UK's best known organisations work smarter, before founding endjin in 2010. He's a Microsoft ScaleUp Mentor, and a Microsoft Azure MVP, and helps small teams achieve big things using data, AI and Microsoft Azure.