---
title: ".NET APM on Linux"
slug: "dotnetcore-linux-profiler"
description: "Retrace supports .NET applications on multiple Linux distros. Install the Stackify Linux Agent, configure your app, and troubleshoot using logs."
updated: 2023-09-19T16:10:45Z
published: 2023-09-19T16:10:45Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# .NET APM on Linux

Retrace supports .NET applications with multiple Linux distros. Please see the list of [supported technologies](https://docs.stackify.com/docs/net2-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.

[Installation Instructions](https://docs.stackify.com/docs/java-agent-linux-install)

### 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"`

Configuring for systemd
 If you are running your .NET Core application within systemd, you will need to modify conf file for your job.

                         

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

Note
 Applications profiled will only display under **Other Apps** in Retrace.

                         

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/
```
