Create Azure DevOps or GitHub bugs from Azure Monitor logs

When operating distributed applications it can be a lot of work if you want to copy error details into tickets and work items for your teams to look at. In this post we're taking a quick look at how we can quickly send specific log entries from Application Insights over to Azure DevOps or GitHub.

Tobias Zimmergren
Tobias Zimmergren

When operating distributed applications it can be a lot of work if you want to copy error details into tickets and work items for your teams to look at.

I rely heavily on Azure Monitor and the capabilities to explore exceptions and failures in Application Insights.

There's a fairly new capability that recently released into General Availability, which helps us create work items directly from a logged event in Application Insights.

From Application Insights, select any of your failed events and explore further. When you decide you need to log this as a bug or a work item to your team, you can do that from here:

Create a Work Item in Azure DevOps or GitHub, directly from Azure Application Insight and Azure Monitor.

If you haven't already set up a workbook template, you will get the option to do that now.

Create a workbook template for Azure DevOps or GitHub, to send logs from Azure Monitor.

From the next view, you can create and define the workbook template. I am calling mine "Production Exceptions", and associating relevant tags that will help in the work item in Azure DevOps.

Create an Azure Workbook item template for new Work Items.

Create the template, and now you can again click "Create work item" -> "Production Exceptions". The name of the menu item here will be the name you gave it in the previous step.

Create a new exception work item in Azure DevOps, directly from Azure Monitor or App Insights.

You now decide whether to log this as a Work Item (task), or as an Exception (bug). Select "Create a bug for this exception".

Create work items in Azure DevOps from exceptions in Application Insights.

You'll be redirected to the Azure DevOps (or GitHub) page with all the details you have defined.

In my case, the template will give me this:

  • Title: The exception, but I usually modify this manually for each new bug.
  • Tags: "WEU", and "ProductionException" as I defined in my template.
  • Repro Steps: All the information from Application Insights, including a link back to the very same item in app insights, so anyone picking this up can go back to see the full telemetry (if they are authorized to do so).
Automatically populate a new ticket/work item bug in Azure DevOps or GitHub from Azure Monitor/Application Insights.

That's it. I hope it can help speed up the DevOps and DevSecOps processes you embrace. Because you do embrace them, right?

AzureApplication InsightsAzure DevOpsDevOps

Tobias Zimmergren Twitter

Hi, I'm Tobias! 👋 I write about Microsoft Azure, security, cybersecurity, compliance, cloud architecture, Microsoft 365, and general tech!

Reactions and mentions

Hi, I'm Tobias 👋

Tobias Zimmergren profile picture

Find out more about me.

Recent comments