Available at no additional charge on all plans, the APM tool can be really useful when it comes to troubleshooting your website. The APM tool is designed to capture timestamped information about your WordPress site’s PHP processes, MySQL database queries, external HTTP calls, and more.
With the APM data, you can dig into specific slow page loads to identify the root cause of the issue.
Keep in mind that Kinsta’s APM tool is specifically designed to help you monitor WordPress sites, so using it to monitor a site running on another CMS or framework may result in inaccurate results. Thus, we only recommend using it for WordPress sites.
The APM tool is currently in open beta, so we recommend proceeding with caution. If the APM tool causes an issue with your site, please submit a bug report via the official beta feedback form.
APM Tool Terminology
Before we dive into how to use the APM tool, let’s define a few important terms that will be used later on.
APM, short for “Application Performance Monitoring” is a tool that gives you insight into the performance statistics and trends of an application. Kinsta’s APM tool provides you with actionable data about the performance of your WordPress site.
In the context of the APM tool, a request refers to a visit to your WordPress site that requires PHP execution to render. A request URL can include various query string parameters and triggers a corresponding transaction.
For example, a request to
yourdomain.com/wp-cron.php?arg=1&arg2=2 would trigger a
A transaction refers to the backend activity that occurs to serve a request to your WordPress site. For example, the transaction for a request to
/wp-login.php contains the individual PHP processes that generate your WordPress site’s login page.
A span refers to an individual process in a transaction. A single transaction may consist of hundreds of spans arranged hierarchically.
For example, a transaction that generates an account page for a WooCommerce customer may consist of a span that breaks down into multiple database query spans.
A transaction sample refers to a selected instance out of many requests to a specific transaction endpoint (e.g. /single.php, /wp-cron.php, etc.). In the APM tool, you’ll have three samples to choose from.
For example, the APM tool may record dozens of
/wp-cron.php transactions. In this case, the APM tool will pick out the slowest transaction and call it a transaction sample.
A transaction trace is a complete timeline of all processes that occurred in a transaction sample. In our APM tool, a transaction trace is represented by a list of spans with its corresponding duration and timestamp information.
A stack trace is a detailed process breakdown for an individual span. Stack traces are useful for in-depth debugging. They contain very detailed information about the PHP code that was executed, down to a specific PHP file and line of code.
How to Enable Kinsta’s APM Tool
By default, the APM tool is disabled. Since the APM tool requires additional server resources, we recommend only enabling it when you’re actively troubleshooting a performance issue on your WordPress site.
To enable the APM tool, access your MyKinsta dashboard, navigate to your site’s “Kinsta APM” page, and click Enable.
Next, select a monitoring duration for Kinsta APM. You can choose between 2 hours, 4 hours, 12 hours, and 24 hours. Since Kinsta APM may reduce the performance of your site, we don’t recommend leaving it enabled for an extended period of time. Once you’ve selected a monitoring duration, click Enable Monitoring Time to start Kinsta APM. After the monitoring duration has passed, Kinsta APM will be disabled automatically.
How to Select a Monitoring Time Frame
By default, the APM tool provides monitoring data from the past 60 minutes. However, the monitoring time frame is customizable, and you can choose between the options below.
- 30 minutes
- 60 minutes
- 2 hours
- 4 hours
- 12 hours
- 24 hours
To change this setting, click on the time frame button and select an option in the modal that appears. Click the Apply time frame button to set the new time frame.
How to Refresh the Kinsta APM Tool
Kinsta’s APM tool displays performance monitoring data based on the set time frame (e.g. past 30 minutes, past 60 minutes, etc.). To prevent confusion, the APM tool does not automatically refresh data. To refresh the APM tool and display the latest data from the selected time frame, click on the “Refresh” icon next to “Kinsta APM” at the top of the APM tool page.
How to Read APM Tool Insights
Since the data logging does not start until after the APM tool has been enabled, you’ll need to give it some time to gather performance data for your site. We recommend waiting 5-10 minutes before inspecting the monitoring data.
After that, here are some key insights to look at.
APM Tool – Overall Transaction Time
The “Overall Transaction Time” bar graph gives you a visual representation of transaction time data from the selected timeframe. Each bar consists of a multicolor breakdown of PHP, MySQL, Redis, and External transaction times. The “Overall Transaction Time” graph also shows the selected timeframe’s average transaction time in the upper right corner.
APM Tool – Slowest Transactions
The top ten slowest PHP transactions will appear in the “Slowest transactions” section of the page, which is split into six columns – ”Transaction”, “Total Duration (%)”, “Total Duration”, “Max Duration”, “Avg. Duration”, and “Rate Per Min”.
- Transaction – displays the transaction endpoint of slow requests that consumed the most PHP time (e.g. /wp-cron.php, /wp-json, etc.).
- Total Duration (%) – the percentage of time consumed by a transaction endpoint within the selected timeframe. The duration percentage is calculated with the “Duration (Time)” values, so it also does not represent the duration of an individual transaction sample.
- Total Duration – the total amount of time consumed by a transaction endpoint within the selected timeframe. Note that the duration refers to the sum of the duration of all requests to a particular endpoint, and does not represent the duration of an individual transaction sample.
- Max Duration – the slowest transaction sample duration from the selected timeframe.
- Avg. Duration – the average of all transaction sample durations from the selected timeframe.
- Rate Per Min – the number of times a transaction has run on average per minute in the selected timeframe.
APM Tool – Transaction Sample
If you click on a transaction in the “Slowest Transactions” list, you’ll be presented with a modal containing up to three transaction samples from the selected timeframe.
- Slowest Sample – the slowest transaction sample for a given transaction endpoint.
- 95th Percentile – a transaction in the 95th percentile (95% of transactions are faster than this transaction sample).
- 50th Percentile – a transaction in the 50th percentile (50% of transactions are faster than this transaction sample), also referred to as the median. You can think of this as the typical duration as there are exactly the same amount of slower and faster samples than this.
If there is enough monitoring data, the APM tool will display three transaction samples. If there is not enough data, you may see one or two samples. For example, the “slowest sample” and “95th percentile” sample may refer to the same transaction sample.
The “Transaction Samples” modal also shows useful information about each transaction sample including the timestamp, transaction endpoint, request URL, and duration.
If you click on a transaction sample in the modal, you’ll be brought to a dedicated page for the selected sample. This “Transaction Sample” page includes the sample’s timestamp, transaction endpoint, URL, duration, HTTP status code, and a full transaction trace timeline.
- Timestamp – the date and time of the transaction sample.
- Transaction – the PHP endpoint of the transaction sample (e.g. /wp-cron.php, /single.php, etc.).
- URL – the specific URL of the transaction sample.
- Duration – the duration of the transaction sample in milliseconds.
- Result – the HTTP status code of the transaction. If you see a “HTTP 200” result, it means the transaction was slow, but ultimately successful. However, if you see a “HTTP 503” result, it could mean the transaction timed out.
Each transaction sample has its own permalink or unique URL. This makes it easy to reference and share a specific transaction sample with your colleagues or the Kinsta support team.
APM Tool – Transaction Trace Timeline
In addition to basic transaction info, the Kinsta APM tool also gives you a more detailed transaction trace timeline. Within the transaction trace timeline, you can see a step-through presentation of spans – PHP processes, MySQL database queries, and external calls for a particular transaction sample.
Each span also has its associated duration and relative timestamp, so you can quickly identify the longest and most problematic part of the request.
Relative to the total duration of the transaction sample, we are showing:
- Spans with more than 5% duration in orange
- Spans with more than 25% duration in red
These highlights are always referred to the relative duration of the span in its own sample’s context. So if you’re seeing anything red, always take into account that it’s always compared to that given sample (and your site or web app might not be slow as a whole as you first thought).
Need a blazing-fast, secure, and developer-friendly hosting for your client sites? Kinsta is built with WordPress developers in mind and provides plenty of tools and a powerful dashboard. Check out our plans
Note that for MySQL and Redis queries, we do not include spans shorter than 0.001 ms. For non-database-related spans, the threshold is 1 ms. We purposely exclude short spans because recording a high number of fast elements can impact the performance of your site, and does not provide very useful data.
This detailed trace timeline is very useful for troubleshooting performance issues because it helps you pinpoint exactly what the bottleneck is.
For example, you may notice that the
/wp-admin/admin-ajax.php is caused by long API requests to social network APIs. Armed with this knowledge, you can then continue testing your site with your social plugin disabled to see if it makes a difference.
Similarly, if you see a slow transaction to
/wp-cron.php that contains repetitive HTTP requests initiated by a cache preloading plugin, you can act quickly on that information and disable the cache preloading functionality.
If you click on a span in the transaction trace timeline, you’ll be able to see a detailed overview with a complete stack trace and associated information.
For example, if you click on a MySQL query span, you’ll see the database query that was executed along with the stack trace. By inspecting the span details, you can gain a deeper level of insight into PHP transactions on your WordPress site.
In most cases, fixing performance-related issues identified by the Kinsta APM tool falls out of the scope of our support. If you require additional assistance with optimizing your WordPress site, we recommend reaching out to one of our partners.
Kinsta APM FAQ
We’ve compiled a few popular questions regarding Kinsta APM, and provided answers to them below.
How Can I Enable Kinsta APM?
Kinsta APM is available at no additional costs with all plans. To enable it, you need to:
- Log in to your MyKinsta dashboard
- Click on the website you’d like to debug
- Click the “Monitoring” tab
- Click “Enable” on the top-right corner to start APM
Will Kinsta APM Slow Down my WordPress Site?
As with other APM tools, Kinsta APM’s agent might add additional load to your server’s CPU and RAM resources and could potentially slow down your WordPress site for a limited time.
We strongly recommend only enabling Kinsta APM when you’re actively diagnosing a performance issue on your site.
Does Kinsta still support personal New Relic monitoring for customers with personal New Relic licenses?
Yes, Kinsta sites still support New Relic monitoring for customers with personal licenses.
Is it possible to use Kinsta APM and New Relic at the same time?
We do not recommend using both Kinsta APM and New Relic for monitoring at the same time. However, it’s okay to switch between Kinsta APM and New Relic as long as both tools are not active at the same time.
Is Kinsta APM compatible with other CMS platforms and frameworks?
At this time, Kinsta APM is only fully compatible with WordPress.
What If I See Some Unexpected Behavior on My Site After I Enable Kinsta APM?
We’ve already done extensive testing with different WordPress versions and a long list of plugins, however, there can still be unknown wrinkles to work out, like a plugin version or some custom development being incompatible with our monitoring solution.
For this reason when you enable the feature, always double-check that your site works fine, and if you see anything unintended behavior, disable the feature and make sure to let us know so that we can investigate and work out the issue.
At Kinsta, we are passionate about building tools and features that help you launch, develop, and manage WordPress sites with greater ease.
As we progress through the open beta phase for the Kinsta APM tool, we are looking forward to your valued feedback and ideas. To get in touch with our team, please use this feedback form. We appreciate your help!
With the Kinsta APM tool, you’ll be able to debug performance issues without installing a plugin like Query Monitor or activating a third-party service like New Relic.
If you’re working with a developer to address issues on your WordPress site, the Kinsta APM tool can also help you save time and money by providing you with a place to start.
If you enjoyed this tutorial, then you’ll love our support. All Kinsta’s hosting plans include 24/7 support from our veteran WordPress developers and engineers. Chat with the same team that backs our Fortune 500 clients. Check out our plans