You cannot fix what you cannot see. New Relic APM (bundled with Adobe Commerce Cloud, available to anyone on-premise) turns Magento from a black box into measured transactions: which requests are slow, which code paths eat time, which external calls stall. Here is how to set it up and, more importantly, what to look at.
Setup
The PHP agent installs as a system package; license key and app name in newrelic.ini. Two Magento-specific configuration wins:
- Name the app per environment (
mystore-prod,mystore-staging) so staging load tests never pollute production data - Transaction naming: New Relic’s Magento support names transactions by route - verify
/catalog/product/viewappears as such rather than one giantindex.phpblob, or every dashboard is useless
Add browser monitoring (the JS snippet) for real-user frontend data - server APM alone tells you nothing about INP or frontend JS weight.
The Views That Matter
1. Apdex and throughput: the health line. Apdex dropping while throughput is flat means code slowed; Apdex dropping while throughput spikes means capacity.
2. Transaction list sorted by total time consumed: not the slowest average, but the biggest total contributor. A 3-second transaction hit twice a day matters less than a 400ms one hit 50,000 times.
3. External services: where Magento waits on others - payment gateways, ERP APIs, Elasticsearch. A slow third party shows up here before anyone complains.
4. Database: slow query aggregation. The usual Magento suspects appear quickly: missing indexes on custom tables, layered navigation queries, url_rewrite lookups on bloated tables.
5. Errors: exception rate with stack traces. Set an alert on error-rate spike - it is your early warning for bad deploys.
Finding Slow Code Paths
Transaction traces decompose a request into segments: controller time, block rendering, specific model calls, SQL. The workflow for “category pages are slow”: find the transaction, open traces of slow samples, and read the segment breakdown. Magento’s layered navigation and collection loading are common findings; custom modules with N+1 loops are the other classic.
Alerting That Does Not Cry Wolf
Start with four alerts:
- Error rate above baseline for 5 minutes - bad deploys and integration failures
- Apdex below 0.85 for 10 minutes - real user pain
- Throughput near zero on a store that should have traffic - the site is down, however healthy the server looks
- External service degradation on payment endpoints - money path first
Tune thresholds against two weeks of real data; alerting on day-one guesses trains everyone to ignore alerts.
The Weekly Habit
Fifteen minutes every Monday: top time-consuming transactions, slowest external calls, error-rate trend, browser vitals trend. Performance regressions caught here are cheap; caught by the merchant’s Q4 revenue report, they are not. New Relic’s value is not the license - it is the habit it enables.