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: Go to APM > rpm.newrelic.com/apm > (select a Drupal app) > Monitoring > Drupal.
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.
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_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
- Views: Versions 3.5 or higher. These metrics indicate time spent within a view's
Drupal and Browser instrumentation
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.