You're viewing Apigee Edge documentation.
View Apigee X documentation.
- The goal of API Monitoring is to ensure that your APIs are up and running as intended. For this purpose, you want to see the most recent data available. API Monitoring provides data that is very close to real-time, and lets you create alerts that notify you in case an issue arises.
- The goal of Edge Analytics is to understand the long-term behavior of your APIs, so that you can ensure they are supporting your business requirements, or make changes if necessary. For these purposes, it is less critical to see real-time data. Consequently, Analytics data is slightly delayed, though usually by at most 10 minutes.
Note that API Monitoring data, which is mostly related to error codes and latency, is a small subset of Analytics data.
Differences between API Monitoring data and Analytics dataThis section describes some minor differences between data gathered by Edge Analytics versus API Monitoring. Since API Monitoring and Analytics use different data pipelines, you may see minor differences between custom reports generated by Monitoring and reports generated by Analytics. For example, you might see discrepancies in reported results for timeout errors—both backend timeouts (HTTP status code 504 on the request) and client timeouts (HTTP status code 499). These may appear with status code 200 in Analytics custom reports, but will show up with status code 504 or 499 in Monitoring custom reports.
API Monitoring provides real-time insights into API performance, and helps you quickly diagnose and fix issues to you keep your APIs working as intended.
API Monitoring enables you to:
- Increase API availability and reduce the mean-time-to-diagnosis (MTTD).
- Take appropriate actions based on contextual alerts before consumers are impacted.
- Leverage Apigee fault codes to speed diagnosis.
- Isolate problem areas quickly to diagnose error, performance, and latency issues and their source.
Edge API Analytics
Edge API Analytics collects and analyzes information that flows through APIs. API Analytics captures information such as:
- How your API traffic is trending over time
- Which are your top apps
- Who are your top developers
- Which API methods are most popular
- When is API response time fastest/slowest
- Geographically where do you see the most API traffic
Data collected by API Analytics
API Analytics collects and analyzes a broad spectrum of data that flows across APIs. For example, while your API is deployed, Analytics is constantly recording the number of messages received, number of developers, response times, errors, number of apps in use, request size, and many other pieces of data.
For a good introduction to metrics and how you can use them, see Use the metrics APIs to measure API program performance. For a complete listing of metrics, see Analytics metrics, dimensions, and filters reference.
Collect custom metrics
You can also collect custom metrics by using the StatisticsCollector policy. The StatisticsCollector policy can write information from request headers, XML/JSON payloads, query parameters, URIs, and other locations to the Analytics Server for analysis and report generation.
Access Analytics data
Once generated, you can access predefined metrics and custom metrics by using the API Analytics visualization tools, including the Dashboard, custom reports, and GeoMap. For more information about the visualization tools provided by API Analytics, see Analytics dashboards. For more information on custom reports, see Create custom reports.
Compare API Monitoring and API Analytics
API developers use both API Monitoring and API Analytics. One of the primary differences between the two is the alert mechanism built into API Monitoring. Alerts let your operation team respond to issues with your APIs in real time to ensure that your APIs are available and performing as expected.
Alert conditions define specific status code (2xx/4xx/5xx), latency, and fault code thresholds that when exceeded trigger visual alerts in the UI and send notifications through a variety of channels, such as email, slack, pagerduty, or webhooks. You can set up alerts at the environment, API proxy or target service, or region level.
After an alert is triggered, your operations team can use the API Monitoring UI to investigate the issue and drill down to its root cause. You can then generate a custom report that includes predefined information about the alert, such as:
- Total response time
- Target response time
- Proxy errors
- Target errors
- Request UUID
- many more
API Analytics are designed to capture a wide range of data for use by several teams. For example:
- The operations team can use Analytics data to identify periods of high or low traffic so they can scale up or scale down your services to meet changing demands.
- The marketing team can use Analytics data to determine customer usage patterns identified by individual APIs, apps, customers, or other data.
- All teams can access custom data collected from a request to track specific information such as header values, query parameters, or request payload.