Configure Azure Functions
  • 28 Aug 2018
  • 1 Minute To Read
  • Contributors
  • Print
  • Share
  • Dark

Configure Azure Functions

  • Print
  • Share
  • Dark

Retrace supports Azure Functions in App Service Plan mode.  It supports all of the same dependencies and will provide all of the same great insights to application performance as it does for web applications and windows services.

App Service Plan mode only!
Retrace does not work in "consumption" mode currently.

How it Works

Retrace works essentially the same for Azure Functions as it does for normal App Services. The .NET Profiler is enabled for your application to do lightweight profiling. We also run our agent as a Web Job to collect the data and upload it to Retrace.


Step 1: Install the Site Extension

This is done just like it is for normal App Services with Retrace. For Function Apps, select your app and then go to Platform Features -> Extensions -> Add -> Select the Stackify APM or Retrace extension.


Step 2: Set your API Key & Profiling Variables

Within your Web App, go to Platform Features -> Settings -> Application Settings Under "Application settings" add these 3 settings:

Stackify.ApiKey enter_your_key
COR_PROFILER {de70e25c-02b5-4556-a837-8aa6fe502668}

Add one of the following, depending on if you are running the app in 32 or 64 bit mode:

32 bit

COR_PROFILER_PATH_32 D:\home\Stackify\Profiler\Latest\x86\StackifyProfiler_x86.dll

64 bit

COR_PROFILER_PATH_64 D:\home\Stackify\Profiler\Latest\x64\StackifyProfiler_x64.dll


Function App Settings

Note: For normal App Services, we don't require setting the 3 "COR" settings.


Step 3: Optionally Enable Async support

If your code is using async/await then you will also need to add a nuget package and one line of code to your function to enable our async tracking. We are working to simplify this for future releases, check this document periodically for updates. Add nuget package:

  1. Install the NuGet Package Install-Package StackifyLib
  2. Add the following as the first line of code in the Function: StackifyLib.Utils.AsyncTracer.EnsureAsyncTracer();
  3. Deploy your Function

Step 4: Viewing Azure Functions in Retrace

Azure Functions will now show up as its own option when you click the "Monitoring" tab at the top.  They will be listed like Web Apps and Other Apps.

Was This Article Helpful?