New Relic services

Magento Commerce Cloud projects include access to the following New Relic services to help manage, monitor, and troubleshoot your applications and infrastructure by collecting, viewing, and analyzing data from your Magento Commerce Cloud project.

New Relic APM

New Relic for application performance management (APM) is a software analytics product that helps you analyze and improve application interactions. New Relic APM is available to all Magento Commerce Cloud projects and provides the following features:

  • Focus on specific transactions—Actively mark and monitor key customer actions in your site, such as adding to the cart, checking out, or processing a payment.
  • Database query monitoring—Locate and monitor database queries affecting performance.
  • App Map—View all application dependencies within your Magento site, extensions, and external services.
  • Apdex scores—Evaluate performance and create alerts that identify issues and notify you when they occur, such as site performance affected by a flash sale or web event. See Apdex score.
  • Managed Alerts for Magento Commerce–Use this New Relic alert policy to monitor application and infrastructure performance based on industry best practices. See Monitor performance with the Managed Alerts for Magento Commerce alert policy.

Your Magento Commerce Cloud project includes the software for the New Relic APM service along with a license key. You do not need to purchase or install any additional software.

New Relic Infrastructure

Magento Commerce Cloud Pro projects include the New Relic Infrastructure (NRI) service, which automatically connects with the application data and performance analytics to provide dynamic server monitoring. This service is available on Production and Staging environments.

For Pro accounts, if New Relic APM is not installed on the Staging and Production environments or New Relic Infrastructure is not available in the Production environment, submit a Magento Support ticket to request installation.

New Relic Logs

Magento Commerce Cloud Pro projects include the New Relic Logs service on both Production and Staging environments. The service is pre-configured to aggregate all log data from your Staging and Production environments and display it in a centralized log management dashboard.

The aggregated data includes information from the following logs:

  • All ece-tools and Magento application logs from the ~/var/log directory
  • Logs for cloud services from the var/log/platform/<project-ID> directory
  • Fastly CDN and WAF logs

As soon as your project is connected to New Relic, you can use the New Relic Logs service to complete tasks like the following:

  • Use New Relic queries to search aggregated log data
  • Visualize log data through the New Relic Logs application
  • Create custom charts, dashboards, and alerts
  • Troubleshoot performance issues from a single dashboard

See View and analyze logs.

Manage New Relic account

When Magento provisions your Magento Commerce Cloud project, the License Owner receives an email from New Relic with credentials and instructions for accessing the New Relic account. If you did not receive the email, use the License Owner email address to reset the New Relic password.

A New Relic account can have only one person assigned to the Owner role. If you must change the account owner, assign the Admin role to the current Owner, then assign the Owner role to another user. See Update the account owner in the New Relic documentation for instructions.

Before assigning the Owner role to a user, verify that the user exists on the New Relic account for Magento Commerce Cloud. If you need to add the user to that account and an existing account Owner or Admin cannot help, any Magento user with access to the Magento Partnership Owner Account for New Relic can add users on behalf of the customer.

We recommend adding at least one Admin user to your New Relic account to manage all access, integrations, and tool usage. Magento Commerce Cloud Project Owners and Admin users can add and remove users from the New Relic account.

To add a user:

  1. Using your License Owner New Relic credentials, log in to New Relic.

  2. From the account dropdown menu, select Account settings > Account > Users and roles.

  3. Click New user.

  4. Add the name and email address for the account.

  5. Assign the user role: Admin, User, or Restricted.

  6. Click Add user.

  7. Ask the new user to check their email for a New Relic notification with account information.

Set up New Relic

Pro environments are preconfigured to use New Relic services.

For Starter environments, you must check the file to verify that the runtime section includes the New Relic extension. If the extension has not been configured, add the following:

        - newrelic

Connect to New Relic

To connect a Cloud environment to New Relic, add the New Relic license key to the environment.

  • For Pro accounts, Magento adds the license key to your Cloud environments during the provisioning process. You can log in to your New Relic account to verify connectivity between your Magento Commerce site and New Relic.

  • For Starter accounts, you have a New Relic license key that supports up to three environments. You must add the key to your environment configurations manually. The license key is not pre-provisioned on Starter environments.

Configure New Relic for Starter environments

For Starter environments, enable the New Relic integration by adding the New Relic license key to the environment configuration. We recommend adding the key to the Staging and Production (master) environments and one other environment of your choice. Only the New Relic license key is required for configuration. You can find information about additional configuration options in the New Relic reporting topic in the Magento Commerce User Guide.

Updating the environment configuration triggers a redeployment, which takes your site offline until deployment completes. For Production environments, we recommend completing this work during off-peak hours to avoid service disruptions. See Working with variables.


  • Log in credentials for the Magento account page, or for the New Relic account associated with your project
  • Admin level access to the Starter environments to configure, or credentials to access the Magento Admin for the environment.

To configure New Relic for Starter environments:

  1. Find your New Relic license key from your Magento Cloud account page, or from your New Relic account page:

    • Open your account page.

    • On the Projects tab, find your project.

    • Click View Details to see the project infrastructure information.

    • Expand the New Relic Service section to view the license key.

    • Copy the license key.

  2. Add the New Relic license key to an environment using the Magento Cloud CLI, or add it from the Magento Admin.

    • Change to the environment that needs the license key.

    • Set the variable using the following Magento Cloud CLI command:

      magento-cloud variable:set php:newrelic.license <newrelic-license-key>
  3. Log in to New Relic to verify that you can view data from the Magento Cloud environment. (See Investigate performance.)

Remove license key from a Starter environment

If three active Starter environments already use the same New Relic license key, and you want to configure New Relic reporting on a different environment, you must remove the key from one of the configured environments before you can reuse it.

To remove a license key from an environment:

  1. List environment variables.

    magento-cloud vget


    | Name                 | Level      | Value                  |
    | php:newrelic.license | environment| <newrelic-license-key> |

    If you added the license key as a project variable, you must remove that project-level variable. A project variable adds the license to every environment branch created, which can consume or exceed the license limit. To list project variables: magento-cloud pvget

  2. Delete the license variable.

    magento-cloud variable:delete php:newrelic.license

Use New Relic

The following sections provide an overview for using the New Relic services integrated with your Magento Commerce Cloud project with a few examples. For more information and training resources, see the New Relic Help Center.

Investigate performance

New Relic connects and monitors your infrastructure and application using PHP agents. After a Cloud environment connects to New Relic, you can log in to your New Relic account to review the data collected by the agent.

On the APM Applications page, use the New Relic APM Overview to view information about your application.

Cloud project New Relic overview page

From this view, you can track and find the following types of information:

  • Applications and transactions encountering slow responses or bottlenecks
  • Customer comments about issues with your site
  • Applications with high transaction time
  • Traffic to transaction time

We recommend reviewing tracked data:

  • Most time consuming—Determine time consumption by tracking requests in parallel. For example, you may have the highest transaction time spent in product and category views. If a customer account page suddenly ranks very high in time consumption, your application might be affected by a call or query dragging performance.

  • Highest throughput—Identify pages hit the most based on the size and frequency of bytes transmitted.

All collected data details the time spent on an action transmitting data, queries, or Redis data. If queries cause issues, New Relic provides information to track and respond to those issues.

For details on using this data to troubleshoot Magento performance issues, see Troubleshoot performance using New Relic in the Magento Help Center.

You can learn more about using the New Relic APM and Infrastructure agents to collect and analyze application data from the New Relic APM and New Relic Infrastructure documentation.

View and analyze log data

You can use the New Relic Logs application to search across the aggregated log data and troubleshoot application, infrastructure, CDN, and WAF errors. Also, you can connect the log data with other data collected by New Relic APM and Infrastructure services to create charts, dashboards, and alerts to manage Magento application and cloud service operations.

To use the New Relic Logs application:

  1. Use your New Relic credentials to log in to your New Relic account.

  2. Select your application.

  3. On the APM applications page, select Logs from the navigation menu.

    Cloud project APM menu select Logs page

    You can also access the New Relic Logs application from the New Relic ONE home page. See New Relic ONE core UI components.

  4. To review infrastructure log data for cloud services, enter the query string has: "filePath" in the Find logs where field. Then, click Query logs. The names of the log files are stored in the filePath field, with full paths to the log file.

    Cloud project New Relic service log data

  5. To review Fastly log data, enter the query string has: "client_ip" in the Find logs where field. Then, click Query logs.

    Cloud project New Relic Fastly log data

  6. To filter the Fastly log results further, select an attribute from the left menu, then click Query logs to apply the updated query.

    For example, to query the Fastly data by country code, select the Geo Country Code attribute.

    Cloud project New Relic CDN log attribute filter

The following example shows a New Relic Insights dashboard created from queries against the Fastly CDN log data:

Cloud project New Relic CDN Logs dashboard

For further information and examples, see Introduction to New Relic Logs and Introduction to New Relic Insights.

Monitor performance with Managed Alerts

Adobe provides the Managed Alerts for Magento Commerce alert policy to track performance metrics. Based on industry best practices, the policy includes a collection of alerts that set thresholds to trigger warning and critical notifications when site infrastructure or application issues affect performance. The Managed Alerts policy tracks the following metrics on Production environments only:

Metric Data collection Availability
Apdex score APM Pro and Starter
error rate APM Pro and Starter
disk space NRI Pro
CPU usage NRI Pro
memory usage NRI Pro
Redis NRI Pro
MariaDB NRI Pro

When site infrastructure or application conditions trigger an alert threshold, New Relic sends alert notifications so that you can proactively address the issue. See Managed Alerts for Magento Commerce in the Magento Help Center for details about alert thresholds and troubleshooting steps to resolve the issues that triggered the alert.

For Pro Staging and Integration environments and Starter environments, use Health notifications to monitor disk space.


To review the Managed Alerts for Magento Commerce policy:

  1. Use your New Relic credentials to log in to your New Relic account.

  2. Locate the Managed Alerts for Magento Commerce policy:

    • In the top navigation menu, click Alerts & AI to open the Applied Intelligence page.

    • In the left navigation, click Policies.

    • At the top of the page, select the account and project from the drop-down menu if needed.

      Select account and project

    • In the Policy list, you should see the Managed Alerts for Magento Commerce policy.

      Generated alert policies

      If the Managed Alerts for Magento Commerce alert policy is not available, see Managed Alerts for Magento Commerce in the Magento Help Center.

  3. Click Managed Alerts for Magento Commerce to review the alert conditions defined in the policy.

    Managed alerts list

Configure notification channels

To use Managed Alerts for Magento Commerce to monitor your Production sites, you must configure at least one notification channel and map it to the alert policy.

Notifications about performance issues go to all channels associated with an alert policy when conditions on the application or infrastructure trigger an alert. You also receive notifications when an issue is acknowledged and closed.

New Relic provides templates for configuring different types of notification channels including email, Slack, PagerDuty, webhooks, and more. See the Instructions for specific notification channels in the New Relic documentation to review the prerequisites for using each type.

To configure a notification channel:

  1. Choose a notification channel type, and complete any prerequisite steps required to connect the channel with the New Relic service.

  2. Use your New Relic credentials to log in to your New Relic account.

  3. Create a new notification channel.

    • In the top navigation menu, click Alerts & AI to open the Applied Intelligence page.

    • In the left navigation, click Notification channels.

    • On the Notification channels page, click the New notification channel.

      New Relic notification channel

    • On the Create notification channel page, select the channel type and complete the steps to configure, create, save, and send a test notification to verify that the channel works.

      New Relic create notification channel

  4. Specify the alerts to send to the channel.

    • On the Notification channels page, click Alert policies.

    • On the Alert policies tab, click Add alert policies.

      New Relic create notification channel

    • Select the Managed Alerts for Magento Commerce alert policy.

    • Click Save changes.

See the following New Relic documentation topics for additional information:

The alerts in the Managed Alerts for Magento Commerce policy have default notification channels configured to notify Magento teams that support Magento Commerce Cloud customers. Do not modify the configuration for these default channels, and do not remove any alert policies assigned to them.

Create alert policies

Do not modify any alerts included in the Managed Alerts for Magento Commerce policy. We update and improve the alert conditions in this policy over time, which overwrites any customizations you add to the policy.

Instead of modifying an existing alert, you can create a new alert policy. Then, copy the alert conditions to the new policy. See Update policies or conditions in the New Relic documentation.

See Alerts concepts and workflow in the New Relic documentation for more detailed information about Alerts, alert policies, and notification channels.