Drupal-specific functionality

Access to this feature depends on your subscription level.

The PHP agent captures special metrics for Drupal websites. When these metrics are collected, a Drupal tab appears in the New Relic user interface: From the New Relic menu bar, select APM > Applications > (selected app) > Monitoring > Drupal.

screen-php-drupal-special-metrics
Applications > (selected app) > Monitoring > Drupal: Example of special metrics for Drupal websites.

Configuration

The collection of Drupal-specific metrics can be controlled by the ini setting newrelic.framework.drupal.modules. It is enabled by default (in versions 3.0 or higher), and can be disabled with:

newrelic.framework.drupal.modules = 0

Though this setting uses the word "modules," it controls the collection of all Drupal metrics: modules, views, and hooks.

Metrics

The PHP agent collects metrics for the following:

  • Modules: Versions 2.5 or higher. These metrics indicate time spent within each Drupal module. In versions 3.5 or higher, time is calculated from the hook dispatch functions module_invoke and module_invoke_all. In previous versions, time was calculated from functions from a file with the ".module" extension where the file name and function prefix were a match.
  • Hooks: Versions 3.5 or higher. These metrics indicate time spent within each Drupal hook. Time is calculated from the hook dispatch functions module_invoke and module_invoke_all.
  • Views: Versions 3.5 or higher. These metrics indicate time spent within a view's view::execute method.

Drupal and Browser instrumentation

In Drupal 7.15, Compress cached pages is turned on by default. If you also select Cache pages for anonymous users, the New Relic Browser JavaScript is not inserted into the served pages for anonymous users. This is because Drupal's pages are compressed directly from the database before they are stored in the cache (with gzip), so New Relic's PHP agent does not have a chance to parse any HTML. In this situation, manual instrumentation provides a better opportunity to capture data for anonymous users. For more information, see New Relic Browser and the PHP agent.

Cron tasks

Drupal supports periodically executing tasks to perform routine maintenance or similar work on behalf of installed Drupal modules. These tasks can be run without any manual involvement beyond the initial configuration. Commonly, these are referred to as cron tasks. Starting in version 4.3, the New Relic PHP agent detects the execution of these tasks and automatically marks them as background transactions regardless of how they were started.

For more help

Join the discussion about PHP 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 support.newrelic.com.