Mac

For macOS, we recommend running the Raygun agent on Docker. If that option is unavailable you can run it directly on your machine as described below.


These steps make use of the Linux agent, which will work on macOS with a few adjustments:

While the Linux build is labelled as "self-contained," that only applies to Linux, so .NET will need to be installed when running on macOS. If not already installed, download and install the .NET Core 3.1 runtime.

Download the Linux 64-bit (Self-contained) agent from the downloads page or download directly. Extract it using the unzip command.

In the extracted files, edit rgc.runtimeconfig.json so that it looks like this (adding the “framework” section):

{
  "runtimeOptions": {
    "tfm": "netcoreapp3.0",
    "framework": {
      "name": "Microsoft.AspNetCore.App",
      "version": "3.0.0"
    }
  }
}

In the extracted files, edit appsettings.json to add an “Agent” entry so it looks like this:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "Agent": {
    "SettingsDirectoryPath": "/usr/local/share/Raygun/AgentSettings",
    "BlacklistDirectoryPath": "/usr/local/share/Raygun/Blacklist",
    "LogDirectoryPath": "/usr/local/share/Raygun/AgentLogs"
  }
}

You will need to set an environment variable with your API key first. This key can be found on the setup instructions page when creating a new application in Raygun, or from your application's settings page. Then run the agent from the directory where it was unzipped.

export Raygun_DefaultApiKey=[YOUR-API-KEY]
dotnet RaygunAgent.dll

When restarting the application there is an overhead that could cause the CPU to spike, but this high usage shouldn't persist. APM products will always have an overhead, but our goal is to ensure it's the lowest overhead possible. The high CPU usage you're experiencing is likely caused by a high method call count. We recommend setting up code filtering for a selection of high count method calls and seeing if this improves the CPU usage.

If this issue persists, please reach out to our engineering support team via the contact page, or click contact us in the app.


Run some basic status checks by using the rgc tool found in the Raygun installation folder.

Note that on macOS you will need to set this environment variable before using the rgc tool:

export Raygun_SettingsDirectoryPath=/usr/local/share/Raygun/AgentSettings 
dotnet rgc.dll -status

The result should look similar to this:

Running Raygun Agent status checks...
Agent status: Registered
Agent test: Connected to the Raygun Agent v1.0.\*.0 on port 2790.
API test: Connected to the Raygun API at https://api2.raygun.com.
API key test: API key *** is valid
Profiler x86 test: 32-bit Profiler found at ...
Profiler x64 test: 64-bit Profiler found at ...

If any checks fail you will receive a message describing the problem. Here are some things you can try in order to resolve these problems:

  • Depending on your installation, list the running services or processes to check that the agent is running.
  • If the application you are profiling is on a separate machine from the agent check that traffic is allowed on port 2790.
  • Check that the machine running the Raygun Agent can access the Raygun API at https://api2.raygun.com/healthcheck, either using your browser or the cURL command. If you're using a browser, look for a 200 response in the network tab of the browser's developer tools.
  • Check that your firewall is not blocking Raygun.
  • Check that the API key is correct. If you have not sent any traces yet, your API key is displayed at the top of the instructions page for your new application. Otherwise, you can find the key under "Application settings" in the menu on the Raygun dashboard. Ensure that this is the same key that you used when you installed the agent.

If you are still not receiving traces, you will need to send us diagnostic session as described below:


  • The log files for the Raygun Agent are located under /usr/local/share/Raygun/AgentLogs.

  • To enable detailed logging for the Raygun Agent, add a configuration setting to the RaygunAgent.exe.config file in the directory where you installed the Raygun Agent.

  • Add a new element to the <appSettings> section like <add key="LogLevel" value="Verbose"/> (other options are Warning, Info, Verbose, Debug).

  • Save the configuration file changes and restart the Raygun Agent.


Running a diagnostics session will capture the following information and will help Raygun support to troubleshoot issues you're having:

  • Snapshot of log files
  • Snapshot of agent settings
  • Agent log files with log level of debug automatically set
  • Trace package and source files generated during the session
  • A trace of data being sent from the profiler to the agent

Start a diagnostics session that is uploaded to Raygun when complete

dotnet rgc.dll -auto-diagnostic 300

For more information on diagnostic command options, see the CLI documentation.


To be able to help you faster, we will need to know:

  • The diagnostic session identifier
  • Hosting type - cloud, on premise, Azure App Service etc
  • OS Version, 32 or 64 bit
  • Web Server (i.e. IIS or Node) version
  • Framework type (i.e. .NET Core or Rails)
  • Framework version
  • For .NET Core under IIS - in process or out of process hosting type