Azure App Service

APM Setup documentation for an Azure App Service website

Please read the general .NET setup instructions for more information on supported frameworks and in-app setup.

App Service Plan

We recommend a minimum B1/S1 App Service plan.

Support for an AlwaysOn App Service and Continuous running WebJob is needed to run the Raygun Agent successfully.

Installing the Raygun Agent

The Raygun Agent is installed into an Azure App Service using the extensions functionality. Extensions can be managed in two places, either in the Azure Portal or the Kudu site for your App Service.

These instructions will follow using the Azure Portal to install the extension but if you want to use the Kudu site go to https://<your-app-name>.scm.azurewebsites.net/SiteExtensions/#gallery

 

1. Navigate to https://portal.azure.com

2. Within the portal, locate your App Service and find the Application Settings menu option (found under the Settings sub heading).

3. Modify the Always On option to On.

Set Always On option to On

4. Add a new application setting with the name Raygun_ApiKey and value set to your API key from Raygun (as found in the Raygun application setup instructions). Make sure you save the changes to the application settings.

Add Raygun_APIKey application setting

5. Navigate to the Extensions menu option (found under the Development tools sub heading) and click the Add button.

Add App Service extension

6. Select the .NET Raygun APM option from the list of extensions. Then click OK to accept the legal terms and OK again to start installing the extension.

Choose the Raygun App Service extension

7. You will receive a pop-up notification from the Azure Portal when the extension has completed installation.

Extension installed successful notification

8. You will now have a new WebJob running called RaygunAPM that runs continuously. This WebJob is responsible for running the Raygun Agent process so must not be removed or modified.

Raygun APM WebJob listing

9. The Raygun Agent is now installed, but you will need to restart your Azure App Service to start the profiling of your application.

Restart the App service

Updating the Raygun Agent

The Raygun Agent for Azure service apps will automatically check for updates each time the RaygunAPM WebJob is started. If an updated version is found it will download the update packages first then start.

To force it check for updates, stop and start the  RaygunAPM WebJob. If an update was found, then it is recommended that the Service app also be restarted.

Troubleshooting

The Raygun Agent runs as a continuous WebJob inside the Kudu management site. You can see the process listed in the process list of Kudu by going to https://<your-app-name>.scm.azurewebsites.net/ProcessExplorer/

Raygun Agent shown in the Kudu process list

To restart the Raygun Agent simply stop and start the RaygunAPM continuous WebJob.

The Raygun Agent logs are located under the home location for your App Service, under LogFiles\Raygun\AgentLogs. You can download the log files through an ftp client to your App Service or by using one of the debug consoles in Kudu.

For example, navigate to https://<your-app-name>.scm.azurewebsites.net/DebugConsole/?shell=powershell and enter cd D:\home\LogFiles\Raygun\AgentLogs to change directory to the logs folder. You can then download the log files through the console or click the edit icon to view the file on-screen.

All other Raygun Agent and Profiler files are installed into D:\home\Raygun. Please do not modify these files without direction from Raygun support.

Uninstalling the Raygun Agent

To uninstall the Raygun Agent, simple remove the Azure App Service extension and restart your App Service.

1. Navigate to the Extensions menu option (found under the Development tools sub heading) and select the .NET Raygun APM extension from the list.

Raygun APM App service extension installed

2. Click the Delete button and confirm that you want to delete the extension.

Delete the Raygun APM App Service extension

3. Confirm that the WebJob has been removed and restart your App Service.

4. Optionally if you don't plan on installing the extension again you can remove all files stored in the D:\home\Raygun location. If you plan to install the extension again at a later date then we recommend leaving these files in place.

Documentation missing?

If we don't have documentation about your desired topic, send us a message and we'll create it for you.