Monitor background processes

New Relic allows most users the ability to monitor background processes and other jobs running outside the web application. Specific procedures depend on which agent you use.

Go

To monitor a background task for a Go app, follow the procedures for instrumenting a non-web transaction.

Java

To monitor background transactions, use the Java agent's @Trace annotations to instrument your background task code.

.NET

By default, New Relic's .NET agent instruments IIS ASP workers. To instrument other (non-IIS) .NET applications, such as standalone (WCF) services, console apps, and other Windows services, see Instrumenting custom applications and Instrumenting WCF applications.

The .NET agent sometimes reports very high call counts in Non-web transactions. This is caused by limitations on tracking work as it moves across threads. When this occurs, the .NET agent counts background processes multiple times relative to their parent process in the web application. These high call counts are considered normal and are not a cause for concern.

Node.js

To instrument background jobs for a Node.js app, use createBackgroundTransaction().

PHP

The PHP agent assumes that all command-line run scripts are background jobs. You can mark a transaction as a background job using either of these methods:

Python

If you are using the Celery or Gearman distributed task management system, you can have task executions recorded as background tasks against a designated application.

Ruby

The Ruby agent allows you to configure background jobs to send metric data to New Relic, and to instrument background jobs so that they appear as transactions in the New Relic APM user interface. This includes built-in support for the Delayed::Job background job processor. For more information, see Monitoring Ruby background processes and daemons.

View background processes and tasks

To view details about background processes and other tasks:

  1. Go to rpm.newrelic.com > (select an app) > Monitoring > Overview.
  2. From the main chart's dropdown on the APM Overview page, select your choice of available chart views for Non-web transactions.

Chart views: Web and non-web transactions

You can also view non-web transactions from the APM Transactions page and any applicable Key transactions page.

For more help

Recommendations for learning more: