Data visualization is an important troubleshooting tool. Apigee is always collecting and analyzing data for your APIs, and visualization is the most powerful way to unlock, compare, contrast, and assess that data.
So, let's say you've been hearing from customers (perhaps via support calls, social media sites, or user forums) that one of your APIs is slow. Visualization can help. Where do you begin?
Consider and test for possible causes
Possible causes might include:
- If the slowness being seen by just one app or is it from multiple apps? If one app, then it might be a problem with the app.
- If it being seen by multiple users across multiple apps and users seem to be in the same geo location, then it could be a network issue
- If you're not seeing either of these issue, it could be an issue with Apigee. If you recently added or updated a policy. It could be configured incorrectly.
- If the total response time is being reported as high, but the average endpoint response time has not changed then it might be an Apigee issue. If the average endpoint response time is also high then it could be an issue in the network between Apigee and the target server, or an internal application server.
Visualize which API is slow
To discover which API is underperforming, one approach is to compare the average response times of all your APIs to see if one of them is out of line.
- Select API Proxies from the APIs menu.
- In the Performance section of the API Proxies page, select Average Response Time from the Performance menu.
- Select a range of dates to evaluate.
- Select which APIs you wish to evaluate.
In the plot, look for sudden spikes or gradual increases in response time.
Visualize with a custom report
If you suspect which API is causing a problem, you can create a custom report that includes charts and plots comparing specific metrics that you select. For example, you can visualize the maximum latency time by app and resource.
To visualize with a custom report:
- Sign in to the Apigee UI.
- Select Analyze > Custom Reports > Reports in the left navigation bar to access the Custom Reports page.
- In the Custom Reports page, click + Custom Report.
- Fill out the Custom Report basics.
- To add a metric, click +, select Total Response Time metric and Max as the aggregate function, and click Add.
- To add dimensions, click +, select Proxy and Request Path, and click Add.
- Click Save.
Analyze the resulting report
The new latency report will show you the response times by API and then by each resource within an API. By combining this information with what you know about your network architecture, you can quickly find issues that may be related to your infrastructure.
You can drill down on the worst performing API (the one with the highest latency).
Now that you know which resource is performing badly, you can examine your network to see if there's a service issue, or you can add a 3rd dimension like Developer App to see which apps are impacted by this slow resource, or developer to figure out which developers are impacted by the slow resource.
As you can see, Apigee Analytics includes multiple ways to approach a specific problem, and visualization plays an important role in any troubleshooting process.