Monitoring 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.


You can monitor background transactions with the Java agent by using New Relic's @Trace annotations to instrument your background task code. For more information, see Monitoring Java background processes.


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 agent counts background processes multiple times relative to their parent process in the web application. While New Relic is constantly working to improve our automatic instrumentation and eliminate these issues, these high call counts are normal and are not a cause for concern.


You can instrument background jobs for a Node.js application with createBackgroundTransaction(). For more information, see Instrumenting background transactions.


The PHP agent assumes that all command-line run scripts are background jobs. You can mark a transaction as a background job by calling newrelic_background_job and setting the flag to true. Or, flag it as a web transaction by calling newrelic_background_job and setting the flag to false.


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. For more information on Celery instrumentation, see Python agent and Celery. For instructions on how to monitor a custom background job or Django management commands, see Python background tasks.


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.


To monitor a background task for a Go app, you would follow the instructions for instrumenting a non-web transaction in Go.

Viewing background processes and tasks

To view details about background processes and other tasks:

  1. From the New Relic menu bar, select APM > (selected app) > Monitoring > Transactions.
  2. From the Type dropdown, select your choice of available Non-web transaction types.
APM > (selected app) > Monitoring > Transactions > Non-web transactions: After you configure your agent, you can view metrics for background processes and other tasks from the New Relic user interface. Here is an example of details for an app that runs background tasks.

For more help

Additional documentation resources include Transactions page (viewing the selected app's transaction requests by percent of wall clock time and relevant throughputs).

Join the discussion about New Relic APM in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at