Low overhead mode


.NET / .NET Core profiler works by receiving notifications about each method starting and each method finishing. After it receives those events, it has to perform some computations required to build a trace. The performance impact of these computations is small for a single method, but when running hundreds or thousands of methods it adds up and can become significant.

To solve this problem we introduced the Low Overhead Mode. In this mode APM will not trace frequent methods to prevent them from slowing the application down.

Low Overhead Mode is supported from Agent version 1.0.1271 and up.

Questions and answers

For .NET applications we added a button to IIS tab of Raygun Configuration Tool to enable the mode as shown on the image below:

You can also use console rgc tool.

For .NET Core applications, environment variables for the process (in web.config or powershell) will need to be updated. To do that, go to the .NET Core tab and click "Show Config".

Then scroll down to the Low overhead mode section.

The environment variables are displayed there, as per the image below:

In Azure App Service, add new Configuration value Raygun_LowOverheadMode = 1 as shown on the image below:

Then you will need to:

  • Restart RaygunAPM web job
  • Restart your application

Yes, DB queries, API calls and any method from the include list will appear in the traces. All the method timings will also stay correct.

It depends on how many short and quick methods are there in the application. In some cases we observed a 10X performance improvement.

APM will stop profiling a method if it sees it being executed more than 10 times a second in any single thread.

.NET Framework 4.5 or later, .NET Core 1.0. or later