.NET on Linux

System Requirements

Raygun APM supports ASP.NET Core

  • Ubuntu 16.04+, CentOS 7+, Debian 10+
  • 2 GHz or faster multi-core processor
  • 1 GB of RAM
  • 2 GB available hard disk space
  • 64-Bit Linux


Before setting up your application for profiling, please:

  1. Read about APM Deploy Best Practices
  2. Install the Raygun Agent on the server you would like to monitor
  3. Register the Agent (part of the install process of the Raygun Agent)

When using systemd, the environment variables can all be added to the service file that is used to start the application. We recommend this method to configure the environment variables.

The following is an example of a service file that has been configured to profile an application:

[Unit]
Description=My-API

[Service]
Type=notify
WorkingDirectory=/var/www/myapi.com
ExecStart=/var/www/myapi.com/MyApi.Service.File
Restart=always
RestartSec=10
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false

# Raygun APM configuration
Environment=PROTON_API_KEY=*Your-API-Key*
Environment=CORECLR_ENABLE_PROFILING=1
Environment=CORECLR_PROFILER={e2338988-38cc-48cd-a6b6-b441c31f34f1}
Environment=CORECLR_PROFILER_PATH_64=/opt/raygun/agent/Profiler/RaygunProfiler.so

[Install]
WantedBy=multi-user.target

This is a simple example and you will likely need to modify it to suit your application. The important part is the Environment section, which contains the environment variables that are required to configure the Raygun Profiler.


Having trouble receiving traces? Please look at our troubleshooting guides.