Monitoring the right metrics can help you take your API product to the next level. Below, we’ll look at some powerful API metrics to ensure your API lives its best life.
How does API monitoring improve API performance?
API monitoring can provide detailed insights into how your API is functioning and performing, whether developers are adopting it, how they are using it and how it contributes to the achievement of your business goals. With this information, you can evolve your API to iron out performance glitches and better meet developers’ needs.
Doing this depends on you monitoring the right metrics based on what API success looks like for your business. Which metrics are most relevant will change based on your business goals and which stage of its lifecycle your API product is at. Let’s break this down a little…
What key API metrics should you monitor?
The key API metrics you should monitor include performance, adoption and product-related metrics. Understanding this data can support you in setting your key performance indicators and assessing how you are performing in relation to them. They can also help you keep a close eye on the health of your API products. Pick and choose the ones that make the most sense for your business context.
Availability or uptime
Whatever phase of its lifecycle your API product is at, you’ll want to monitor its uptime. This is a critical performance metric for any API. After all, your API must be available and reliable if you wish to have happy, long-term consumers.
CPU and memory usage
Other essential performance metrics include CPU usage and memory usage. These are both helpful in measuring resource utilisation, which means you can ensure your servers aren’t overloaded and take planned, proactive action if that’s the direction in which they are headed.
Monitoring these two API performance metrics can also help spot bugs impacting resource usage.
API usage growth
With any API product, monitoring metrics that enable you to understand consumption is also essential. One way to do this is to measure the frequency and volume of API requests – your API usage. You can quantify this regarding calls, requests or transactions to see how intensively your API is used.
API consumption
Measuring API consumption is broader than measuring usage. It is about understanding the breadth and depth of how people are consuming your API product. The goal is to measure whether developers are using all of its functions, endpoints and capabilities or just some of them. Clarity on this puts you in a strong position to develop your API product in a way that is perfectly aligned with developers’ requirements.
API adoption
Broader still is the API adoption metric. This looks at the extent to which your API product is being integrated into organisational workflows. To earn a high adoption rate, you need to deliver a consistent, reliable API product that fulfils developers’ needs.
API retention
Your retention rate is the number of customers you retain over time. You can set that period to suit your needs – a month, a quarter or whatever makes most sense for your business. You can also measure net revenue retention as one of your API metrics to track whether you are retaining or expanding your revenue over time.
It makes sense to measure your churn rate hand-in-hand with your retention rate to understand the rate at which customers are leaving your business. You can assess whether changes you make to your API products result in lower churn and higher retention.
Unique API consumers
Another of the vital API metrics for product managers is the volume of unique consumers. Measuring this can show the rate at which your new users are growing – or at which they are declining. Either way, it’s a meaningful way to track usage and ensure that your API product supports your business to grow rather than shrink.
Requests per minute (RPM)
Requests per minute (you can measure per second if you prefer) are a versatile metric. Measuring it gives you insights into your API’s performance so that you can proactively address any traffic spikes and potential bottlenecks. It can also inform resource allocation decisions and enable you to judge whether you need to scale your API and expand its capacity to cope with growing traffic.
If you have service level agreements (SLAs) in place for your API product, RPM monitoring can help ensure you meet contractual commitments regarding maximum response times and availability requirements as well.
API calls per business transaction
Are developers having to make multiple calls to your API to access everything they need? If so, ask hard questions about whether your design is up to scratch. Ideally, developers should be able to obtain all the data they need in a single call. If not, you’re making more work for them, which is unlikely to be the route to long-term API success.
That’s why essential API metrics for product managers who want to take their APIs to the next level should include analysing the number of API calls per business transaction.
Errors per minute
Consumers don’t like unreliable and buggy API products. That’s why it’s essential to monitor your error rate in terms of errors per minute and the type of errors occurring. Doing so means you can identify issues (including attacks on your API) and take action to address them, bringing your number of errors down.
Average and max latency
Monitoring latency – and doing so in the context of any changes you make to your API – is key to ensuring your consumers remain happy with your API’s responsiveness. While requirements vary per industry and business, there will be a maximum latency that your consumers are prepared to put up with. Exceed that, and you’re likely to see your customer churn rate spike.
Tracking latency as one of your API product metrics means measuring average latency and taking a deep dive into it, segmenting your operations and looking at latency regarding each route, GraphQL operation and so on.
Time to first “hello world” (TTFHW)
How long does it take for a developer to move from initially discovering your API to successfully integrating it and making a transaction? API metrics that measure this are often referred to as time to “hello world” or time to first “hello world”.
The faster your TTFHW rate, the better, as it means developers are moving quickly from product discovery to successful usage. The quality of your documentation can be influential here, as it can support the self-service adoption of your API products.
Software development kit (SDK) and version adoption
Understanding your API product in depth means adding SDK and version adoption metrics to your API monitoring. Having oversight of which SDKs and versions are used most can help guide how you roll out new features and functionality, helping ensure a positive user experience for every customer.
These are some of the most common API product metrics to monitor if you’re laying the foundations for success. Of course, choosing the right tool(s) to undertake that monitoring can also make a big difference, so let’s take a quick look at that.
How to choose the right API monitoring tool
Your chosen API monitoring tool needs to be user-friendly, easy to integrate and deliver information in an easily consumable format, if you’re going to get the best out of it. Naturally, it must also be secure, enable team collaboration, and be easily scalable alongside your API products.
If you’re using an API gateway for microservices as part of your architecture, you may already have access to much of the data you need. However, a specialist monitoring tool will be able to give you more – and the more data you have, the greater scope you have for enhancing the performance and adoption of your API products.
One of the benefits of Tyk is that the Tyk Dashboard has a full set of analytics functions and graphs, which you can use to dive into your API traffic and activity. If you want to take an even deeper dive, you can use Tyk Pump to send your API gateway metrics to a specialist API monitoring tool. Tyk integrates easily with tools such as Datadog and Moesif for this purpose, meaning you can slice and dice your API metrics; however, you need to gain the insights that will underpin your business growth.
Prioritise tools integrable into your CI/CD pipeline
A final word on API product metrics: choose a tool seamlessly integrated into your CI/CD pipeline. The Postman 2023 State of the API Report found that 63% of survey respondents now cite CI/CD pipelines as the most common tool for deploying APIs, so it stands to reason that your API monitoring tool needs to play nicely with them!
While we’ve focused on API metrics and monitoring above, remember that monitoring is only one-half of the coin regarding your APIs. Analytics also plays a core role in API observability, ensuring you can understand the health and usage of your APIs in the detail you need to deliver next-level products that match users’ requirements. Why not explore how to improve API observability next to ensure you’re doing all you can to maximise your API products’ chances of success?