Stackify’s powerful web application performance monitoring (APM+) is fully supported on Azure Web Apps. All APM related features are supported, such as identifying slow web pages, slow database queries, and viewing complete method level profile traces.
Note: Some basic monitoring features like monitoring IIS metrics, WMI, and performance counters are not supported via Microsoft, and therefore not supported by Stackify, unfortunately.
Using Azure Cloud Services and not Web Apps?
Having problems with Retrace & your Azure App Service?
Check out our article about common problems with Azure App Services
Installation Steps for Azure App Services
Stackify APM+ is installed as a WebJob that runs on each instance. The WebJob collects the output from Stackify’s .NET profiler and uploads it. An Azure Site Extension has been created to simplify the installation process.
Add Site Extension
1. Login to the Azure portal and add the Stackify APM+ site extension. Select Web App -> Tools -> Extensions -> Add -> Select Stackify APM+
Set Application Settings
2. Via the Azure portal, configure the application settings for your Web App to set the Stackify.ApiKey as shown in your Stackify account. We also recommend setting Stackify.AppName and Stackify.Environment settings.
Restart Web App via Azure Portal
3. IMPORTANT: Restart your Web App via the Azure portal. The webjob will not begin to start collecting profiler output until this has been done.
4. Generate some traffic to your site
5. Performance data should show up within a few minutes
NOTE: Stackify APM+ will not start working until you restart your web app! If you are not seeing any data, try restarting your application again via the Azure Portal.
Multiple deployment slots
If you are using multiple deployment slots, you will want to install the site extension for each deployment slot. This is required so when you are swapping slots everything works correctly, as site extensions are part of what is swapped. Setting Stackify.Environment is also important so we can identify which slot is which.
List of possible application settings set via the Azure Portal for your app.
|Stackify.ApiKey||Required||Use your Stackify Activation Key|
|Stackify.Environment||Optional||Production/Staging/etc (Set per slot)|
|Stackify.CollectIISLogs||Optional||1 or 0 (default)|
Controlling App Name and Environment
By default we will show the app name as the same name that would be:
By default, the environment name for all azure web apps is Production. If you want to override this behavior and set the name you can specify a name in your web.config or the azure portal application settings.
Note: We would recommend setting Stackify.Environment for each of your deployment slots and making it a sticky setting per slot.
If you are using Stackify’s error and log management solution, you can have the Stackify WebJob collect your IIS logs and upload them automatically. You can do this by enabling the log collector feature in Stackify across all servers, or you can enable for just a particular app by setting an Azure portal application setting.
Azure portal application settings to enable or disable IIS log collection:
(or 0 to disable)
NOTE: You must enable web server logs in the azure portal for your app for this to work.
How to update Stackify APM+ on Azure Web Apps
Periodically we will release updates. The Stackify WebJob has been designed so that every time it starts it will check for and download the latest version. Restarting your Azure WebApp will force it to update, although some changes may not take effect until your app is restarted once again after the WebJob makes some changes.
Web Deployment Task Failed Error
If you are trying to deploy your application and getting an error about StackifyWebJob files being locked, you may need modify your deployment settings. Stackify runs as a WebJob that is installed via the Azure Site Extension in to your App_Data folder. If you are trying to use the optional deployment setting of "Remove additional files at destination" this would try to remove our WebJob.
Error: Web deployment task failed. (Web Deploy cannot modify the file 'StackifyWebJob' on the destination because it is locked by an external process.
To fix this, also select "Exclude files from the App_Data folder" so the Stackify WebJob is not affected by the deployment. This setting is shown below in the Visual Studio UI as part of the publish options.
Due to the “sandbox” nature of Azure Web Apps, debugging can be difficult, and can be made more difficult in a “scaled” website with more than one running instance. Stackify’s WebJob and .NET profiler both have log files and Stackify’s support team may ask for your assistance in retrieving them. They are accessed via Azure’s Kudu console.
If you experience any issues, please contact email@example.com with details of the issue. Along with that request, please supply any log files produced by the WebJob, which can be found in the following location of your Website:
(rotating file log, may be more than one file).
To get to this location, please see this documentation on how to use the Kudu Debug Console for Azure Web Apps.
Along with your log files, we have some common troubleshooting steps for your Azure Web App to try as well.
If your site is multi-instance, please let Stackify Support know – some additional steps may be necessary to obtain all debug logs.
Uninstalling APM+ for Azure Web Apps
Stackify is installed as an Azure Site Extension which installs a WebJob and a .NET CLR profiler. To disable Stackify on your Azure Web App, delete the Azure Site Extension from each deployment slot and restart your app. This should automatically delete the WebJob and disable the CLR profiler.
Advanced steps to double check everything is removed:
- Via the Azure portal, delete the Stackify APM+ site extension for your web app on each deployment slot that it was installed on
- Double check that the StackifyWebJob was properly deleted by viewing the list of WebJobs for your web app.
- Via Kudu ensure that the folder under D:\home\SiteExtensions\Stackify.AzureWebApps is deleted
- Delete everything under D:\home\stackify
- Delete StackifyHttpTracer.dll from the bin folder of your app
If you are having serious problems and need to urgently disable Stackify APM+ you can create a new deployment slot that does not have the Stackify extension in it. Redeploy your app to that slot and swap it to production, then delete the old slot and recreate it.