When an API operation in your SAE application is slow or failing, API monitoring gives you the data to diagnose the problem. For each operation, you can analyze SQL and NoSQL calls, inspect Java exceptions, trace upstream and downstream dependencies, and query individual traces.
Prerequisites
Before you begin, ensure that you have:
A SAE application deployed and running
An application monitoring agent attached to your application
Supported frameworks
Monitoring agents automatically detect and instrument API operations exposed by the following web and remote procedure call (RPC) frameworks:
| Framework | Minimum version |
|---|---|
| Tomcat | 7+ |
| Jetty | 8+ |
| Resin | 3.0+ |
| Undertow | 1.3+ |
| WebLogic | 11.0+ |
| SpringBoot | 1.3.0+ |
| HSF | 2.0+ |
| Dubbo | 2.5+ |
View API calls
Log on to the SAE console. In the left-side navigation pane, choose Applications > Applications. Select a region in the top navigation bar and a namespace from the Namespace drop-down list, then click the application name.
In the left-side navigation pane, choose Application Monitoring > API Calls.
The left pane of the API Calls page lists all API operations automatically detected by monitoring agents. Sort the list to prioritize your investigation:
| Sort option | Best used when |
|---|---|
| Response time (RT) | Finding the slowest operations |
| Number of requests | Identifying the highest-traffic operations |
| Number of errors | Locating operations with the most failures |
| Number of exceptions | Finding operations throwing the most Java exceptions |
Available metrics vary by programming language. Check the metrics for your application's language.
Metric categories
Select an API operation in the left pane to view its detailed metrics across the following tabs.
Overview
The Overview tab shows the call topology for the selected API operation and time-series charts for:
Number of requests
Number of errors
Response time (RT)
HTTP status codes
SQL analysis and NoSQL analysis
The SQL Analysis and NoSql Analysis tabs list the SQL and NoSQL statements executed within the selected API operation's code. Use these tabs to identify statements causing slow responses.
For any statement, click Trace Query in the Actions column to view the complete trace that contains the SQL or NoSQL execution.
Exception analysis
The Exception Analysis tab shows Java exceptions thrown from the selected API operation's code.
For any exception, click Interface Snapshot in the Actions column to view the complete trace where the exception stack resides. For more information, see View traces.
Upstream services and downstream services
The Upstream Services and Downstream Services tabs show the performance metrics — response time, number of requests, and number of errors — for services that call your application and services that your application calls.
The Upstream Traces and Downstream Traces tabs let you explore trace-level detail:
Click Expand/Collapse All to show or hide all API operations at once.
Enter a keyword in the search box and click the Search icon to filter by application name or API operation name.
Click the collapse panel or the arrow at the end of a row to show or hide performance metrics for a specific API operation.
Error analysis
The Error Analysis tab shows errors and HTTP status codes for the application. Click a value in the TraceId column to open the trace details on a new page. For more information, see View traces.
Interface Snapshot
The Interface Snapshot tab shows the parameters of the selected API operation along with two charts and a trace details table:
Total Traces chart: Displays the total number of calls and the number of slow calls. A call is considered slow when its RT exceeds 500 milliseconds. You can adjust this threshold in the application settings. Local calls generated in asynchronous scenarios are excluded from the slow call count.
RT chart: Displays the response time trend over time. The chart reflects call statistics and is affected by the configured sampling rate.
Trace details table: Lists individual traces. Click a value in the TraceId column to view the full trace details. For more information, see Trace query. Click View Logs in the Actions column to view the logs for a specific call.
To use trace IDs for log correlation during troubleshooting, associate trace IDs with your application's business logs. For more information, see Associate trace IDs with logs for a Java application.