You’ve made it. The finale of the Cooperative App series is finally upon us. With ten steps down, you most certainly deserve a pat on the back. But let’s reserve that for the very end of this final, vital step: Logging and API Monitoring. In this final step, prepare to capture usage data to support the integration and keep your operations team in the know. Partner with your DevOps or IT Operations team to determine how to handle alerts and notifications from the endpoint regarding service outages, API changes, user experience etc.
What? Did you really think that simply deploying an integration (or getting an integration through your team’s backlog) was the end goal? Well think again. Now that your API integration is off to production and your users are LIVE, it’s time you set up API monitoring of key usage data to ensure all is well. Your customers are depending on integrations to continue running. Integrations are mission critical. If you ignore monitoring, you will face the following five pitfalls:
Lack of Insightful Usage Data
No Health Checks
Slow Response Times
No Tags on Usage Data
Inconsistent Error Codes
We hear over and over that if an app’s integrations are not working, customers and end users are frustrated and it reflects poorly on your application. Before we overreact, isolate the issue. Is the endpoint down or is it the integration? Some of the most common errors are: authentication credentials changing due to changes in passwords, API calls failing, the endpoint service may be down completely or purposely shut down for scheduled maintenance. If it’s an issue with the integration, potentially there has been a change at the endpoint, the API has been deprecated, or there’s a bug within the integration’s API.
Fear not. We have compiled years of integration experience into useful advice to help you not only prepare for, but hopefully avoid some of these common integration failure modes. Let’s dive into each to understand exactly why there are pitfalls to API monitoring and our advice on how to avoid.
1) Lack of Insightful Usage DatA
The first pitfall is simply not collecting the integration usage data. When you do not measure your integration stats, or even feed the data into your application teams’ daily application performance monitoring tools (APM), you lack user experience data. Embrace the usage data from the integration, so that in essence, your integrations become a part of your core application. By passing the usage data to your application monitoring team, you enable your support team to understand usage patterns and gain the insights required to establish proactive support of your client’s integrations. A broken integration, often in the eyes of the end user, feels like a broken app. Usage data will enable you to troubleshoot more effectively.
2) No Health Checks
Keeping track of the health of the endpoint is your first line of defense. It’s key to a healthy app. With frequent endpoint Health Checks, your app will not get the blame when things going wrong and you can proactively stay ahead of unhappy customers who often voice their concerns about the stability of your product. We recommend automating health checks for your app’s integrations to determine if the endpoint is the issue or if your integration or your app are at fault. With a ping to an endpoint you can diagnose one of the most frequent integration issues.
3) Slow Response Times
Response time issues are among the most frequent complaints with integrated apps. The key for your operations team is to understand the response time from the endpoint, to again isolate your application's performance vs. the performance of the endpoint you are connecting to. Some endpoints are notoriously slow and you will want to make sure that the proper expectations are set with your clients for performance delays when integrating to slower endpoints. If slower response times persist, you can also choose to implement a cache or a number of other mechanisms to improve performance. Understand expectations, know what type of responses times are expected depending the type of service you are integrating to, and set goals for how quickly your API integrations need to be performing.
4) No Tags on Usage Data
Tagging your usage data enables rapid filtering of your logs to isolate and debug issues. Tags are vital to enriching your reporting and dashboard experience. Use tags to go as deep as you’d like, dig into the granular data and fully support filters, searches and queries. For example, we filter by customer, environment (e.g., prod, sandbox), integration (e.g., Salesforce, Netsuite). What are all of the integrations used by Customer X? Who are all of the customers using the Netsuite integration? Is this an issue with the prod or production environment?
5) Inconsistent Error Codes </>
The fifth and final pitfall is not normalizing the error codes. Your operations team will not have time to research every vendor's error code. Standardize to the error responses your application currently runs on, so that your support team can understand and react to errors more rapidly and efficiently. We advise that you normalize the error code, but still provide a payload back from the endpoint on how they display the errors. Easier to handle, without losing any information.
One other key logging initiative I want to be sure we cover before closing the series: track the usage information for every API call that is made. Know what call was made, how long it took and what the response code was.
The time has come. Stand up, stretch out and give yourself an awesome pat on the back. Maybe a self-high-five. Who are we to judge? If you’re ready to jump in and focus on creating the killer app, and like for us to take care of the REST, start by giving Cloud Elements a try (it’s free).
(Love the Cooperative Apps Series? Download our eBook!)