Apigee API Monitoring、Apigee API Analytics 和 Apigee 访问日志是三个功能强大的工具,可用于收集、观察和了解 API 使用情况数据。这些工具各自提供不同的数据洞见,建议您根据不同的用例来选择要使用的工具。本文档简要介绍了每种工具的用途及其推荐用法,如下文所述:
Apigee API Analytics 中观察到的延迟时间使用近似分位数聚合函数对存储在 BigQuery 中的各个记录进行分析。与 API Monitoring 中使用的分组逻辑相比,这样可以使围绕延迟时间生成的数据更精确。在 API Monitoring 和 Apigee API Analytics 中,延迟的测量均始于 Apigee 运行时环境,不包含任何先前网络跃点(包括 Istio)的延迟计算。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-05。"],[[["\u003cp\u003eApigee offers three tools—API Monitoring, API Analytics, and access logs—to collect and analyze API usage data, each designed for different insights and use cases.\u003c/p\u003e\n"],["\u003cp\u003eAPI Monitoring provides real-time, aggregated data on API performance to quickly identify and resolve issues, allowing for configuration of near real-time alerts.\u003c/p\u003e\n"],["\u003cp\u003eApigee API Analytics offers historical trend analysis and detailed reporting, with the ability to create custom reports, export data, and use an approximate quantile aggregation for latency data.\u003c/p\u003e\n"],["\u003cp\u003eApigee access logs capture logs per transaction at the ingress gateway, aiding in troubleshooting specific issues like unusual HTTP response codes, and offers high accuracy.\u003c/p\u003e\n"],["\u003cp\u003eWhile both API Monitoring and API Analytics display data from API usage, API Analytics is more accurate, retains data longer for long term trends, and may be slightly delayed compared to API Monitoring.\u003c/p\u003e\n"]]],[],null,["# Understand Apigee observability\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\n\u003cbr /\u003e\n\nApigee API Monitoring, Apigee API Analytics, and Apigee access logs are\nthree powerful tools you can use to collect, observe, and understand your API usage data. Each of these tools provides different insights and is recommended for different use cases. This\ndocument provides a brief overview of the purpose of each tool and its recommended usage, as described in the following sections:\n\n- [API Monitoring](#api-monitoring)\n- [Apigee API Analytics](#apigee-analytics)\n- [Apigee access logs](#access-logs)\n\nAPI Monitoring\n--------------\n\nThe goal of API Monitoring is to provide real-time insights into API\nperformance, so that you can quickly diagnose and fix issues to keep your APIs working as intended.\n\nAPI Monitoring provides you with aggregated data from your API proxies on a minute-by-minute basis, enabling you to closely monitor the health and performance of your APIs. You can use API Monitoring to configure near to real-time alerting on specified parameters and take advantage of the aggregated data when troubleshooting.\n\nAPI Monitoring lets you:\n\n- Maintain the availability of your APIs.\n- Act on alerts before consumers are affected.\n- Use Apigee fault codes to speed diagnosis of issues.\n- Isolate problem areas quickly to diagnose the source of performance and latency issues.\n\nApigee customers can also use\n[Cloud Monitoring](https://cloud.google.com/monitoring/docs) tools to support API Monitoring. If you want to integrate with other monitoring systems, we recommend that you use the Monitoring API to pull metrics.\n\n### Latency data when using API monitoring\n\nAs API monitoring is intentionally designed to scale, it does *not* record every individual latency measurement in each transaction. Instead, [distribution buckets are used to measure latencies](https://cloud.google.com/monitoring/charts/charting-distribution-metrics). Latency buckets use predefined ranges to group observed latency values.\n\nTo learn more about using API Monitoring for your APIs, see [API Monitoring overview](/apigee/docs/api-monitoring).\n\nTo learn more about using Monitoring along with Apigee to configure alerts, see [Setting up alerts and notification](/apigee/docs/api-monitoring/alerts-notifications).\n\nApigee API Analytics\n--------------------\n\nApigee API Analytics provides historical trend analysis and detailed reporting for API call metadata. The goal of Apigee Analytics is to help you understand the long-term trends of your API traffic, so that you can make sure your APIs are supporting your business requirements, or make changes if necessary.\n\nWith Apigee API Analytics, you can choose from approximately 50\navailable [dimensions](/apigee/docs/api-platform/analytics/analytics-reference#dimensions)\nthat specify the data you want to capture for each API call handled by a proxy. You can then create [custom reports](/apigee/docs/api-platform/analytics/create-custom-reports) to determine how specific [API metrics](/apigee/docs/api-platform/analytics/analytics-reference#metrics) change over time.\n\nThe analytics data captured is stored in BigQuery. You can use Apigee API Analytics to [create custom reports in Looker Studio](/apigee/docs/api-platform/analytics/looker),\nset up [asynchronous custom report jobs](/apigee/docs/api-platform/analytics/create-custom-reports#real-time-reports-versus-report-jobs), or [export analytics data to your own Google Cloud storage repository](/apigee/docs/api-platform/analytics/export-data), like BigQuery.If you start with Pay-as-you-go pricing, API Analytics is an optional add-on.\n\nHere are a few of the trends that you can identify using Apigee Analytics:\n\n- How is your API traffic trending over time?\n- What are your top apps?\n- Who are your top developers?\n- When is API response time fastest or slowest?\n- Which geographical regions have the most API traffic?\n\n| **Note:** Apigee API Analytics is not recommended as a tool for configuring alerts.\n\n### Latency data when using Apigee API Analytics\n\nObserved latency in Apigee API Analytics uses an [approximate quantile](/bigquery/docs/reference/standard-sql/approximate_aggregate_functions#approx_quantiles) aggregation function on individual records stored in BigQuery. This makes the resulting data surrounding latency more precise as compared to the bucketing logic used in API Monitoring. The latency in both API Monitoring and Apigee API Analytics is measured from the Apigee runtime and does not include latency calculations from prior networking hops, including Istio.\n\nTo learn more about Apigee API Analytics, see [Apigee API Analytics overview](/apigee/docs/api-platform/analytics/analytics-services-overview).\n\nApigee access logs\n------------------\n\n[Apigee access logs](/apigee/docs/api-platform/system-administration/cloud-logging-ingress-access) can be used to troubleshoot API calls to Apigee and identify which APIs are returning particular HTTP response codes.\n\nApigee access logs capture logs per transaction at the ingress gateway to Apigee. This lets you filter logs based on specific HTTP codes and readily troubleshoot corner cases, such as a response status code of `0` on Istio.\n\nTo learn more about using Apigee access logs to troubleshoot your APIs, see [Apigee access logs](/apigee/docs/api-platform/system-administration/cloud-logging-ingress-access).\n\nDifferences between data displayed by API Monitoring data and Analytics\n-----------------------------------------------------------------------\n\nAPI Monitoring and Apigee API Analytics use different pipelines to access API data. As a result, you may see some discrepancies between the data displayed by Apigee API Analytics dashboards and the data available in API Monitoring.\n\n### Timeliness and accuracy\n\nIn general, the data displayed by Apigee API Analytics is more accurate, but may be slightly delayed (by less than an hour) compared to the data displayed by API Monitoring.\n\n### Data retention\n\nApigee API Analytics retains data for a longer time period than API Monitoring, making it more suitable for analysis of long-term trends.\n\nThe data retention periods for Analytics and API Monitoring are as follows:\n\n- Analytics\n\n - Standard: 60 days\n - Enterprise: 90 days\n - Enterprise +: 14 months\n- API Monitoring: 1 month\n\n| **Note:** The default retention period of one month for API Monitoring can be extended by changing the retention period in Cloud Monitoring. For more information, see [Data retention](/monitoring/quotas#data_retention_policy)."]]