Information for: DEVELOPERS   PARTNERS   SUPPORT

Configuring New Relic

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 install the New Relic contributed module to take advantage of more New Relic APM features as detailed on the module’s project page.

New Relic multisite capabilities

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:

extension=newrelic.so
newrelic.license = "[INSERT LICENSE KEY HERE]"
newrelic.appname = "[sitename].[env]"
newrelic.daemon.port = /run/newrelic.sock

where the [LICENSE_KEY] is your New Relic key, and [sitename].[env] is the environment that you want to monitor.

For more information, see Profile Drush Commands in New Relic in the Acquia Knowledge Base.

Installing the New Relic Node.js agent

To configure New Relic monitoring for your Node.js application:

  1. Run the npm install newrelic --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.

  2. From the newly downloaded node_modules/newrelic directory, copy newrelic.js into the root directory of your application.

  3. At line 12 of newrelic.js, replace My Application with your application name.

    Your New Relic dashboard will display the application name in the list of monitored apps.

  4. At line 16, replace license key here with your New Relic license key.

  5. Commit the package.json and newrelic.js files to your repository.

  6. 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
  7. Deploy the build artifact to an environment in Cloud Platform.

  8. Generate traffic and then wait for the data to display in your New Relic APM user interface.

You can extend New Relic application monitoring within your Node.js application by setting up custom metrics and custom integrations.

Compatibility statement

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.

Cloud Platform isn’t compatible with New Relic APM’s Distributed Tracing feature.

Note

Acquia can’t 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 Acquia Cloud 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.