Documentation forSolarWinds Observability SaaS

Add a .NET service

The SolarWinds Observability .NET Library provides automatic tracing and metrics for .NET Framework and .NET 6+ 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

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 otel.collector.xx-yy.cloud.solarwinds.com (or apm.collector.xx-yy.cloud.solarwinds.com when using legacy mode) port 443, where xx-yy is determined by the URL you use to access SolarWinds Observability SaaS, described in Data centers and endpoint URIs. 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.

Remove other APM libraries from your .NET application before using the SolarWinds Observability SaaS .NET Library. See Do you have another profiler installed?.

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 (3.5, 4.6.2 - 4.8) and for .NET 6+ runtime versions.

.NET Framework (3.5, 4.6.2 - 4.8)

The following table shows the instrumentation installation options for the .NET Framework 3.5 and 4.6.2 - 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 6+

The following table shows the instrumentation installation options for the .NET 6+ runtime versions.

Instrumentation method Components required for installation
Windows Linux

Automatic instrumentation

Windows library installer (.exe) Linux library package (.tgz)
Library 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 the SDK interface and the .NET Library, which can be used with or without automatic instrumentation. The NuGet package can be used on a server that has the Windows or Linux library installed.

Automatic instrumentation

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 otel.collector.xx-yy.cloud.solarwinds.com (or apm.collector.xx-yy.cloud.solarwinds.com when using legacy mode) port 443, where xx-yy is determined by the URL you use to access SolarWinds Observability SaaS, described in Data centers and endpoint URIs. 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.

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

  1. In SolarWinds Observability SaaS, click Add Data at the top.

  2. In the Add Data dialog Intro, click Monitor my application performance.

  3. Click .Net.

  4. Type a name for your service and select the environment (self-managed Linux or self-managed Windows). Click Next.

  5. 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, and then click Next.
    • Select Use Existing Token and select an ingestion token from the list, and then click Next.
  6. 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.

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

  8. Wait for the .NET Library to successfully connect to the SolarWinds APM collector and for the Waiting for Connection button in SolarWinds Observability SaaS to change to OK.

  9. Click OK to finish setting up the service.

    To view data collected for the newly configured entity in the Entity Explorer, click the name of the entity type in the confirmation dialog in the lower-left corner. It may take a few seconds for data to appear for the newly created entity. See Entity Explorer for details.

    For transaction and trace data to appear in the Entity Explorer and Traces Explorer, your service must be running and in use.

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 SaaS, 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 6+ application. It contains the SDK interface and the .NET Library, which can be used with or without automatic instrumentation.

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.