The following documentation provides instructions on how to configure the New Relic APM Pro account included within an Acquia subscription.
Enhanced functionality using the New Relic contributed module
Acquia recommends you to install the New Relic contributed module to take advantage of more New Relic APM features as detailed on the module’s project page.
Recommended configuration settings
The recommended setting for newrelic.loglevel is error rather than warning. You should add code to set the newrelic.loglevel at the end of your settings.php file after the Acquia require line as shown in the following example:
if (file_exists('/var/www/site-php')) {
require('/var/www/site-php/<site>/<site>-settings.inc');
}
ini_set('newrelic.loglevel', 'error');
Setting newrelic.loglevel to warning can result in too many messages which can fill up the /mnt directory and cause PHP errors.
Using New Relic Synthetics Lite to Monitor Uptime
Organization owners can use the included Synthetics Lite subscription to monitor the uptime of their application with Ping Monitors. For detailed instructions on setting up Ping Monitors, see Add and edit monitors.
Disabling New Relic performance monitoring for an environment
To disable a New Relic APM license key to a Cloud Platform environment, users with permission to change the environment’s settings can complete the following steps:
Click the name of the application containing the environments for which you want to disable New Relic monitoring.
Click your desired environment, and then click the Configure icon.
On the Configuration page, click Performance monitoring (New Relic).
In the Provider drop-down list, select Disabled.
Troubleshooting
If your New Relic account isn’t actively showing performance monitoring data, even after accessing one or more sites on your environments, follow the steps outlined in the Adding a New Relic license key to a Cloud Platform environment section. You should complete the steps to confirm your New Relic License Key has been installed.
Note
Using shared infrastructure for your non-production environments can skew provided performance data due to activity by other websites on the shared infrastructure during periods of high activity.
To remove the New Relic code from your website because of a conflict with JavaScript included in your codebase, view the following documentation:
If you’re enabling New Relic performance monitoring for a multisite environment (including Site Factory), review the instructions at Using New Relic monitoring in a multisite environment to enable per-site reports in New Relic.
Using New Relic to monitor Drush
You can use New Relic to monitor Drush and its use of external calls by adding the following code snippet to your drush.ini file:
where the [LICENSE_KEY] is your New Relic key, and [sitename].[env] is the environment that you want to monitor.
Installing the New Relic Node.js agent
To configure New Relic monitoring for your Node.js application:
Run the npminstallnewrelic--save command locally for the application you want to monitor. New Relic libraries are both added to the node_modules directory and added as a dependency in the package.json file.
From the newly downloaded node_modules/newrelic directory, copy newrelic.js into the root directory of your application.
At line 12 of newrelic.js, replace MyApplication with your application name.
Your New Relic dashboard will display the application name in the list of monitored apps.
At line 16, replace licensekeyhere with your New Relic license key.
Commit the package.json and newrelic.js files to your repository.
Cloud Platform is compatible with the Application Monitoring services provided by New Relic. Acquia doesn’t support New Relic Infrastructure Monitoring services, Log Monitoring services, or any plug-ins.
Acquia cannot make changes to the New Relic agent on a per-client basis.
Acquia doesn’t support the installation of New Relic on any non-web infrastructure. While New Relic routinely makes updates to their services and periodically adds new features, Acquia will update versions of this service running on Cloud Platform twice annually. This allows Acquia to ensure new logic in New Relic’s PHP monitoring agent has had several months to stabilize before introducing it onto Cloud Platform.
New Relic browser monitoring for Drupal 10.2 or later
The following documentation provides instructions on how to configure the New Relic APM Pro account included within an Acquia subscription.
Enhanced functionality using the New Relic contributed module
Acquia recommends you to install the New Relic contributed module to take advantage of more New Relic APM features as detailed on the module’s project page.
Recommended configuration settings
The recommended setting for newrelic.loglevel is error rather than warning. You should add code to set the newrelic.loglevel at the end of your settings.php file after the Acquia require line as shown in the following example:
if (file_exists('/var/www/site-php')) {
require('/var/www/site-php/<site>/<site>-settings.inc');
}
ini_set('newrelic.loglevel', 'error');
Setting newrelic.loglevel to warning can result in too many messages which can fill up the /mnt directory and cause PHP errors.
Using New Relic Synthetics Lite to Monitor Uptime
Organization owners can use the included Synthetics Lite subscription to monitor the uptime of their application with Ping Monitors. For detailed instructions on setting up Ping Monitors, see Add and edit monitors.
Disabling New Relic performance monitoring for an environment
To disable a New Relic APM license key to a Cloud Platform environment, users with permission to change the environment’s settings can complete the following steps:
Click the name of the application containing the environments for which you want to disable New Relic monitoring.
Click your desired environment, and then click the Configure icon.
On the Configuration page, click Performance monitoring (New Relic).
In the Provider drop-down list, select Disabled.
Troubleshooting
If your New Relic account isn’t actively showing performance monitoring data, even after accessing one or more sites on your environments, follow the steps outlined in the Adding a New Relic license key to a Cloud Platform environment section. You should complete the steps to confirm your New Relic License Key has been installed.
Note
Using shared infrastructure for your non-production environments can skew provided performance data due to activity by other websites on the shared infrastructure during periods of high activity.
To remove the New Relic code from your website because of a conflict with JavaScript included in your codebase, view the following documentation:
If you’re enabling New Relic performance monitoring for a multisite environment (including Site Factory), review the instructions at Using New Relic monitoring in a multisite environment to enable per-site reports in New Relic.
Using New Relic to monitor Drush
You can use New Relic to monitor Drush and its use of external calls by adding the following code snippet to your drush.ini file:
where the [LICENSE_KEY] is your New Relic key, and [sitename].[env] is the environment that you want to monitor.
Installing the New Relic Node.js agent
To configure New Relic monitoring for your Node.js application:
Run the npminstallnewrelic--save command locally for the application you want to monitor. New Relic libraries are both added to the node_modules directory and added as a dependency in the package.json file.
From the newly downloaded node_modules/newrelic directory, copy newrelic.js into the root directory of your application.
At line 12 of newrelic.js, replace MyApplication with your application name.
Your New Relic dashboard will display the application name in the list of monitored apps.
At line 16, replace licensekeyhere with your New Relic license key.
Commit the package.json and newrelic.js files to your repository.
Cloud Platform is compatible with the Application Monitoring services provided by New Relic. Acquia doesn’t support New Relic Infrastructure Monitoring services, Log Monitoring services, or any plug-ins.
Acquia cannot make changes to the New Relic agent on a per-client basis.
Acquia doesn’t support the installation of New Relic on any non-web infrastructure. While New Relic routinely makes updates to their services and periodically adds new features, Acquia will update versions of this service running on Cloud Platform twice annually. This allows Acquia to ensure new logic in New Relic’s PHP monitoring agent has had several months to stabilize before introducing it onto Cloud Platform.
New Relic browser monitoring for Drupal 10.2 or later
Include the New Relic module in your code by adding require('newrelic'); as the first line of your app's main module. For more information, see Install the Node.js agent.
Trigger a Pipelines job by doing one of the following actions:
Create or reopen a pull request
Push a commit
Push a tag
Use the Cloud Platform user interface
Deploy the build artifact to an environment in Cloud Platform.
Generate traffic and then wait for the data to display in your New Relic APM user interface.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Include the New Relic module in your code by adding require('newrelic'); as the first line of your app's main module. For more information, see Install the Node.js agent.
Trigger a Pipelines job by doing one of the following actions:
Create or reopen a pull request
Push a commit
Push a tag
Use the Cloud Platform user interface
Deploy the build artifact to an environment in Cloud Platform.
Generate traffic and then wait for the data to display in your New Relic APM user interface.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.