This document contains links to Microsoft documentation, which are provided for reference and informational purposes only.  is not affiliated, associated, authorized, or endorsed by Microsoft, or any of its subsidiaries or its affiliates, and as such makes no representation as to the accuracy or content of Microsoft documentation.

serverless monitoring for Azure Functions gives you visibility into the performance of your applications that run as functions on Microsoft Azure. The .NET Agent supports Azure Functions hosted on App Service plans. Once installed, the .NET Agent automatically discovers business transactions in your Azure Functions.

You can monitor your applications running in Azure Functions exactly as you would any other application instrumented with the .NET Agent. Correlate business transactions between and through Azure Functions receive snapshots, create callgraphs, and integrate functions with End User Monitoring. 

Instrument Windows Hosted Azure Functions

Before You Begin

Before you start instrumenting the .NET Agent with Azure Functions, make sure you meet the following requirements:

Microsoft Azure Requirements
Requirements

Instrument Linux Hosted Azure Functions

Before You Begin

Before you start instrumenting the .NET Agent with Azure Functions, make sure you meet the following requirements:

Microsoft Azure Requirements
Requirements

For information on how to install the .NET Agent in a Linux container, see Install the .NET Agent for Linux in Containers.

Install  Azure Site Extension

To add the  Azure Site extension:

  1. Log in to the Windows Azure Portal.
  2. Browse to Function App and select the desired function.

  3. Select Platform Features > Site Extensions > +Add
  4. Click Choose Extensions and select  Azure Site Extension 4.5. 
  5. Click Legal Terms. Review AppDynamic's legal terms and conditions and select OK
  6. Click OK in the Add Extension menu to complete the installation. 
  7. Restart the function app. 

After you install the  Azure Site Extension, it appears in the list of the installed extensions.

Connect the .NET Agent to the Controller 

You can connect your Azure Function apps to your Controller using the Kudu Console.

  1. Navigate to the  Controller Configuration page in the Kudu Console:
    http://{web app}.scm.azurewebsites.net/appdynamics/
    For example: https://myazureexample.scm.azurewebsites.net/appdynamics/
  2. On the Controller Configuration page, enter your Controller connection information.
    For example:
    • Controller Host: mycompany.saas.appdynamics.com
    • Port: 443
    • Enable SSL: selected
    • Account Name: MyAccount
    • Acccess Key: <string>
    • Application Name: MyAzureApp
  3. Click Validate to test the connection to the Controller and save your settings.
  4. Restart your function app.

Verify Instrumentation

To verify Azure Function instrumentation, view the function on flow maps in the Controller UI.

Azure Function Names in the Controller UI

In the Controller, the business transaction names match the Azure Function name.

HTTP Trigger functions are named using two segments of the function URL. You can change the name of HTTP Trigger functions in custom transaction naming

Microsoft Azure, the Azure logo, Azure, and any other Microsoft Marks used in these materials are trademarks of Microsoft.com, Inc. or its affiliates in the United States and/or other countries.