Monitoring Azure Functions

Learn how to monitor Azure Functions to ensure that the applications are running as expected.

To make sure our applications are running as expected, we need to be able to monitor them. This applies to Azure Functions too. Monitoring can be done by different means. We can collect counts of various events. We can record the details of each event in the logs. We can also configure automated alerts when certain events achieve a specific threshold.

In Azure Functions, a lot of monitoring is done by the Azure infrastructure itself. However, Azure cannot automatically monitor anything specific to our business logic. Therefore, there is some monitoring functionality that we need to enable ourselves.

Azure Monitor basics

The built-in monitoring tool inside the Azure infrastructure is known as Azure Monitor. It is a comprehensive monitoring and diagnostics service provided by Microsoft Azure. It helps us understand and optimize the performance and availability of our applications, infrastructure, and services running in Azure. Azure Monitor is responsible for the following monitoring functionalities:

  • Logs collection

  • Metrics collection

  • Alerts and notifications

By having Azure Monitor integration out of the box, Azure Functions simplifies the process of monitoring and managing the health and performance of our serverless functions.

Get hands-on with 1400+ tech skills courses.