.NET 6+
System Requirements
- .NET 6+ running on Windows
- .NET 6+ running on CentOS, Debian & Ubuntu
- Other Linux distributions may work but are not officially supported
Installing the agent
Step 1 - Download the installer
Download the Raygun Agent on the server you would like to monitor.
Step 2 - Install the Agent
Open the Agent installer you downloaded and follow the on-screen prompts to install the Agent.
Step 3 - Register the Agent
Launch the Raygun Profiler Configuration tool. Under the Agent tab of the configuration tool, set the Default API key to your app's API key and then click Register Agent.
- Default API key |
paste_your_api_key_here
Note: Your app API key is displayed when you create a new application in your Raygun account, or can be viewed in the application settings.
Step 4 - Attach to a .NET Core process
Open the .NET Core tab in the Raygun Profiler Configuration tool.
If your .NET Core application is running then you can select it from the process list.
If your process is not listed then find the path to your process dll or exe and enter it into the assembly name field.
With your .NET Core process selected, click the Register button, then enter your Raygun application API key into the dialog and click Save.
Step 5 - Register the profiler
There are many ways in which a .NET Core application can be started, so we've listed some common methods along with the required environment variables needed to configure the Raygun APM profiler correctly. To view these options, click the Show Config button from the configuration screen:
Select the appropriate option from that list, and set your environment variables. Now everything is configured. Make a few requests to your application and traces should appear within Raygun after a couple of minutes. If they don't appear, try running status checks and running a profiler test below.
Step 6 - Update to the latest version of Raygun4Net
We recommended you update the Raygun4Net NuGet package used in your .NET application to the latest release in order to correlate data between Crash Reporting and APM.
You can do this by running the following command from within the directory of your project file or from the NuGet management GUI in the IDE you use.
dotnet add package Mindscape.Raygun4Net.NetCore
Installing using the Raygun CLI tool
Another method for registering and profiling a .NET Core application is to use the Raygun CLI tool
1. Register your .NET Core process with the Raygun application API Key using the following command.
# Configure HelloWorldApp.dll with an API Key
rgc.exe -enable HelloWorldApp.dll -type dotnetcore -apikey xxx -startup 30 -norecycle
2. To start the process and automatically configure the correct environment variables you can bootstrap the execution of your .NET Core process using the following command.
# Start HelloWorldApp.dll process with profiler environment configured
rgc.exe -profile "%ProgramFiles%\dotnet\dotnet.exe" -arguments HelloWorldApp.dll -coreclr -apikey <APP-API-KEY> -startup 60
Deregistering an application
1. To stop profiling a .NET Core application you'll first need to remove the environment variables that were configured when your application starts. Once these have been removed, restart your application to stop profiling.
2. The final step is to remove the API Key configuration by going to the .NET Core tab in the Raygun Profiler Configuration tool. Select the configured process and click the Deregister button.
Troubleshooting
Having trouble receiving traces? Please look at our troubleshooting guides.