Azure Application Insights series part 1: How to instrument your application code for monitoring

This is the first post in a new series I’m writing on Azure’s Application Insights (AI) service. The goal of the series is to walk through some of the basics for monitoring your Azure hosted services with Application Insights. We will cover topics like instrumentation, monitoring dashboards, and paging alerts.

In this post we have a look at code instrumentation: What is it? What are SLIs? How do we use the Application Insights client libraries? What are some instrumentation best practices?

Continue reading

How to setup the Azure AD implicit grant flow with React, ASP.NET Core, and RBAC roles

The OAuth 2.0 implicit grant flow is great way to handle authentication between a client JavaScript single page web app (SPA) and a web API. For example: a React or Angular web app that needs to authenticate users and then have those users call an authorized ASP.NET Core Web API.

Azure AD and the Microsoft identity platform have well established patterns and support for this workflow. In this blog post I will break down an end-to-end example that includes enabling this flow for AAD users with the following technologies: an Azure AD App configured with role-based access control (RBAC) claims, client side code leveraging React and ADAL.js, and server side code leveraging ASP.NET Core.

Continue reading

Logging Azure Application Insights telemetry data from PowerShell

Application Insights (AI) is the application performance management (APM) and logging platform for Microsoft Azure. They provide a client instrumentation library for several popular platforms/languages– but there isn’t any official module for PowerShell. In this post I share some new functions that demonstrate how to log telemetry data to AI from PowerShell.

Continue reading

How to troubleshoot Azure Resource Manager (ARM) template validation errors

Deploying Azure Resource Manager (ARM) templates with the Azure PowerShell command New-AzureRmResourceGroupDeployment can fail for a variety of reasons. One of the more confusing situations can occur when handling template validation errors (Code=InvalidTemplateDeployment). This is because sometimes additional context is missing from the Exception and you have to lookup more information into order to troubleshoot the issue. In this post we will take a closer look at this particular error and how to resolve it.

Continue reading