New Relic service

All Adobe Commerce on cloud infrastructure 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.

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 Adobe Commerce on cloud infrastructure 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 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 Adobe 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 Adobe Commerce alert policy.

Your Adobe Commerce on cloud infrastructure 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

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.

NOTE

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 an Adobe Commerce Support ticket to request installation.

New Relic Logs

All cloud infrastructure projects include the New Relic Logs service. 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 application logs from the ~/var/log directory
  • Logs for cloud services from the var/log/platform/<project-ID> directory
  • Fastly CDN and WAF

When 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 Adobe provisions your cloud infrastructure 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.

TIP

Before assigning the Owner role to a user, verify that the user exists on the New Relic account for Adobe Commerce on cloud infrastructure. If you must add the user to that account and an existing account Owner or Admin cannot help, any user with access to the [Adobe 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. Project Owners and Admin users can add and remove users from the New Relic account. We also recommend that you do not create more than five full-access Users. Only grant full access to users that strictly require access to the complete feature set. There is no specific guidance on free Restricted users.

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 .magento.app.yaml file to verify that the runtime section includes the New Relic extension. If the extension has not been configured, add the following:

.magento.app.yaml

runtime:
    extensions:
        - 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, Adobe 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 Adobe Commerce on cloud infrastructure 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 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 Adobe Commerce User Guide.

WARNING

The deployment process begins when you perform a merge, push, or synchronization of your environment, or when you trigger a manual redeployment, during which the Commerce application is in maintenance mode. For a Production environment, Adobe recommends completing this work during off-peak hours to avoid service disruptions.

Prerequisites:

  • Log in credentials for the Adobe Commerce 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 Admin for the environment.

To configure New Relic for Starter environments:

  1. Find your New Relic license key from your Adobe Commerce account page:

    • Open your cloud project 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 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 Adobe Commerce 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
    

    Response:

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

    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 Adobe Commerce on cloud infrastructure project with a few examples.

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 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 actions that transmit 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 application performance issues, see Troubleshoot performance using New Relic in the Adobe Commerce Help Center.

NOTE

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][nri] 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 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 the application name in the Services - APM list.

  3. Select Logs from the Explorer navigation menu.

  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.

  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

See Get started with log management and Introduction to New Relic’s query language on the New Relic Docs site.

Monitor performance with Managed Alerts

Adobe provides the Managed Alerts for Adobe 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 Adobe Commerce in the Adobe Commerce Help Center for details about alert thresholds and troubleshooting steps to resolve the issues that triggered the alert.

TIP

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

Prerequisites:

  • Credentials to log in to the New Relic account for your Cloud project
  • Verify that your Cloud environment is connected to New Relic
  • Configure at least one notification channel to receive the alert notifications

To review the Managed Alerts for Adobe Commerce policy:

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

  2. Locate the Managed Alerts for Adobe Commerce policy:

    • In the Explorer navigation menu, click Alerts & AI.

    • In the left navigation under Detect, click Alert conditions (Policies).

    • In the Policy list, select Managed Alerts for Magento Commerce policy.

      Generated alert policies

      NOTE

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

  3. Click the Alert conditions tab to review the alert conditions defined in the policy.

Configure notification channels

To use Managed Alerts for Adobe 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.

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 notification channel.

    • In the Explorer navigation menu, click Alerts & AI.

    • In the left navigation under Alerts (Classic), click Channels.

    • Click New notification channel on the right-hand side.

      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.

    • Click Create Channel.

  4. Specify the alerts to send to the channel.

    • On the new channel page, click the Alert policies tab.

    • 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:

WARNING

The alerts in the Managed Alerts for Adobe Commerce policy have default notification channels configured to notify Adobe teams that support Adobe Commerce on cloud infrastructure 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 an alert policy. Then, copy the alert conditions to the new policy. See Update policies or conditions in the New Relic documentation.

TIP

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

On this page