This doc is for accounts on our original Product-based pricing. If you're on the newer pricing plan, see New Relic One pricing plan. Not sure which you're on? See Overview of pricing plans.
For accounts on our original pricing plan, this document explains:
- How New Relic calculates billable usage for an Insights Pro subscription.
- Available subscription usage attributes and example NRQL queries to use in the New Relic UI or in API calls.
Data generation
Once per day, an account with an Insights Pro subscription will generate an NrDailyUsage
event for every event namespace. A NrDailyUsage
event includes a count of the events under that namespace.
To view the attributes for this event, see the NrDailyUsage
entry in the data dictionary.
Usage calculations
To get an estimate of the current month's billable usage:
- Go to: account dropdown > Account settings > Usage.
- On the Insights usage page, set the time picker to Current month.
For more information about the usage UI, see Introduction to subscription usage data.
The Insights usage UI only displays paid events: these are events that count towards an Insights Pro subscription. It does not display events that are included free as part of other New Relic product subscriptions. However, you can also query the product included events.
How long specific events are retained will depend on each event type's data retention period. For a list of the applicable event types, see Event namespaces.
Table definitions
Here are definitions of the column headers displayed in the UI table and CSV files. The columns you see depend on the Group by option you select in the UI.
Header | Definition |
---|---|
Account name | The name of the account. This can be a standalone account, a master account, or a partnership. |
Account ID | New Relic account ID. |
Event namespace | The category of event governed by Insights subscription. For example: APM or Mobile error . For more information, see the list of event namespaces. |
Stored paid events | The number of events stored that count towards an Insights Pro subscription. Events included as part of other New Relic product subscriptions are not counted. |
% of total usage | The percentage of the total usage used. |
Event namespaces (types)
An Insights Pro subscription governs the data retention of certain types of events. An event's namespace (indicated by the insightsEventNamespace
attribute) corresponds to one or more event types that share a single data retention policy.
Event namespace in UI | Event namespace when queried | Event types |
---|---|---|
APM Transactions | APM |
|
APM Errors | APM Errors |
|
Browser | Browser |
|
Page view timing | PcvPerf |
PageViewTiming |
SPA monitoring | Browser:EventLog |
|
JS errors | Browser:JSErrors |
|
Custom:* | Custom:* |
Event types stored using custom filters created by New Relic. Not applicable for most customers. |
Custom events | Default |
Custom event types that you create using New Relic agents or the Event API |
Crash event trails | Breadcrumb |
|
Mobile crash | Mobile Crash |
|
Mobile error (for HTTP requests and HTTP errors features) | Mobile Error |
|
Mobile exception | Mobile Exception |
|
Mobile general | Mobile General |
|
Mobile session | Mobile Session |
|
Query examples
To get the most out of your Insights usage data, you can:
- Run queries of this data and create custom charts and dashboards.
- Use this data programmatically, using one of our APIs.
For general information about how to use NRQL queries, see Introduction to usage data.
Insights writes usage events once per day. That is why these queries use since 24 hours ago
or timeseries 1 day
.
Here are some NRQL query examples about usage.
- Stored event usage for last month
-
This query will tell you the "billable" number of Insights-governed events for all accounts (masters and sub-accounts) in the hierarchy under the account where the query is run, for the last calendar month. This number is calculated as the daily average number of stored events.
SELECT rate(sum(insightsTotalEventCount)-sum(insightsIncludedEventCount), 1 day) AS 'Paid events' FROM NrDailyUsage SINCE last month UNTIL this month
- Current Insights usage for an account
-
This query will tell you how many Insights-governed events are currently stored for a specific account, broken down by event namespace. Be sure to replace YOUR_ACCOUNT_ID in these queries with your account ID.
SELECT latest(insightsTotalEventCount) FROM NrDailyUsage SINCE 24 hours ago WHERE consumingAccountId = YOUR_ACCOUNT_ID FACET insightsEventNamespace
This query will tell you the total current Insights-governed event storage for a specific account, for all event namespaces:
SELECT sum(insightsTotalEventCount) FROM NrDailyUsage SINCE 24 hours ago WHERE consumingAccountId = YOUR_ACCOUNT_ID
- Current Insights usage for multiple accounts
-
This query will tell you how many Insights-governed events are currently stored for a list of accounts by event namespace. Note that you will need to replace LIST_OF_ACCOUNT_IDs in the query with a list of account IDs.
SELECT latest(insightsTotalEventCount) FROM NrDailyUsage SINCE 24 hours ago WHERE consumingAccountId IN (LIST_OF_ACCOUNT_IDs) FACET consumingAccountId, insightsEventNamespace LIMIT 100
You may need to increase the value in the
limit
clause to see all of the facets in this query. - Events included with other New Relic products
-
This query will tell you how many Insights-governed events that are included with other New Relic product subscriptions were stored for an account, by the product that created them, over the past seven days. Note that you will need to replace YOUR_ACCOUNT_ID in the query with your account ID.
SELECT sum(insightsIncludedEventCount) FROM NrDailyUsage SINCE 7 days ago WHERE consumingAccountId = YOUR_ACCOUNT_ID FACET insightsNrProduct TIMESERIES 1 day
- Retention periods by sub-account and event namespace
-
This query will tell you the total, paid, and included retention periods for the different event categories associated with the various New Relic products (such as APM
Transaction
events), for each sub-account under the specified master account ID. When creating your own NRQL queries, be sure to replace YOUR_ACCOUNT_ID with your specific account ID.SELECT latest(insightsTotalRetentionInHours)/24 AS 'Total retention, days', latest(insightsIncludedRetentionInHours)/24 AS 'Included retention, days', (latest(insightsTotalRetentionInHours) - latest(insightsIncludedRetentionInHours))/24 AS 'Paid retention, days' FROM NrDailyUsage where productLine='Insights' AND masterAccountId = YOUR_ACCOUNT_ID FACET consumingAccountId,consumingAccountName,insightsEventNamespace SINCE 1 day ago
- Paid Insights usage by sub-account
-
This query will tell you how many events under an Insights Pro subscription are being consumed by each sub-account for the specified master account ID over the past seven days. When creating your own NRQL queries, be sure to replace YOUR_MASTER_ACCOUNT_ID in the query with your specific master account ID.
SELECT sum(insightsTotalEventCount)-sum(insightsIncludedEventCount) AS 'Paid events' from NrDailyUsage SINCE 7 days ago WHERE masterAccountId = YOUR_MASTER_ACCOUNT_ID FACET consumingAccountId, consumingAccountName TIMESERIES 1 day
- Account hierarchy
-
This query is useful for seeing the account hierarchy (partnership, master, sub-accounts).
SELECT count(*) FROM NrDailyUsage FACET partnershipName,masterAccountName,masterAccountId, consumingAccountName,consumingAccountId LIMIT 1000 SINCE 1 day ago