Magento 2 New Relic Integration: How to Use New Relic APM in Magento?

Magento 2 New Relic Integration: How to Use New Relic APM in Magento?

Magento 2 New Relic Integration for Adobe Commerce is a software analytics service that helps to analyze and improve application interactions. The integration facilitates efficient management, monitoring, and troubleshooting of your infrastructure. This tutorial will guide you through the successful integration of New Relic with Magento 2. By following these steps, you can reduce costly downtime and boost engineer productivity. It also empowers your Magento store to deliver high-performing applications.

Key Takeaways

  • Discover how to use New Relic for Magento 2 performance optimization.

  • Explore the features to monitor, identify, and enhance user experience in Adobe Commerce on cloud infrastructure.

  • Understand the significance of New Relic in identifying and managing store performance bottlenecks.

  • Learn how New Relic improves Magento site performance and helps in proactive issue identification.

  • Explore the benefits of leveraging New Relic to monitor and optimize your online store effectively.

What is New Relic?

New Relic is a tool utilized by Magento to help ecommerce businesses access data swiftly and make informed decisions. This extension is an in-built feature in Magento 2 and can be installed from the Magento Connect marketplace for Magento 1 users.

New Relic and Magento have also partnered to develop predefined, customizable Insights dashboards to help Merchants recognize insights quickly.

The new Relic components include:

  1. New Relic APM (Pro and Starter)

  2. New Relic Infrastructure (Pro, Production Environment only)

  3. New Relic Logs (Production and Staging Environments)

  4. New Relic Alerts

What are the New Relic Components?

1. New Relic APM

One of the key components of New Relic is the New Relic APM service (Application Performance Monitoring). It is a software analytics solution tailored to help you analyze and enhance application interactions. This valuable tool is readily available for all Adobe Commerce projects hosted on cloud infrastructure.

It has various features, including:

  1. Focus on Specific Transactions: It helps you track and monitor critical customer actions on your website. These actions include adding items to the shopping cart, progressing through the checkout process, or completing payment transactions.

  2. Monitoring Database Queries: New Relic APM helps you gain valuable insights into the database queries that can affect the performance of your application.

  3. App Map: The App Map feature in New Relic APM offers a clear view of your application's dependencies. It includes internal extensions and external services, providing a detailed understanding of your site's ecosystem.

  4. Measure Apdex Scores: New Relic lets you inspect your site's performance using Apdex scores. It also promptly notifies you of any identified issues through alerts.

  5. Managed Alerts for Adobe Commerce: New Relic’s alert policy allows you to monitor the performance of both your application and infrastructure closely. This policy also ensures that your Magento store adheres to industry standards and guidelines.

  6. Track deployments: It helps monitor deployment events and analyze deployment impact to improve overall performance.

2. New Relic Infrastructure

You gain access to New Relic Infrastructure in Pro projects. It seamlessly integrates with your application data and performance analytics. It provides real-time server monitoring capabilities to enhance your overall infrastructure management. It is accessible in both Production and Staging environments.

Note: To ensure the proper functioning of New Relic Infrastructure, you must have New Relic APM installed on both Staging and Production environments.

3. New Relic Logs

The New Relic Logs service is a standard inclusion within all cloud infrastructure projects. Within Adobe Commerce Cloud, it synchronizes application, infrastructure, and network logs to the New Relic platform.

It provides the following features for Magento 2 development:

  1. Efficient Troubleshooting: It reduces the time needed for troubleshooting by effectively organizing and presenting log data.

  2. Automatic Clustering: Logs are automatically clustered into visible patterns for easier analysis.

  3. User-Friendly Search and Filtering: It provides a user-friendly interface that simplifies log information search and filtration.

  4. Advanced Analysis Tools: Enables the creation of queries, alerts, and dashboards for deeper and more detailed analysis.

The New Relic Logs service also covers a range of logs from various sources, including:

  • Adobe Commerce Cloud infrastructure

  • Adobe Commerce Cloud applications

  • Services such as PHP, MySQL, Elasticsearch

  • Custom logs (var/log)

  • CDN-WAF logs

4. New Relic Alerts

Adobe Commerce offers Managed Alerts designed for the Alert Policy, enabling users to monitor and oversee performance metrics effectively. This policy includes various alerts that establish thresholds. These thresholds are configured to activate warnings and critical notifications when performance issues arise in the site's infrastructure or applications.

The Alerts feature incorporates diverse notification channels, including webhooks, Slack rooms, emails, etc. It ensures that users promptly receive notifications through their preferred communication method whenever incidents are opened, acknowledged, or resolved.

Benefits of New Relic for Magento 2 Performance

New Relic integration provides several benefits for Magento 2 performance, including:

  1. Seamless Integration: New Relic eliminates the need for installation. It is readily accessible due to its cloud-based nature.

  2. Comprehensive Visibility: It helps you gain a comprehensive view of your application's performance.

  3. Real-Time Issue Detection: It spots emerging issues in real-time without needing pre-configured alerts.

  4. Immediate Change Detection: It immediately Identifies changes as they happen and helps Magento store owners understand their impact.

  5. Effortless Log Access: It allows you to access all logs within context with a single click.

  6. Precise Time Analysis: New Relic reporting lets you pinpoint where your application spends most of its time. It also offers valuable insights for performance optimization.

How to Set Up And Use New Relic Reporting for Magento 2

Step 1: Register a New Relic account

  1. Go to the New Relic website and sign up for an account. You can also register for the 60-day free trial period.

  2. Fill in the information as directed. When prompted, select the product that you want to set first.

  3. Locate and fill in the following credentials required to complete the configuration:

  • Account ID: On the New Relic account dashboard, locate the Account ID. It can be found in the URL after /accounts.

  • Application ID: In New Relic APM, go to Application and select your desired application. The Application ID is the number in the URL after /applications/.

  • New Relic API Key: Select Account Settings and click Data Sharing in the panel below Integrations. You can create a new API license key and restore or delete your API key on this page.

  • Insights API Key: Select Insights. Then, in the panel on the left below Administration, select API Keys. Your Insights API Key(s) will be displayed on this page. To create a new key, click the plus sign (+) next to Insert Keys.

Step 2: Install the New Relic agent on your server

To collect and transfer the data using New Relic APM Pro, set up the PHP agent on your server.

  1. When prompted to select a web agent, choose PHP.

  2. Install PHP as per the provided instructions on your server.

Guide for New Relic and Magento 2 integration

  1. Ensure that the cron job is running on your server.

Step 3: Install Magento store

  1. From the Magento Admin Panel sidebar, navigate to Stores > Settings > Configuration.

  2. In the options table on the left, under General, click on New Relic Reporting and proceed as follows:

  • In the Enable New Relic Integration field, select Yes.

  • In the Insights API URL field, replace the percent (%) symbol with your New Relic Account ID.

  • Fill in your New Relic Account ID.

  • Fill in your New Relic Application ID.

  • Fill in your New Relic API Key.

  • Fill in your Insights API Key.

  • In the New Relic Application Name field, provide a name that helps identify the configuration for internal reference.

  • (Optional) Select Yes for Send Adminhtml and Frontend as Separate Apps.

  1. Finally, click Save Config to complete the integration process.

Step 4: Enable Cron for New Relic Reporting

  1. Expand the Cron section in your Magento settings.

  2. In the Enable Cron field, select Yes.

Enabling Cron job for Magento 2 New Relic reports

  1. Finally, click Save Config to confirm and complete the setup.

Additional Features and Services of New Relic for Magento

  1. Magento-Specific Functionality: New Relic provides specialized functionalities designed exclusively for Magento. These features enable users to monitor and optimize their store's performance more effectively.

  2. Compatibility: New Relic is compatible with all Magento versions. It ensures seamless integration and monitoring for all users.

  3. Utilization of Web APIs: New Relic allows users to harness the power of web APIs to access additional data and insights concerning their store's performance. These web services are accessible through REST and SOAP protocols.

  4. FrontControllerInterface Plugins: Users can take advantage of FrontControllerInterface plugins within New Relic to improve the monitoring capabilities of their Magento store.

  5. Custom Transaction Naming: New Relic offers the flexibility to override the PHP agent's automatic transaction naming. It allows users to customize how transactions are labeled and tracked within New Relic to their needs.


1. How does New Relic aid in website management?

New Relic plays a significant role in efficient website management by offering insights into user experience and site performance. For Adobe Commerce on cloud infrastructure projects, it offers various features based on industry best practices.

2. How can New Relic assist in identifying performance bottlenecks on a webpage?

The tool allows users to investigate the performance of their online store based on the New Relic Alert Policy. It helps you identify and learn about the bottlenecks, improving site management.

3. What is the significance of New Relic Alerts for Adobe Commerce Alert Policy?

The alert policy offered by New Relic is available to all Adobe Commerce users, ensures immediate alerts in case of performance issues on the site. This service is available to improve the user experience by promptly addressing issues.

4. How does New Relic contribute to enhanced page performance?

New Relic aids in technology optimization for online stores by assisting in better management of the site's performance. It helps identify and address issues that could affect the user experience.

5. How can New Relic's insights aid in next-level technology understanding?

By providing detailed insights, New Relic assists in learning about the site's working. It enables you to make informed decisions and optimize your ecommerce platform for peak performance.


Magento 2 New Relic Integration is essential in enhancing performance and monitoring Magento's ecommerce store. It enables store owners to identify and resolve issues that impact user experience. The tutorial covered the integration of New Relic within Magento 2, enabling efficient performance management, monitoring, and issue resolution.

Explore Magento server hosting to optimize performance and seamlessly integrate it with New Relic for your ecommerce operations.

Maria Ajnawala
Maria Ajnawala
Technical Writer

Maria has over five years of expertise in content marketing, specialising in Magento insights and industry trends. She excels in creating engaging content that resonates within the Magento community.

Get the fastest Magento Hosting! Get Started