API Gateway provides observability features, including API call logs, monitoring and alerting, and Tracing Analysis, to help you monitor API performance and maintain system stability.
API call logs
API Gateway provides the following types of API call logs:
-
Use Simple Log Service to manage logs of API calls.
API Gateway integrates with Simple Log Service to support real-time log queries, log downloads, and multi-dimensional statistical analysis. Specifically:
-
Online log query: Query logs by keyword with exact or fuzzy match for troubleshooting and statistical analysis.
-
Detailed log query: Query detailed call logs by specific fields.
-
Call log viewing: View API call logs.
-
-
Configure the logging of HTTP requests and responses
Record the HTTP requests received by API Gateway and the HTTP responses returned to clients.
NoteThis feature is available for dedicated instances only.
For more information, see API call logs.
Monitoring and alerting
API Gateway provides the following monitoring and alerting features:
-
View monitoring data
View API Gateway monitoring data by region, API group, and API. Specifically:
-
Region monitoring.
-
Instance monitoring (dedicated instances only).
-
API group monitoring.
-
API monitoring.
-
-
Configure alerting for APIs.
Use CloudMonitor to configure alerting for APIs published in API Gateway and track API running status in real time.
-
Configure an alert rule for an outbound connection pool.
In Simple Log Service, you can specify a check frequency and trigger conditions to create an alert rule. Alerts are triggered when the conditions are met.
If a connection pool is fully occupied, API Gateway returns the
Backend service connect failed 'Connection lease request time out'error for excess requests. This error is recorded in theerrorMessagefield of logs, which you can use to configure an alert rule. For more information, see Alert configuration quick start.
For more information, see Monitoring and alerting.
Configure tracing analysis
This feature is available for only dedicated instances.
Configure Tracing Analysis in the API Gateway console to upload logs to the Alibaba Cloud Tracing Analysis platform. Tracing Analysis provides tools such as trace mapping, request statistics, trace topology, and application dependency analysis for application development and troubleshooting. Specifically:
-
How to authorize Tracing Analysis.
-
How to configure tracing analysis in the API Gateway console.
For more information, see Configure tracing analysis.