Documentation forSolarWinds Observability

Add a .NET service

The SolarWinds Observability .NET Library provides automatic tracing and metrics for .NET Framework and .NET Core/5+ (which includes .NET Core, .NET 5.0, and later versions) applications, on a variety of Windows and Linux platforms. For new features, fixed issues, and updated components, see the .NET Library Release Notes.

Get started

Ensure that your application components are supported and the platform for your APM library is supported. Also, verify 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, see Endpoint URIs) using port 443. See Firewall or access control requirements.

The instrumentation methods available and the components required for their installation depend on the operating system and .NET runtime versions that you use. The following tables show the instrumentation installation options available for .NET Framework (2.0 - 4.8) and for .NET Core (3.1), .NET 5+, .NET Standard (1.0 - 2.1) runtime versions.

.NET Framework (2.0 - 4.8)

The following table shows the instrumentation installation options for the .NET Framework 2.0 - 4.8 runtime versions.

Instrumentation method Components required for installation
Windows Linux

Automatic instrumentation

Windows library installer (.exe) Not supported

SDK interface for custom instrumentation

SDK interface NuGet package: SolarWindsAPM.Agent.Api.nupkg

Windows library needs to be installed.

Not supported

.NET Core (3.1), .NET 5+, .NET Standard (1.0 - 2.1)

The following table shows the instrumentation installation options for the .NET Core 3.1, .NET 5.0 and later, and .NET Standard 1.0 - 2.1 runtime versions.

Instrumentation method Components required for installation
Windows Linux

Automatic instrumentation

Windows library installer (.exe) Linux library package (.tgz)
Agent NuGet package: SolarWindsAPM.Agent.nupkg  
SDK interface for custom instrumentation

SDK interface NuGet package: SolarWindsAPM.Agent.Api.nupkg

Windows or Linux library must be installed

SolarWindsAPM.Agent.nupkg contains SDK interface and the .NET Library that can be used with or without automatic instrumentation.

Automatic instrumentation

Ensure that your application components are supported and the platform for your APM library is supported. Also, verify 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, see Endpoint URIs) using port 443. See Firewall or access control requirements.

To enable instrumentation for a .NET application and send the data to SolarWinds Observability:

  1. In SolarWinds Observability, click Add Data in the upper-right corner.

  2. In the Add Data dialog, click Services.

  3. Type a Name for your service and select the .NET language for your operating system.

  4. Create or select an API ingestion token to use when sending your collected service data by doing either of the following:

    • Select Generate New Token and enter an Ingestion Token Name, then click Next.
    • Select Use Existing Token and select an ingestion token from the list, then click Next.
  5. Install the library on the host system and configure the Service key during installation.

    Use these instructions to install the library:

    When prompted during installation, use the Service key shown in the Add Data dialog.

  6. Restart IIS or the .NET Core application to load the library and automatically begin reporting data.

  7. When the .NET Library successfully connects to the SolarWinds APM collector, the Waiting for Connection button in SolarWinds Observability changes to OK.

  8. Click OK to finish setting up the service.

To tailor the installed library to your monitoring needs, see Configure the .NET Library.

Custom instrumentation

Custom instrumentation can be used to get extra application-specific visibility in SolarWinds Observability, both adding custom spans for distributed tracing and adding custom timers or counters for metric reporting and alerting.

Custom instrumentation is available with one of the following NuGet packages:

  • SolarWindsAPM.Agent.Api NuGet package: This package contains the Instrumentation SDK interface that works with the library to enhance tracing for both .NET Framework and .NET Core apps.

  • SolarWindsAPM.Agent NuGet package: This package can be included in your .NET Core application. It not only provides automatic instrumentation, but includes an Instrumentation SDK that will work with and without the library.

See SolarWindsAPM.Agent NuGet package and .NET Library instrumentation SDK.

Code profiling

Code profiling provides extra insight into code level execution time that is otherwise not captured by auto-instrumentation. See Code profiling and the .NET-specific details for more information about this feature.