Azure Functions provide a powerful way to build scalable, event-driven serverless applications. As these applications grow in complexity and handle critical tasks, gaining comprehensive visibility into their performance and operational health becomes paramount.
Imagine your serverless application is composed of numerous interdependent Azure Functions. It might start experiencing intermittent slowdowns, or perhaps a critical transaction fails. In such scenarios, pinpointing the exact failing function can be difficult. Understanding the latency contribution of each step or tracing the complete path of a request through this distributed environment also becomes a significant challenge. You might find yourself sifting through basic cloud metrics, struggling to connect the dots or efficiently identify the root cause.
To address these complexities, you need a monitoring solution that offers deep insights into the inner workings of each function and the interactions between them. This is where New Relic's direct instrumentation for Azure Function runtimes comes into play. This integration is designed to provide rich, application-aware telemetry by instrumenting your function code directly with minimal code changes for supported runtimes such as Python, Node.js, and .NET.
New Relic helps you overcome observability gaps in your Azure Functions in the following ways:
Detailed Performance Monitoring: Track the execution durations for every invocation. This helps you to identify performance bottlenecks, analyze cold start impacts, and optimize function speed.
Rapid Error Diagnostics: Pinpoint and diagnose errors quickly with detailed stack traces and rich contextual data captured directly from your function's execution environment.
End-to-End Request Tracing: Visualize the complete journey of requests with distributed tracing. Distributed tracing shows how requests flow through your Azure Functions and any connected services. This simplifies the debugging of complex, multi-function workflows.
Full Execution Context: Record specific details of triggering events, such as HTTP requests or queue messages, and the responses generated by your functions. This provides comprehensive context for troubleshooting and understanding behavior.
Developers, DevOps teams, and SREs who are responsible for Azure Functions can leverage this integration to ensure their Azure Function app is not only running but are also performant, reliable, and easy to troubleshoot. This allows you to confidently build, deploy, and scale your Azure Functions while maintaining excellent operational control.
Important
For Azure Functions, the agent reports data such as distributed traces and logs, which are available under 'Services - APM' as an APM entity. However, a separate entity (provided by infrastructure monitoring) for Azure Functions still exists.

How you can configure Azure Functions monitoring?
To monitor your Azure Functions with New Relic, you can configure instrumentation across different environments, runtimes, and deployment methods. The following steps guide you through the configuration process:
Compatibility and requirements
Ensure that your Azure Function meets our compatibility and requirements for Linux, Windows, or Containers environment.
Link your Azure account to New Relic
Link your Azure account to New Relic by configuring polling for Azure Monitor metrics. This enables you to view these metrics in the New Relic UI. For more information, refer to Azure integration.
Instrument your Azure Function
Depending on your deployment environment, select one of the following options to instrument your Azure Function App with New Relic.
Configure environment variables
After you've instrumented your Azure Function with the New Relic, configure environment variables for your runtime environment.
Restart your Azure Function
After you've added the environment variables, restart your Azure Function to apply the changes.
Find your data in New Relic
After you've instrumented your Azure Function, restarted it, and sent some data from your app, you can find your data in the New Relic UI.
What's next
Linux instrumentation
Learn how to set up your Azure Functions for Linux to monitor them in New Relic.
Windows instrumentation
Learn how to set up your Azure Functions for Windows to monitor them in New Relic.
Container instrumentation
Learn how to set up your Azure Functions for Containers to monitor them in New Relic.