Support & Documentation
Follow

Azure Functions

Retrace now supports Azure Functions in App Service Plan mode. It will treat Azure Functions as a transaction, similar to a web application or a Tracked Function.  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.

Retrace does not work in "consumption" mode currently. We are working with Microsoft on how to work with it in the future. Microsoft is working on changes to allow it. This most likely won't happen until EOY 2017 or early 2018.

 

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.

 

Installation

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 Function App, go to Platform Features -> Application Settings

Under "App settings" add these 3 settings:

Stackify.ApiKey= [your key]
COR_ENABLE_PROFILING=1
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:

COR_PROFILER_PATH=D:\home\Stackify\Profiler\v4.0.6.2\x86\StackifyProfiler_x86.dll

or

COR_PROFILER_PATH=D:\home\Stackify\Profiler\v4.0.6.2\x64\StackifyProfiler_x64.dll

 

Function App Settings

Note: For normal App Services, we don't require setting the 3 "COR" settings. We are working with the Microsoft team currently to see if we can simplify this.

 

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-Package StackifyLib -Version 2.0.0-beta2 -Pre

     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?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk