Azure App Services

Welcome to the Raygun APM troubleshooting guide for Azure App Services. In this guide, we'll walk you through a series of steps to help you identify and resolve common issues with the Raygun APM. Please follow the suggested solutions based on the problem you're experiencing, and don't hesitate to contact Raygun Support if you need further assistance.



The Raygun Azure App Service Extension contains three Web Jobs. One of which is RaygunAPM-Status.

In the Azure Portal, navigate to the Web Jobs and locate the Status job.

Web Jobs

Run the job and then check the logs to ensure the Agent can communicate with the Raygun API and the profiler, and that the API key is valid.

Example Logs:

[... INFO] Running Raygun Agent status checks...
[... INFO] Agent status: Registered
[... INFO] Agent test: Connected to the Raygun Agent v1.1.7.0 on port 2704.
[... INFO] API test: Connected to the Raygun API at https://api2.raygun.com.
[... INFO] TLS test: TLS 1.2 is supported on this machine.
[... INFO] API key test: API key KA5.............LJr6w is valid
[... INFO] Profiler x86 test: 32-bit .NET Profiler found at C:\home\Raygun\Profiler\1.1.7\x86\RaygunProfiler.dll.
[... INFO] Profiler x64 test: 64-bit .NET Profiler found at C:\home\Raygun\Profiler\1.1.7\x64\RaygunProfiler.dll.

note: If the status fails for any reason the agent may not be installed correctly. Please try uninstalling the extension, then re-installing it following the steps outlined in Installing Azure App Services.

If problems persist, please contact us.


To check the Profiler is attached:

  1. Ensure the environment variables are correct
  2. Check the loaded modules

Perform both these checks in the Kudu tool. To open the Kudu tool, navigate to the Advanced Tools section under Development Tools in the Azure Portal and press Go to load the Kudu tool.

Advanced Tools

Navigate to the Process Explorer in the top navigation.

Kudu Landing

In the process explorer, find the w3wp.exe process without scm in the name, and go to Properties.

Process Explorer

Under the Properties tab navigate to the Environment Variables tab and verify that the Environment Variables for enabling the profiler and the location of the profiler .dll file have been correctly set.

Environment Variables

note: If the environment variables are not found, this could indicate the applicationHost.xdt file has not been applied. Try stopping/starting the application, then checking again. After a stop/restart it will take up to 60 seconds for the transformation to be applied before the variables will be visible.

If problems, persist please contact us.

In the same Process explorer navigate to the Modules tab.

Modules

Scroll down the list to R and verify RaygunProfiler.dll is in the list.

Modules

note: If the RaygunProfiler.dll is not found in the modules list, there may be a conflicting profiler enabled, such as Application Insights. Please ensure no other Profiling extensions are enabled, if they are, disable them and restart the application.

If problems persist, please contact us.


In the Azure Portal, find the Application Insights section under Settings.

If enabled, this will need to be disabled.

note: It is only possible to attach one profiler to an application. If Application Insights is enabled, the Raygun Profiler will not attach. If any other 3rd party profilers are enabled, you must disable them first.


If you are recieving traces and they are not as expected, you can run a diagnostics session, which will capture the raw traces and allow us to analyze them.

In the Azure Portal, navigate to the Web Jobs and locate the Diagnostics-Session job.

Web Jobs

Select the job and run it.

The Diagnostics-Session will run for 2 minutes, once the job moves from Initializing to Running (please allow 20-30 seconds to ensure the capturing has started), you can navigate the website, invoking URLs that cause unexpected traces to occur.

Once the job has completed, you can navigate to the logs.

Example Logs:

[... INFO] Raygun Agent for Windows
[... INFO] Diagnostics session started.
[... INFO] Starting diagnostics session for 2 minutes
[... INFO] 
[... INFO] Message: Diagnostics session is currently running.
[... INFO] 
[... INFO] Message: Diagnostics session is currently running.
...
[... INFO] Message: Diagnostics session is currently running.
[... INFO] 
[... INFO] Message: Diagnostics session is currently running.
[... INFO] 
[... INFO] Message: Diagnostics session has ended.
[... INFO] Session Id: 9575dd96
[... INFO] Duration: 120 seconds
[... INFO] 
[... INFO] ----------------------------------------
[... INFO] Diagnostics session complete

note: After the diagnostics session has run and completed, you will receive a Session Id such as 9575dd96.

Please contact support and inform us of the issue and include the Session Id from the diagnostics session.


The Raygun Agent shouldn't use much CPU, and its memory footprint should be relatively low. If this is not the case, please send us a process dump.

Both these checks need to be done in the Kudu tool, to open the Kudu tool, navigate to the Advanced Tools section under Development Tools in the Azure Portal and press Go to load the Kudu tool.

Open the process explorer and find the RaygunAgent.exe process, right click and select Download Memory Dump > Full Dump

Memory Dump

In the same process explorer, find the RaygunAgent.exe and click Start Profiling on the right hand side.

Profiling Session

Allow the profiling session to run for a couple of minutes (2-5 minutes should be enough time providing the CPU utilization is high during profiling)

note: After downloading the Memory Dump and/or the Process Session, please zip up the files and contact support.


If you need further help please contact us.