- 1 Minute to read
- Print
- DarkLight
- PDF
.NET APM on Linux
- 1 Minute to read
- Print
- DarkLight
- PDF
Retrace supports .NET applications with multiple Linux distros. Please see the list of supported technologies to ensure your distro is supported.
1. Install the Stackify Linux Agent
Install the latest Stackify Linux Agent on the device that will be executing the application.
2. Set the Environment Variables Required by the Profiler
The .NET CLR requires environment variables to be set in order to load a profiler into a process. There are several ways to set these environment variables. Here is an example that only needs to be set once and will be available to each new process that loads without any additional steps.
a. Open environment
from the command-line
```
sudo nano /etc/environment
```
b. Add the environment variables
CORECLR_PROFILER={cf0d821e-299b-5307-a3d8-b283c03916da} CORECLR_ENABLE_PROFILING=1 CORECLR_PROFILER_PATH="/usr/local/stackify/stackify-dotnet-apm/StackifyProfiler.so"
c. Save & Exit
3. Enable & Configure Your Application
Configuration must be set in Stackify.json
in your application folder for proper coordination with Retrace. The existance of this file is used to tell the profiler to profile it. If these values are not present or are duplicated, it may prevent your data from displaying in Retrace.
a. AppName
- this value determines the name of the app displayed in Retrace.
b. Environment
- this value determines the name of the environment for the app displayed in Retrace.
Here's an example of a config file using json:
{
"AppName": "MyApp",
"Environment": "MyEnvironment"
}
4. Deploy and Launch Your Application
Trace data will be automatically processed by the Linux Agent and submitted to Retrace.
Troubleshooting
Profiler debug logging will be written here:
/usr/local/stackify/stackify-dotnet-apm/debug/
Stackify Linux Agent Logs can be found here:
/usr/local/stackify/stackify-agent/log/
Trace data will be written here:
/usr/local/stackify/stackify-dotnet-apm/log/