---
title: Get more detail about your data limits
source: https://docs.newrelic.com/docs/data-apis/manage-data/query-limits
---

New Relic has resource limits in place to protect your experience, our systems, and our other customers. These limits range from the maximum number of characters you can have in a query, to API request rates, and more.

This page describes the limit metrics and [`NrIntegrationError` events](https://docs.newrelic.com/docs/telemetry-data-platform/manage-data/nrintegrationerror) that enable you to view your limits, your current data usage and overall resource consumption as compared to those limits, and the impact of experiencing a limit event. We also provide a handful of queries that, when compiled into a dashboard, can give you consistent insight into your limits status.

> #### ⚠️ IMPORTANT
>
> While `NrIntegrationError` events provide data on many limits types, resource limit metrics currently only cover request rate ingestion and API query rate limits.

## What happens when you reach a limit

Our response to reaching a limit depends on a handful of factors: the [type of limit that's reached](https://docs.newrelic.com/docs/telemetry-data-platform/manage-data/view-system-limits/#incidents), as well as the duration, frequency, and amount at which you exceed the limit. Exceeding a limit doesn't always mean you experience a limit event, such as dropped data, rejected traffic, or having your data turned off for the rest of the day. We sometimes allow a small buffer before enforcing a limit. That said, any resource consumed above 100% is at risk for limit impact at any time.

Many of our rate limits apply proportionally. That means if you're barely exceeding the limit, we will take less action than if you're exceeding by 200%.

Limit metrics are only visible if you're sending data in to a corresponding `dataType` or `limitName` API. For example, if you send in data via the Metric API, you'll see the Metric API resource metrics, but if you don't send any APM data in, you won't see APM resource metrics.

> #### 💡 TIP
>
> Impact metrics will be generated regardless of impact; if there's no impact, you'll see a 0.

An [`NrIntegrationError` event](https://docs.newrelic.com/docs/telemetry-data-platform/manage-data/nrintegrationerror) is generated when you experience impact and is a good way to quickly see if you're experiencing any limit events. See [View System Limits](https://docs.newrelic.com/docs/telemetry-data-platform/manage-data/view-system-limits/) for more information.

## Create a dashboard to view your limit status

Using three limit metrics together on a dashboard, you can quickly see detailed visuals of your `Ingest Resource Request Per Minute` limits, and with `NrIntegrationError`  get a view into more limits.

![data limits dashboard](https://docs.newrelic.com/images/accounts_screenshot-crop_limits-dashboard.webp "data limits dashboard")

Dashboard displaying limits status using a handful of queries.

We used the following queries to create this dashboard. To make a dashboard like this in New Relic, select **Dashboards**, and then **Create a dashboard**. Then, add a new chart for each query you want to regularly monitor. The three limits metrics included in these queries are described in a separate section, below.

From left to right, top to bottom:

**Resource Consumption Limits as a %**

````sql
FROM Metric 
SELECT rate(sum(newrelic.resourceConsumption.currentValue), 1 minute) / latest(newrelic.resourceConsumption.limitValue) * 100 
FACET limitName WHERE limitTimeInterval = '1 minute' TIMESERIES LIMIT MAX
```

````

**Max % Consumption in an hour**

````sql
SELECT max(`usage`) 
FROM (FROM Metric SELECT rate(sum(newrelic.resourceConsumption.currentValue), 1 minute) / latest(newrelic.resourceConsumption.limitValue) * 100 AS 'usage' FACET limitName TIMESERIES) 
FACET limitName LIMIT MAX
```

````

**APM Agent API transaction events request per minute**

````sql
FROM Metric SELECT rate(sum(newrelic.resourceConsumption.currentValue), 1 minute) 
WHERE limitName = 'APM Agent API transaction events requests per minute' TIMESERIES
```

````

**Trace API With limit line**

````sql
FROM Metric 
SELECT rate(sum(newrelic.resourceConsumption.currentValue), 1 minute) AS 'usage', 
  latest(newrelic.resourceConsumption.limitValue) AS 'limit'
WHERE limitName = 'Trace API requests per minute' TIMESERIES
```

````

**Impact FACET**

````sql
FROM Metric SELECT rate(sum(newrelic.resourceConsumption.impact), 1 minute) 
FACET dataType, impact, resource TIMESERIES 1 minute LIMIT MAX
```

````

**NrIntegrationError by limit**

````sql
FROM NrIntegrationError SELECT count(*) 
FACET limitName TIMESERIES MAX  SINCE 1 day ago LIMIT MAX
```

````

**Multi-account limits (on time series charts only)**

If you want to see limits for multiple accounts on one chart:

1.  run this query from one of the accounts:
    ```sql
    FROM Metric 
    SELECT rate(sum(newrelic.resourceConsumption.currentValue), 1 minute) / latest(newrelic.resourceConsumption.limitValue) * 100 
    WHERE limitTimeInterval = '1 minute' 
    FACET limitName, accountId() TIMESERIES LIMIT MAX
    ```

2.  Click **Add another query**.

3.  Select a different account.

4.  Then run this query again:
    ```sql
    FROM Metric 
    SELECT rate(sum(newrelic.resourceConsumption.currentValue), 1 minute) / latest(newrelic.resourceConsumption.limitValue) * 100 
    WHERE limitTimeInterval = '1 minute'
    FACET limitName, accountId() TIMESERIES LIMIT MAX
    ```

5.  Finally, save it.

**Limit list and NrIntegrationError**

````sql
FROM Metric, NrIntegrationError 
SELECT rate(sum(newrelic.resourceConsumption.currentValue), 1 minute) AS 'Per Minute Count',
  latest(newrelic.resourceConsumption.limitValue) AS 'Limit Value',
  (rate(sum(newrelic.resourceConsumption.currentValue), 1 minute) / latest(newrelic.resourceConsumption.limitValue) * 100) AS 'Percent Used', 
  filter(count(*), WHERE NrIntegrationError.limitValue is not null) AS 'Limit Reached Count' 
FACET limitName LIMIT 1000
```

````

## Limit metrics

These metrics, used in the dashboard queries above, can hone in on a single limit or resource. Or, with the help of `FACET limitName OR resource` provide a view across all your limits.

**newrelic.resourceConsumption.limitValue**

`limitValue` allows you to see the setting for a limit by `limitName` and understand more about what resource is linked to this limit. The following examples use the limit value metric in the query:

-   Example for Metric API requests per minute.

    ```sql
    FROM Metric SELECT latest(newrelic.resourceConsumption.limitValue) 
    WHERE limitName = 'Metric API requests per minute'
    ```

-   To show all limits, add `FACET limitName` and consider grouping by `limitTimeInterval`.

    ```sql
    FROM Metric SELECT latest(newrelic.resourceConsumption.limitValue) 
    WHERE limitTimeInterval = '1 minute' FACET limitName LIMIT MAX
    ```

**newrelic.resourceConsumption.currentValue**

`currentValue` shows you how much of a given resource you’re currently consuming. To get a better glimpse into how our systems are viewing your consumption,  use a `rate()` function with the time period that aligns with the `limitTimeInterval`. Limit 200.

-   Example for Metric API request per minute:

    ```sql
    FROM Metric SELECT rate(sum(newrelic.resourceConsumption.currentValue), 1 minute) 
    WHERE limitName = 'Metric API requests per minute'
    ```

-   To show all limits, add `FACET limitName` and consider grouping by `limitTimeInterval`.

    ```sql
    FROM Metric SELECT rate(sum(newrelic.resourceConsumption.currentValue), 1 minute) 
    WHERE limitTimeInterval = '1 minute' FACET limitName LIMIT MAX
    ```

**newrelic.resourceConsumption.impact**

`impact` lets you know for any given resource what impact limit events are having. Zeros mean you are not currently impacted.

The most granular we have is `dataType`. It is possible for multiple instances of `limitName` to impact a single type, such as Metric RPM and DPM. If we know, we will display `limitName`.

````sql
FROM Metric SELECT rate(sum(newrelic.resourceConsumption.impact), 1 minute) 
FACET dataType, resource, impact, limitName TIMESERIES LIMIT MAX
```

````

### Metric attributes

Attributes on `newrelic.resourceConsumption.limitValue` and `newrelic.resourceConsumption.currentValue`:

-   `limitName`: The Name of the limit for the metric data, for example `RPM Metric API`.
-   `dataType`: What kind of data the metric is tracking, for example `Metric`, `Log`, or `APM`.
-   `Resource`: What resource is being consumed, for example `Requests` or `DPM`.
-   `limitTimeInterval`: What time window this resource is evaluated for limiting.
-   `accountId()`:  The New Relic account where the resource is being consumed.

Attributes on `newrelic.resourceConsumption.impact`

-   `dataType`: The kind of data that is being impacted, for example `Metric`, `Log`, or `APM`.
-   `Resource`: What resource is being impacted, for example `Request Rate`.
-   `Impact`: A count of what is happening when resource has exceeded set limit, for example dropped requests.
-   `accountId()`: The New Relic account where the resource is being consumed.

## Set alerts on resource metrics

While building a dashboard to see all your limits is handy, being able to automate it is even better. You can set alerts on your limit metrics to provide updates on limits changes.

> #### 💡 TIP
>
> Because we currently only have metrics on 1 minute time windows, setting TimeWindow = 1 minute, will cover them all. Eventually, we make more metrics available, you might want to set separate alerts for limits that are enforced by different time windows.

You can use the following NRQL queries to create alerts. Learn about creating alerts with [NRQL queries here](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-conditions/create-nrql-alert-conditions/#create).

**Limits faceted by LimitName and scoped by Timewindow**

````sql
FROM Metric 
SELECT (rate(sum(newrelic.resourceConsumption.currentValue), 1 minute) / latest(newrelic.resourceConsumption.limitValue)) * 100 
FACET limitName
```

````

**Alert on a single limit**

````sql
FROM Metric 
SELECT (rate(sum(newrelic.resourceConsumption.currentValue), 1 minute) / latest(newrelic.resourceConsumption.limitValue)) * 100 
WHERE limitName = 'my limit'
```

````

**Alert on limit impact faceted by dataType, impact, resource, and reason**

````sql
FROM Metric SELECT rate(sum(newrelic.resourceConsumption.impact), 1 minute) 
FACET dataType, impact, resource, reason
```

````

**Alert on impact of a single dataType**

````sql
FROM Metric SELECT rate(sum(newrelic.resourceConsumption.impact), 1 minute)
WHERE dataType = 'important things'
FACET dataType, impact, resource, reason 
```

````
