API development teams can take advantage of both API Monitoring and Edge API Analytics. This document compares these two services so that you can better understand the differences between them, and how you can use them together.
API Monitoring provides real-time contextual insights into API performance, helps quickly diagnose issues, and facilitates remedial actions for business continuity.
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, the analytics system is constantly recording the number of messages received, number of developers, response times, errors, number of apps in use, request size, and many others.
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.
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.
Use API Monitoring and API Analytics together
One common place where the features of API Monitoring and API Analytics share functionality is in the generation of custom reports. Both API Monitoring and API Analytics let you create custom reports based on a predefined set of data. See Analytics metrics, dimensions, and filters reference.
API Analytics also supports using the StatisticsCollector policy to create custom metrics. Custom metrics created by the StatisticsCollector policy are available in custom reports for both API Monitoring and API Analytics.
For example, you have two versions of your backend service and are dividing requests evenly across both versions. Each API request contains a header that identifies the version of the backend service to use to handle the request.
When an API Monitoring alert occurs, you can 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
But now you can also add to the report the custom metric that identifies the backend version that caused the error. Your report can also compare information about the two versions of the backend service. See Create custom reports for more examples for API Monitoring.