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.

Java

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.

.NET

By default, the New Relic .NET agent instruments IIS ASP workers. You can also instrument other (non-IIS) .NET applications, such as standalone Windows Communication Foundation (WCF) services, console apps, and other Windows services, by defining them in your app.config or newrelic.config file and by setting up custom instrumentation.

Note: The .NET agent sometimes reports very high call counts in Other 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.

Node.js

Currently the Node.js agent does not support background tasks. For more information, see Known Node.js limitations.

PHP

The PHP agent assumes that all command-line run scripts are background jobs. You can change whether a script is considered foreground or background by using an API. For more information, see The PHP API.

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. For more information on Celery instrumentation, see Python agent and Celery.

Ruby

As of version 2.9 of the Ruby agent, you can configure your background jobs to send metric data to New Relic by using an API. In versions 2.10 and higher, you can instrument background jobs so that they appear as transactions in the Applications tab in the New Relic user interface. This includes built-in support for the Delayed::Job background job processor. For more information, see Monitoring Ruby background processes and daemons.

Viewing background processes and tasks

To view the background processes and other tasks in the New Relic user interface: From the New Relic menu bar, select Applications > (selected app) > Monitoring > Transactions.

Applications Background Tasks
Applications > (selected app) > Monitoring > Transactions (Other 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 dashboard details for an app that runs background tasks.

For more help

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