API Execution Metric Reporting
Cortex XSOAR version 6.8 adds support for API Execution Metric Reporting.
Supported Server Version#
API Execution Metric Reporting is supported from version 6.8.
Implementing API Execution Metric Reporting#
For metric data to be stored, an integration must return an execution_metrics command result, as part of the returned response.
An example of how a command may implement the ExecutionMetrics object is as follows:
Rate Limiting#
If a service that an integration is being developed implements API throttling, using Scheduled Commands in addition to metric reporting, it can help you to have insight into your API usage. With these reported metrics, you can make informed decisions regarding your service licenses.
The following example shows you how this implementation could look like.
If an item has been scheduled and after exhausting the permitted retries, a TimeoutError metric is automatically reported for the quantity of ItemsRemaining, which is reported in the Scheduled Command.
Dashboards#
API Execution Metric reporting was implemented to present the information via a dashboard to help provide insight into an integration's usage of an API service.
In general, if your integration is using a service where the results of the API calls may be of importance to determine usage, it is best practice to also include a widget in the content pack.
Permitted Metric Types#
Each metric type results in additional metric records being created in the telemetry database. To prevent excessive records from being created, metric types other than those defined in the default list are automatically converted to a GeneralError.
| Metric Type | Description |
|---|---|
| GeneralError | A generic error type. |
| OutOfQuota | Out of quota metric type. |
| AuthError | Authentication error type. |
| ServiceError | Service error type. |
| RetryTimeout | Failed to retrieve result before timeout. |
| Successful | A successful metric type. |
Special Server Configurations#
telemetry.realtime.metric.types.allow.allenables / disables metric types other than those permitted by default. - (default is disabled)