# Real-Time Metrics limits

[Real-Time Metrics](/en/documentation/platform/real-time-metrics/) reads the metrics that other Azion products generate and shows them as charts in Azion Console and through the GraphQL API. This page states how long each dataset is kept, the bounds of the Console charts and of the API, and what a chart or a query does past each value.

Real-Time Metrics is included with the platform at no additional charge. For how each product is billed, refer to [Pricing](/en/documentation/fundamentals/pricing/#real-time-metrics). The values on this page are the default limits. Azion can raise a default limit on request, based on your plan. To request an increase, contact the [technical support](/en/documentation/support/) team.

---

## Data retention

Real-Time Metrics keeps the metrics of each dataset for a fixed period. Past that period, the data is no longer returned: a query for an older range returns `200` and an empty array, with no error.

| Dataset                                                       | Retention |
| ------------------------------------------------------------- | --------- |
| Every dataset not listed below, including `botManagerMetrics` | 2 years   |
| `httpBreakdownMetrics`                                        | 90 days   |
| `botManagerBreakdownMetrics`                                  | 60 days   |

The `botManagerMetrics` and `botManagerBreakdownMetrics` datasets hold the metrics of [Bot Manager](/en/documentation/platform/firewall/#bot-manager). For the retention of the Bot Manager logs and metrics, refer to [Bot Manager logs](/en/documentation/platform/firewall/bot-manager/logs/#retention).

For the fields of each dataset, refer to [Real-Time Metrics GraphQL fields](/en/documentation/devtools/graphql/gql-real-time-metrics-fields/).

---

## Console

The Real-Time Metrics page in Azion Console bounds the time range a reader can pick, the series and rows a chart shows, and the screen width that shows a tooltip.

| Scope                                                                                            | Limit                              | Past the limit                                                                   |
| ------------------------------------------------------------------------------------------------ | ---------------------------------- | -------------------------------------------------------------------------------- |
| Start of the time range                                                                          | 730 days before the current time   | The calendar moves an earlier date to the earliest allowed date.                 |
| End of the time range                                                                            | The current time                   | The calendar moves a future date to the current time.                            |
| Series per chart                                                                                 | 16                                 | A series after the 16th is not added to the chart or to its legend.              |
| Rows in a table chart: **Requests by Status and Upstream Status** and **IP Address Information** | The 10 most frequent rows          | Other rows do not appear. Add a filter to narrow the chart to the rows you need. |
| Tooltip on a chart                                                                               | A browser window wider than 540 px | At 540 px and below, a chart shows no tooltip when you hover over a series.      |

Two further bounds apply to the Console. Queries from the Console are limited to 120 requests per minute. A metric takes up to 10 minutes to aggregate, so the values of the most recent minutes can be incomplete.

For the picker, the presets, and the filter operators, refer to [Filters and time range](/en/documentation/platform/real-time-metrics/filters-and-time-range/).

---

## GraphQL API

The GraphQL API answers at `https://api.azion.com/v4/metrics/graphql`. Each `400` in the table arrives as a JSON body whose `detail` field holds the message.

| Scope                            | Limit                                                                                          | Past the limit                                                                                                                                                                                                |
| -------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Rows per query, set with `limit` | 0 to 10,000. A query with no `limit` returns 10 rows.                                          | `400` and `The value for the query limit is invalid (must be between 0 to 10000 rows).`                                                                                                                       |
| Selected fields per query        | 37. The `ts` field counts toward the limit, and the aggregate output, such as `sum`, does not. | `400` and `You have exceeded the limit amount allowed for selected fields (37 fields).`                                                                                                                       |
| Time range                       | Required in every query, as `tsRange` or as `tsGt` and `tsLt`                                  | `400` and `To execute queries it is mandatory to provide the desired time interval.`                                                                                                                          |
| Length of the time range         | No maximum. A range of 800 days runs, while the Console picker starts at most 730 days back.   | `200`. The result holds only the data that retention keeps.                                                                                                                                                   |
| Requests                         | 120 per minute                                                                                 | `429` and `You have reached the request rate limit!`                                                                                                                                                          |
| Rows read to answer one query    | 10 billion                                                                                     | `500` and a message that starts with `An error occured while performing the requested operation.: Limit for rows or bytes to read exceeded, max rows: 10.00 billion`. Shorten the time range or add a filter. |

One further bound applies: a GraphQL API payload carries at most 5 GB.

For the limits shared by the Real-Time Metrics and Real-Time Events GraphQL APIs, refer to [GraphQL API limits](/en/documentation/devtools/graphql/limits/).

---

## Resolution

Real-Time Metrics groups the data points of a chart or a query into time buckets, and the bucket size depends on the length of the selected range. For the range at which each bucket size applies, refer to [How Real-Time Metrics works](/en/documentation/platform/real-time-metrics/how-it-works/).

---

## Related resources

- [How Real-Time Metrics works](/en/documentation/platform/real-time-metrics/how-it-works.md): How a metric reaches a chart, and which bucket size each time range returns.
- [Troubleshoot Real-Time Metrics](/en/documentation/platform/real-time-metrics/troubleshooting.md): What to do when a chart or a query stops at one of these limits.
- [GraphQL API error responses](/en/documentation/devtools/graphql/error-responses.md): Every status code and message the GraphQL API returns, with its cause.
- [Best practices for Real-Time Metrics](/en/documentation/platform/real-time-metrics/best-practices.md): Which time range and aggregation to choose, and which data to trust for billing.
