DEV Community

Cover image for 🔎 How To Build A Effective Magento 2 Monitoring Solution
Sam James for Hashedout Development

Posted on • Edited on

🔎 How To Build A Effective Magento 2 Monitoring Solution

Fun Fact: 95% of visitors who encounter errors on your website won't report it, and will end end up shopping else where.

With Magento and eCommerce in general, it is a vital to have strong and effective monitoring setup for your website. Considering statistics show that 50% of customers will leave a website if it takes more than 3s to load. Its no surprise to anyone, that customers will abandon carts and go to competitor's if they encounter errors during the checkout flow.

Some areas that you want to make sure you have strong monitor coverage with your store are:

Frontend Browser

The key data we are looking for here is to catch any Javascript/XHR errors, performance data (Page Load, First Content Paint etc). And correlate with some user fingerprint data (Browser Version, OS, Device Type, etc)
We can use this data then to get ahead of any client side errors and resolve them, regardless of the user reporting it.

Some Recommendations for this are https://sentry.io & https://rollbar.com/

Heres a quick start guide to self hosting Sentry with docker. Especially useful if you need to monitor multiple sites, with a small budget.

System Monitoring

It is critical to monitor system statistics such as CPU, RAM and Storage usage. You can use these statistics to identify higher traffic load / bot traffic. As well as being a useful metric to identify if you need to scale your infrastructure.

Web server Monitoring

Parsing your web server logs, and mapping the data into a good set of graphs and visual data makes identifying and blocking malicious traffic a breeze.

Application Monitoring

You NEED to be actively monitoring your Magento logs, errors from the application can be causing friction in the checkout flow which could then prevent customers from finishing sales!

APM Monitoring

Application Performance Monitoring is a great tool to identify bottlenecks in your application and ensure your website is blazing fast!

Mail Monitoring

Often overlooked, but being able to see that your mail is being sent and received is critical to a eCommerce store. What good are order updates if they end up in spam (or even rejected)! Usually your SMTP provider will provide decent monitoring for this, or if your server your own mail, pflogsumm on a cron is a good tool for reporting postfix statistics

Uptime Monitoring

The staple of web monitoring, having a long term uptime history is a great way to make sure your site is stable and accessible to customers.

Do you have any other areas or specific tools that we have missed? Let us know in the comments!

Top comments (0)