Azure Functions is an on-demand serverless compute offering built on top of Azure App Service that enables you to deploy event-driven code without the need to provision and manage infrastructure. Because applications rely on Azure Functions to handle business-critical tasks such as processing orders or logging in users, it’s important to ensure that your functions respond quickly when they’re invoked.
Earlier this year, we released the Datadog extension for Azure App Service which collects traces and automatically correlates telemetry from resources running in Azure App Service. This extension includes support for Azure Functions, providing even deeper and granular insight into your serverless Azure infrastructure.
In this post, we’ll explore how our Azure App Service extension provides in-depth, function-level visibility so you can identify performance and resource bottlenecks to troubleshoot issues and optimize your Azure-hosted applications.
Azure Functions run on function apps, which can host one or more functions. Our Azure App Service integration provides function app-level visibility into application performance, but to efficiently fine-tune your service you also need granular, function-level visibility. With Datadog APM and our App Service extension, you can get an end-to-end view of request traces from Azure Functions and other Azure-managed services as they propagate across your infrastructure.
When an Azure function is invoked, its lifecycle is visualized in a flame graph that’s broken down into spans. These spans let you see the duration of each step of a request so you can identify performance pain points such as high latency. Datadog also automatically tags traces by function name so you can see which specific function within a function app was executed, allowing you to focus your troubleshooting efforts. For example, in the screenshot below, we can see a .NET Azure function called
SendEmailReminderAboutShoppingCart is throwing an exception.
The Datadog App Service extension expands on our Azure App Service integration, enabling you to correlate Azure Functions trace data with metrics, traces, and logs from across your Azure-hosted resources. For instance, you can correlate Azure Functions traces with metrics collected from your underlying App Service plan at the time of the trace to determine whether a performance issue is related to an underlying capacity problem. If you see a correlation between a performance issue such as increased latency and high CPU or memory usage, you can take steps to reconfigure your functions and App Service to ensure they have the resources to scale as needed.
Together with our Azure App Service integration, the Datadog App Service extension lets you monitor Azure Functions in context with the rest of your serverless Azure infrastructure for even deeper visibility into the health and performance of your App Service plan. For more information, check out our documentation.
If you’re not already a Datadog customer, sign up today for a 14-day free trial.