How to connect Magento Open Source to New Relic APM
If your self-hosted store is slow at product pages, checkout or background jobs and you cannot tell where the time goes, Magento Open Source includes New Relic reporting modules that connect the store to New Relic APM. The integration is made of three modules: NewRelicReporting, which sends reporting data, ApplicationPerformanceMonitorNewRelic, which provides application performance monitoring, and GraphQlNewRelic, which covers GraphQL requests so that slow resolvers can be seen next to page and cron traces. All three are configured inside your own environment, with your own New Relic license key and account, so the telemetry stays under your control. The modules were confirmed in the 2.4-develop branch of the magento/magento2 repository. Confirm which released 2.4.x line carries them before you plan the work, because the exact enablement steps, module status and configuration keys can differ by release.
Before enabling anything, check the module list and configuration on a staging copy of your exact release. Confirm with your Magento release notes and your New Relic agent documentation which PHP agent version and extension settings the release expects, since the PHP version in use (see the supported combinations in the system requirements for your release) affects which agent builds are valid. Decide in advance which environments will report, whether production and staging use separate New Relic applications, and who owns the license key in your secrets store. Enabling reporting on every web node and every cron host will multiply the data volume, so plan which tiers and consumers report and set sampling and retention with your New Relic account team.
Verify the integration by generating known slow requests on staging: a product page, a cart update, a checkout step and a GraphQL query, plus a cron job run from the command line. Check that each appears as a transaction in New Relic with the expected name, and that the GraphQL resolver timing is visible. Write down the configuration changes, module status and agent versions so the same steps can be repeated during upgrades, since every 2.4.x patch cycle can change the module set. Treat the monitoring agent as part of your change control, and review its access to request data, because traces can capture query parameters and other data that your privacy and security teams need to assess.
What you need before you enable New Relic on Magento
Enabling New Relic on a self-hosted store touches accounts, versions, network paths, test environments, ownership and change control at once. The six items below are the checks to close before any agent or reporting module is switched on in production.
New Relic account and license key
Decide which New Relic account, license key and data region your organization will use before anyone edits configuration. Confirm who can create and rotate keys, and where the key will be stored so it is not written into shared configuration files. Ask your New Relic administrator which account owns the APM application so data does not land in a personal or trial account.
Magento core modulesSupported Magento and runtime versions
Confirm your Magento Open Source release is on a supported line and that PHP, web server and database versions match Adobe's requirements for that exact release. The New Relic PHP agent also has its own compatibility list, so confirm the agent version against your PHP build before rollout. Check the release notes and system requirements for the release you run, not an older one.
System requirementsOutbound network access to New Relic
Web nodes, cron hosts and any consumer runners must reach the New Relic collector endpoints for your region. If egress goes through a proxy or a firewall with allowlists, record the hostnames and ports and test them from each host class separately. Cron and queue hosts are often missed, and their traces will be absent without any error on the storefront.
Staging with production-like traffic
Prepare a staging environment that matches production in PHP version, extensions, indexers, cache layer and data volume. Plan a load pattern that exercises storefront pages, GraphQL calls and scheduled jobs, because a quiet staging site will show almost nothing useful. Agree how long the agent runs there before the team judges overhead and noise.
Named owner for APM data and alerts
Assign one person or team to own dashboards, alert conditions, notification channels and the response when a transaction threshold is breached. Without a named owner, alerts tend to fire into a shared mailbox and no one tunes them. Ask who will review trace data after each release and who may change sampling or apdex settings.
Access to configuration and deployment pipeline
Confirm who can change environment-specific configuration, deploy the agent settings and run the Magento CLI commands that enable or disable modules. New Relic settings should travel through the same pipeline and review process as other configuration changes, so that a rollback is one deployment away. Check that your change process covers both web and cron deployments.
How storefront, GraphQL and cron work reaches New Relic
Storefront requests, GraphQL calls and cron jobs run on Magento web and CLI nodes inside your infrastructure. The core New Relic reporting modules and the PHP agent collect their transaction data, and the agent sends it out across the trust boundary to New Relic APM. The license key is read from your configuration on the node, so the key must be stored and deployed like any other secret. Check that every web and CLI node reports, since a cron node with no agent leaves background work invisible.
Request, GraphQL and cron telemetry crossing from client nodes to New Relic APM.
Enabling the New Relic modules in the right order
This sequence takes the store from a confirmed release line to verified New Relic traces for a storefront request, a GraphQL query and a cron job, with each layer checked before the next one is turned on. Work through it on staging first so any fault is isolated to one layer at a time.
Confirm the release line and bundled modules
The engineer responsible for the platform checks the installed Magento Open Source version against Adobe's system requirements for that release line and confirms the New Relic modules are present in the codebase. The topic source lists NewRelicReporting, ApplicationPerformanceMonitorNewRelic and GraphQlNewRelic under app/code/Magento on the 2.4-develop branch, so compare that path with the release you run. Done means the version is recorded, the three module directories exist in your build, and the module status shows them as present but not yet enabled. If any module is missing from your release, stop and confirm with Adobe's documentation before going further.
Install and verify the New Relic PHP agent
The infrastructure team installs the New Relic agent on the PHP runtime used by every web node and every host that runs the CLI, including cron and queue consumers. Use the agent installation steps from New Relic's own documentation and match the PHP version your store runs. Done means the agent extension loads in the PHP version used by each role, which you confirm by checking the PHP module list on each host. Hosts that run only cron or consumers still need the agent, otherwise the background jobs will not appear in APM.
Set the license key and application name
The platform engineer sets the New Relic license key and an application name that identifies this store and environment, using the configuration method Adobe documents for the release you run. Keep the license key in your secrets store or environment configuration, not in a shared repository. Use separate application names for staging and production so data does not mix. Done means the configuration is deployed to every node, the cache is flushed, and the application appears in the New Relic account with the expected name.
Enable the reporting module first on staging
On the staging environment only, the developer enables the NewRelicReporting module before the APM and GraphQL modules, following the command sequence in Adobe's documentation. Then the module is verified in the store's module status and the configuration is compiled and deployed. Done means the module reports as enabled on staging, the storefront still loads without errors in the browser and the error logs show no new entries. Enabling the reporting module first gives you a clean baseline before the APM monitor adds its own hooks.
Enable the APM and GraphQL modules
With the reporting module confirmed, the developer enables ApplicationPerformanceMonitorNewRelic and GraphQlNewRelic in the same staging environment, then redeploys the configuration and clears caches. Run the module status check again and confirm that all three modules are enabled. Done means the store still serves pages, the admin login works and no new warnings appear in the logs. If the store fails after this step, disable the last module enabled and recheck, since that isolates the fault to one layer.
Run a storefront request and a GraphQL query
The QA engineer loads a representative category or product page and sends a GraphQL query that matches a real storefront call, such as a product lookup, using a test client. Then they open the New Relic APM view for the staging application. Done means a web transaction for the storefront page and a transaction for the GraphQL request both appear in APM with timing data, and the GraphQL transaction shows the resolver activity. If the storefront request is visible but GraphQL is not, recheck that the GraphQL module is enabled and that the request reached the application node being monitored.
Trigger one cron job and confirm it in APM
The operations engineer runs one scheduled job manually from the command line on a host that has the agent installed, using the cron command documented by Adobe for the release. They then check the APM view for a background transaction with the job's name. Done means the job completes, the transaction appears in APM with its duration, and the job's entry in the cron history shows success. If the job runs but no transaction appears, check that the agent loads in the CLI PHP version used by cron rather than only in the web PHP version.
Confirm the signals and promote to production
The platform owner reviews the staging results together with the monitoring owner, confirms that web, GraphQL and cron transactions all appear under the correct application name, and checks that no sensitive request data is captured in the traces. Repeat the same sequence on production during an agreed change window, starting with the reporting module. Done means the sign-off record lists the three verified signal types, the production application name and the rollback steps used if a module must be disabled.
What each workload shows in APM and what to confirm
Storefront traces show how long a shopper's page request takes from the web tier through controllers, layout blocks and database calls. They are the first place to look when category, product or checkout pages feel slow, because they separate time spent in PHP rendering from time spent waiting on MySQL, OpenSearch or cache lookups.
- Page load and transaction naming: Confirm that transactions group by controller action, so product, category and checkout pages appear as separate names rather than one generic web transaction.
- Controller and block timing: Check whether layout block rendering appears as segments in the trace. Heavy third-party blocks often show up here.
- Database calls: Verify that SQL statements are captured with their source, so you can tell a slow product collection query from a slow session write.
- Cache and search behavior: Confirm that requests served from full-page cache are reported differently from requests that reach PHP, otherwise averages will mislead you.
- Sampling and data volume: Ask how traces are sampled on high-traffic storefronts and confirm the sampling rate you are paying for.
Before you rely on these traces, confirm on your release that the bundled reporting modules are enabled, and check the New Relic agent version against your PHP version in the Magento 2.4.x system requirements for the release in use.
GraphQL traces matter most for headless or PWA storefronts, where the front end calls the GraphQL endpoint for almost every view. A single slow query can hide several resolver calls, and the trace shows which resolver is responsible for the time. This is the view to use when a page feels slow even though the HTML response is quick.
- Per-query timing: Check that each GraphQL operation is named, so a product detail query can be compared with a cart or customer query.
- Per-resolver timing: Confirm that individual resolvers appear as segments, which helps isolate expensive price, stock or pricing resolvers.
- Client-side and server-side split: Compare server time with front-end render time, because a fast resolver does not mean a fast page.
- Errors and mutations: Verify that failed mutations, such as cart operations, are captured with their error class rather than only as HTTP status codes.
- Cache effects: Confirm how cached GraphQL responses are reported so that cache hits are not mistaken for slow resolvers.
Before you rely on these traces, confirm the GraphQL monitoring module is present in the release you run, because module names and bundled modules change between 2.4.x lines. Check the release notes for the version in use and test with a real operation before you build dashboards on it.
Cron jobs cover indexers, queue consumers and scheduled tasks such as cleanup, email sending and catalog updates. They run on CLI hosts, often outside the web tier, and they are where long-running slowdowns and stuck processes usually appear. Traces from these jobs answer questions about backlog, duration and failure rather than shopper experience.
- Common blind spot: CLI processes often never report to APM unless the agent is configured for command-line execution, so a job can run for hours with no trace.
- Indexers and consumers: Confirm that long-running consumer processes report a transaction per message or per batch, not one transaction that never ends.
- Scheduled task timing: Verify that each cron group appears with its own name and duration, so you can see which job is growing over time.
- Error capture: Check that exceptions in CLI jobs are reported, since a failed job may otherwise leave no visible trace.
- Host identity: Confirm that each CLI host is tagged, so a slow consumer on one node is not averaged away.
Before you rely on these traces, test a single cron run on a CLI host and confirm it appears in APM. Verify the process manager settings and the New Relic agent configuration on the exact release in use.
How Magento transactions map to New Relic views
This table compares the five Magento workloads most teams trace in New Relic, what the core reporting and APM modules capture for each, where it appears, and who should act on it. Read each row as a starting point: confirm transaction naming and grouping in a test environment before you build dashboards or alerts on them.
| Magento workload | What the module reports | New Relic view where it appears | Owner who acts on it |
|---|---|---|---|
| Storefront page request | Request timing for catalog, category and checkout pages, including time spent in PHP, database and external calls made during the request | Web transactions and transaction traces for storefront routes | Storefront developer, with the merchandising lead for page-level changes |
| GraphQL request and resolver | Timing for each GraphQL operation and, where the GraphQL monitoring module is enabled, individual resolver execution within the operation | Web transactions for the GraphQL endpoint, with resolver-level detail in traces | Headless or API developer who owns the front-end queries and resolver code |
| Cron job | Duration and outcome of scheduled Magento jobs, which run outside web requests and need their own transaction grouping | Background transactions grouped by job or process name | Platform or operations engineer responsible for the cron schedule and host health |
| Admin request | Timing for back-office actions such as order management, product saves and configuration changes, which can differ sharply from storefront behavior | Web transactions for admin routes, usually separated from storefront traffic by URL | Store operations lead, with the developer who owns the slow admin module |
| Indexer or queue consumer run | Execution time and failures for indexers and message queue consumers, which often explain slow catalog updates or stalled orders | Background transactions and error records for consumer or indexer processes | Platform engineer, with the catalog or order-processing owner for backlog decisions |
Keeping license keys and customer data out of traces
APM agents see everything a request touches, including configuration, SQL text and request parameters. The controls below decide whether monitoring makes the store easier to run or creates a new place where secrets and customer data sit unprotected.
Store the license key outside shared code
The New Relic license key should be supplied through the environment or a secrets store, never committed to the repository or written into shared configuration that every environment reads. Keep one key per environment so a leaked staging key cannot write into production data. Ask who can rotate the key and how a rotation reaches every web and cron node during a maintenance window. Confirm which Magento configuration and PHP ini settings your deployment pipeline sets, so the key does not appear in build logs.
Restrict who can read APM data
Traces can expose SQL statements and request parameters, which may include customer names, addresses, email addresses and order details. Treat APM access as access to production data. Limit read access to the engineers who run the store, and review who can export traces or share dashboard links outside the organization. Confirm this scope with your security team before the agent reaches production.
Review captured request and query fields
Before production, list which request parameters, headers, query text and transaction attributes the agent records for your store. Checkout, login, account and address pages carry the most sensitive values. Use the agent's attribute filtering and parameter exclusion settings to drop fields such as passwords, tokens, session identifiers and payment-related values. Test with a checkout and a login in staging, then inspect the stored traces yourself.
Check card data and checkout secrets
Confirm that no card number, card verification value, payment token or checkout secret reaches a trace. This depends on how your payment integration handles card fields. Where a payment module posts card data through a hosted form, the store server should never see the card number, but a custom integration might. Verify the payment integration against the traces you capture, and record the result as part of your PCI DSS scoping work.
Align retention with data handling policy
Trace and transaction data is kept in New Relic for a period set by your account and plan, so the retention period is a policy decision rather than a default to accept. Ask your data protection and compliance owners how long performance data containing request context may be kept, and document the answer. Confirm the retention settings available on your account and whether data residency for your region meets your obligations.
Limit New Relic user roles and patch the agent
Assign New Relic user roles by job function, and keep administrative rights to a small named group with SSO enforced. Remove accounts when people leave the team. Keep the PHP agent and the New Relic Magento modules on the same patch cycle as the store itself, since Adobe recommends upgrading every patch cycle for security and PCI compliance. Record the agent version in your change log so an auditor can match a finding to the release that was running.
Upgrade guideTesting traces before anyone relies on them
Run a baseline load test on staging with the New Relic modules off, then on, before anyone reads the traces for decisions. Compare response times, error rates and cron run durations between the two runs, so you can tell whether the agent itself adds measurable overhead on your hardware and traffic profile. Use the same load script, the same catalog and the same data volume for both runs, and keep the Magento Open Source and PHP agent versions fixed for the duration of the test. The goal is a documented baseline, not a benchmark claim, so record the results with the environment details that produced them.
Next, confirm that the transactions you need actually appear in New Relic with names your team can search for. Check that storefront page requests, GraphQL operations and cron jobs each show up as separate transactions, and that GraphQL resolver spans are attributed to the operation that called them. Open a sample of traces for each type and confirm the names match the routes, operation names and cron job codes in your store. If a transaction is missing or grouped under a generic name, resolve that in configuration before building dashboards or alert policies on top of it. Ask your New Relic administrator to confirm which agent settings your account and license support.
Then check that sensitive values are not leaving your environment in traces. Review span attributes and custom parameters for customer data, addresses, payment-related fields, tokens and query variables that carry personal information, and confirm that the agent is not capturing request bodies or headers you have not approved. Run a deliberately slow test transaction, such as a staging-only route or a cron job with a fixed delay, and confirm that the alert policy fires, reaches the right channel and clears after recovery. Record the Magento Open Source version, the New Relic PHP agent version and the enabled reporting modules used in each test, so that every upgrade triggers a repeat of these checks.
Why transactions are missing or misnamed
This table pairs common New Relic symptoms on a self-hosted Magento Open Source store with the likely cause and the first fix to try. Work through the rows in order, since the first check (is the reporting module enabled in this release) rules out the most common gaps. Confirm each setting in your own environment before changing production.
| Symptom | Likely cause to check | Fix to apply |
|---|---|---|
| No data in APM at all | The agent is not loaded by PHP, the license key does not match the account, or outbound traffic from the web nodes to New Relic is blocked by egress rules | Confirm the agent extension loads in the PHP runtime used by the web tier, verify the license key in the agent configuration, and test outbound connectivity from each web node through the firewall or proxy |
| Storefront pages traced but GraphQL requests missing | The GraphQL reporting module is not enabled, or the request is served from a cache layer before reaching PHP | Enable the GraphQL New Relic module with the Magento CLI, flush the configuration cache, and send a test query from a host that reaches the application directly |
| Cron jobs absent from APM | The agent is not loaded for CLI, so cron runs are never instrumented, or the cron user uses a different PHP configuration than the web user | Check the PHP CLI configuration used by the cron user, confirm the agent loads there, and run one cron job manually to verify a transaction appears |
| Transactions grouped under one generic name | Requests are routed through a shared entry point or the naming setting does not separate controllers, so many routes collapse into one transaction name | Review how the agent names transactions for controllers and GraphQL operations, adjust naming settings, and compare a sample of named transactions against the expected route list |
| Agent errors appear after a Magento upgrade | The agent or reporting modules were not updated with the core release, or the new release changed the PHP version and the agent build no longer matches it | Match the agent build to the PHP version in the target release, redeploy the modules through your standard build, and check the release notes for changed module names before the upgrade window closes |
| Performance overhead noticed after enabling | Full transaction tracing or high-volume custom instrumentation on every request, or sampling settings left at development defaults | Lower trace sampling on production, limit custom instrumentation to the paths you need, and compare response times before and after in a staging run under representative load |
Questions teams ask before connecting New Relic to Magento
How much effort does a New Relic connection to Magento Open Source take?
Effort depends on the release line, the number of web and cron nodes, how many custom modules sit in the request path, and how much trace review the team wants before go-live. A single web node on a current 2.4.x release with stock modules is the smallest case. Each additional node needs the agent configured and verified separately, and each custom module that handles checkout, pricing or catalog logic adds trace categories to review. Ask the partner to state how many nodes, custom modules and GraphQL paths are in scope, since those counts move the work more than the agent install itself.
How long does the integration typically run, and what depends on change windows?
Duration is set by the scope agreed in writing, the environments available, and the change windows your operations team allows. The agent install and core reporting configuration are usually the short part. Schedule risk comes from staging refreshes, approvals for config changes on production nodes, and the time needed to review traces under realistic traffic. Ask for a timeline that separates staging validation, production rollout and the trace review period, and confirm which steps need a maintenance window on your side.
What must our team provide before the work starts?
Plan to provide a New Relic account with an assigned license key and a named administrator, a staging environment that mirrors production's Magento version and PHP settings, read access to the codebase and deployment pipeline, and SSH or pipeline access to each web and cron node. You also need named owners for the application in New Relic, for alert routing and for sign-off on which transactions count as business-critical. Confirm with your New Relic contract owner which product tiers and data retention periods your account includes before the build begins.
Can our internal team connect New Relic to Magento without a partner?
Yes, if your engineers have shell access to the servers, can edit the PHP configuration, and understand how Magento's deployment and cache flush steps work in your pipeline. The work is configuration rather than new code, so the main risks are misconfigured license keys, agent settings that differ between nodes, and forgetting to reflect the change in your deployment scripts. A partner adds value when the team lacks Magento operations experience or needs the setup documented for an audit trail. Decide based on who will own the dashboards and alerts after launch.
What is the recurring work after New Relic is live?
The recurring work is agent and module updates when you upgrade Magento or PHP, review of alert thresholds as traffic changes, and decisions about data retention and how many transactions you keep for analysis. Each Magento patch or minor upgrade can change the modules that report data, so the monitoring configuration should be checked as part of each release. Assign an owner for alert tuning, since noisy alerts are usually abandoned quickly. Ask whether support covers these checks as a retainer or as occasional projects.
Does the integration change what Magento sends to New Relic, and does that affect security?
Application performance monitoring sends timing data, transaction names and, depending on configuration, parts of request context to the vendor's service. Review what the agent captures for checkout, customer and payment routes before enabling it in production, and confirm that personal data and secrets are excluded from the captured attributes. Note that the monitoring agent is an additional component on each node, so its version and access to the server belong in your change control. Check your data processing terms with New Relic and your privacy team before the rollout.
What should we ask for in a written quote for this integration?
Ask the quote to list the Magento release line and PHP version in scope, each environment and node included, the core reporting modules to be verified, the GraphQL and cron coverage to be traced, and the number of custom modules reviewed. It should state what is one-time work, such as installation and validation, and what recurs, such as upgrade checks or retainer hours. Require a named list of deliverables, including documented configuration and a trace review, and confirm which New Relic costs are billed by New Relic directly rather than through the partner.
How DeployOpen scopes and delivers the New Relic integration
DeployOpen plans, implements, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For the New Relic monitoring integration on Magento Open Source, the work starts with a written scope that fixes which transactions, cron jobs and GraphQL paths are instrumented before any code changes.
How we scope
- Written scope lists the New Relic account, agent versions and the Magento Open Source release line in use
- Scope names which core reporting modules are enabled and which are left off in each environment
- Scope defines the slow page, GraphQL resolver and cron job paths that must appear in traces
- Scope confirms who in your team owns New Relic alert policies, data retention and access roles
How we build
- Configure the New Relic agent and reporting modules in a non-production environment first
- Check that the NewRelicReporting, ApplicationPerformanceMonitorNewRelic and GraphQlNewRelic modules match your installed release
- Keep license keys and app names in environment configuration, not in versioned code
- Test transaction naming on storefront, admin, GraphQL and cron requests before enabling production
How we hand over
- Documentation covers module enablement, configuration keys, environment variables and rollback steps
- Runbook lists the dashboards, alert conditions and cron transaction names your operations team will watch
- Handover session walks through a sample slow page trace and a failed cron trace with your engineers
- Written record of what was instrumented, what was excluded and why, for your change records
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts
- Ongoing support, upgrades and monitoring checks are available as a retainer
- Retainer review covers agent and module changes that follow each Magento Open Source patch
- Ask for a quote based on the written scope; DeployOpen does not publish a price list

