Documentation forSolarWinds Observability SaaS

Install the .NET Library on Linux

Before you start

Verify the following to ensure the library can collect and transmit data:

  • The platform where your APM library will be installed is supported.

  • Your application components are supported by the library.

  • Your firewall configuration permits TCP/HTTPS/TLS outbound connections to apm.collector.xx-yy.cloud.solarwinds.com (where xx-yy is determined by the URL you use to access SolarWinds Observability SaaS, described in Data centers and endpoint URIs) using port 443. See Firewall or access control requirements.

    If your firewall or access control requirements do not allow such connections, configure the library to send data through a proxy.

Do not run other APM libraries alongside the SolarWinds Observability .NET Library. See Do you have another profiler installed?.

Get the library

The library is distributed as a compressed archive that can be downloaded from one of the following download locations:

The archive can be extracted to any location, but SolarWinds recommends extracting it to a directory named $HOME/solarwinds. All the examples below assume this as the installation directory.

  1. Select the tab below for the architecture and libc implementation of your Linux distro and copy the command, or in step one of the Add Data dialog select the architecture and libc implementation of your Linux distro and click Copy .

    Run the copied command in the command line to download and extract the library.

    x86_64 glibc

    Copy the command below.

    mkdir -p ${HOME}/solarwinds
    pushd ${HOME}/solarwinds
    curl -sSO https://agent-binaries.cloud.solarwinds.com/apm/dotnet/latest/solarwinds-apm-dotnet-agent-package.linux.x86_64.tgz
    tar -xvf solarwinds-apm-dotnet-agent-package.linux.x86_64.tgz
    popd
    ARM64 glibc

    Copy the command below.

    mkdir -p ${HOME}/solarwinds
    pushd ${HOME}/solarwinds
    curl -sSO https://agent-binaries.cloud.solarwinds.com/apm/dotnet/latest/solarwinds-apm-dotnet-agent-package.linux.arm64.tgz
    tar -xvf solarwinds-apm-dotnet-agent-package.linux.arm64.tgz
    popd
    x86_64 musl (Alpine)

    Copy the command below.

    mkdir -p ${HOME}/solarwinds
    cd ${HOME}/solarwinds
    curl -sSO https://agent-binaries.cloud.solarwinds.com/apm/dotnet/latest/solarwinds-apm-dotnet-agent-package.alpine.x86_64.tgz
    tar -xvf solarwinds-apm-dotnet-agent-package.alpine.x86_64.tgz
    
    ARM64 musl (Alpine)

    Copy the command below.

    mkdir -p ${HOME}/solarwinds
    cd ${HOME}/solarwinds
    curl -sSO https://agent-binaries.cloud.solarwinds.com/apm/dotnet/latest/solarwinds-apm-dotnet-agent-package.alpine.arm64.tgz
    tar -xvf solarwinds-apm-dotnet-agent-package.alpine.arm64.tgz
    
  2. Copy the command below or click Copy in step two of the Add Data dialog. Run the copied command in the command line to designate the library as a CLR profiler.

    export SW_APM_HOME_DOTNET=${HOME}/solarwinds
    export CORECLR_PROFILER={AAAA7777-11FE-4F94-8EDA-312C0EDF4141}
    export CORECLR_PROFILER_PATH=${SW_APM_HOME_DOTNET}/solarwinds_apm_profiler.so
  3. Copy the command below or click Copy in step three of the Add Data dialog. Run the copied command in the command line to enable the library for a process.

    export CORECLR_ENABLE_PROFILING=1

    If this environment is set at the system level, you may selectively disable a process from instrumentation by setting CORECLR_ENABLE_PROFILING=0 for the process. For example, to exempt the dotnet SDK commands, run the following commands in a bash shell:

    CORECLR_ENABLE_PROFILING=0 dotnet --info
    CORECLR_ENABLE_PROFILING=0 dotnet publish ...
  4. Copy the command below or click Copy in step four of the Add Data dialog. Run the copied command to define the Service key and ingestion endpoint for the library using environment variables. To set the Service key and ingestion endpoint in the config file instead, see Configure the .NET Library.

    export SW_APM_SERVICE_KEY=YourServiceKey
    export SW_APM_COLLECTOR=YourSolarWindsApmCollectorEndpoint

    Modify the following text in the above commands:

    • Replace YourServiceKey with the Service key you are using to identify your account and the service being instrumented. 

      The Service key should be in the form of YourApiToken:YourServiceName. Replace YourApiToken with the SolarWinds Observability API token (ingestion type) generated for this service, and replace YourServiceName with your chosen name for this service. See API Tokens.

      The service name is also called the entity's service ID in SolarWinds Observability SaaS. The service name can also be seen in the Overview tab in the service entity's Entity Explorer details view. Editing the display name of the service entity in SolarWinds Observability SaaS does not affect the Service key.

    • Replace YourSolarWindsApmCollectorEndpoint with the correct SolarWinds APM collector endpoint for your organization.

      The SW_APM_COLLECTOR setting is optional and ensures the correct endpoint URI is used when sending data to the SolarWinds APM collector. To determine the correct endpoint for your SolarWinds APM collector, see Data centers and endpoint URIs.

  5. Restart the .NET Core application for these changes to take effect.

Troubleshooting

After you install the library, if traces and metric data do not appear in the Traces Explorer and Metrics Explorer, a diagnostic tool is available to help troubleshoot the problem. See Troubleshoot the .NET Library for information on how to use the diagnostic tool and for help resolving the issue.

Instrumenting .NET 6+ executables

Any application that starts with the dotnet command (runs under the dotnet process), is automatically considered for instrumentation. An example:

dotnet dotnet-core-application.dll

To instrument an application that is run directly such as a self-contained executable, add it in the <applications> section in the agent.config configuration file. An example:

<applications>
  <application name="dotnet-core-executable" />
</applications>

Log file location

Library log files are located under the /var/tmp/solarwinds directory.

Uninstall the library

Unset all the environment variables exported during the Get the library section and (optionally) remove the library installation directory.

The library can also be disabled via the ApmAgent configuration setting.

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.