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.
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]
Add one of the following, depending on if you are running the app in 32 or 64 bit mode:
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:
Install-Package StackifyLib -Version 2.0.0-beta2 -Pre
2. Add the following as the first line of code in the Function:
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.