Instrumenting custom applications

By default, the New Relic .NET agent instruments IIS-hosted ASP.NET applications. In some cases, you can also instrument other (non-IIS) .NET applications, such as standalone Windows Communication Foundation (WCF) services, console apps, and other Windows services provided they meet New Relic's requirements.

Requirements

The .NET Agent depends on HttpContext objects being instantiated to properly instrument and report on web transactions. These objects are created and populated as part of the ASP.NET HTTP pipeline, but they may not be created in other environments. You may still get data for other types of transactions (for example, SQL traces), but web transactions depend on a valid HttpContext for tracing.

If you want to instrument custom applications with New Relic, be sure to choose the Instrument All .NET Applications feature during installation. If you want to add this feature later:

  1. Launch the installer.
  2. Select the Change option.
  3. Enable the Instrument All .NET Applications feature.
  4. Restart your application after completing the change install.
  5. Update your configuration file.

Once you have installed the Instrument All .NET Applications feature, you must customize the settings for non-IIS .NET applications. Different options are available by editing your newrelic.config file or your app.config file. For more information, see .NET agent configuration (Instrumentation).

ASI eligibility requirements
Applications > (apps list): If your custom (non-IIS) .NET applications do not appear in your New Relic Applications menu, make sure you have enabled the installer's Instrument All .NET Applications feature, and then define your app in your app.config file or your newrelic.config file.

For more help

Additional documentation resources include:

If you need additional help, get support at support.newrelic.com.