Skip to content

[DO NOT MERGE](Feat: NRQL Predictions): Removed preview callout and updated pricing section for GA #20887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions src/content/docs/nrql/nrql-syntax-clauses-functions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -815,22 +815,21 @@ Here're some examples:
id="#sel-prediction"
title={<><InlineCode>PREDICT</InlineCode> clause</>}
>
<Callout title="preview">
We're still working on this feature, but we'd love for you to try it out!

This feature is currently provided as part of a preview program pursuant to our [pre-release policies](/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy).
</Callout>

```sql
FROM Transaction SELECT count(*) WHERE error IS TRUE TIMESERIES PREDICT
...
```

<Callout variant="important">
The `PREDICT` clause is exclusive to users on the Advanced Compute SKU. New Relic offers it as part of the Compute pricing model or as an [add-on](/docs/accounts/accounts-billing/new-relic-one-pricing-billing/add-on-billing). NRQL queries executed with this clause consume CCUs.
</Callout>

With the `PREDICT` clause, you can add predictions of future data trends into line charts based on historical data. Consider the following points when using this clause:

* Applies only to queries with a `TIMESERIES` clause.
* Uses the `TIMESERIES <time period>` as the interval for predicted data points.
* Does not support [metric timeslice data](/docs/data-analysis/metrics/analyze-your-metrics/data-collection-metric-timeslice-event-data#timeslice-data) while in Public Preview.


<Callout variant="important">
The `PREDICT` clause cannot be used with the [`COMPARE WITH`](/docs/nrql/nrql-syntax-clauses-functions/#sel-compare) clause or [nested aggregations](/docs/nrql/using-nrql/nested-aggregation-make-ordered-computations-single-query) inside [subqueries](/docs/nrql/using-nrql/subqueries-in-nrql/).
Expand Down Expand Up @@ -887,6 +886,18 @@ Here're some examples:
FROM Transaction SELECT count(*) WHERE error IS TRUE TIMESERIES PREDICT USING 2 days
```
</Collapser>

<Collapser id="slideby-with-predict" title={<>Use the <InlineCode>SLIDE BY</InlineCode> clause.</>}>
If your forecast has a lot of variation over short periods of time, it may be difficult to see the trends in the data. To smoothen out the spiky chart, you can use the [`SLIDE BY` clause](/#slide-by). This clause aggregates the data into overlapping time windows with a specified slide interval, which can help reduce noise in the data and make it easier to see trends.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link for SLIDE BY is incorrect here. We should update this to be: /docs/nrql/nrql-syntax-clauses-functions/#slide-by

Copy link
Contributor

@amohammed-2 amohammed-2 Jun 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we want to use "predict" rather than "forecast " here. Could we change the first sentence of the above text to:

Smooth out your prediction trends using the [`SLIDE BY` clause](/docs/nrql/nrql-syntax-clauses-functions/#slide-by) if the data in your line chart varies significantly.


Example query with the `SLIDE BY` clause that will generate predictions in 5 minute windows with a 1 minute slide interval:


```sql
FROM Transaction SELECT count(*) PREDICT TIMESERIES 5 minutes SLIDE BY 1 minute
```
</Collapser>

</CollapserGroup>

Example query with the `PREDICT` clause specifying custom hyperparameters, and adding the `BY` and `USING` keywords:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,25 @@ metaDescription: 'Use NRQL Predictions to predict future trends and potential pe
redirects:
freshnessValidatedDate: never
---
<Callout title="preview">
We're still working on this feature, but we'd love for you to try it out!

This feature is currently provided as part of a preview program pursuant to our [pre-release policies](/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy).
</Callout>

## Overview [#purpose]

<DNT>**NRQL Predictions**</DNT> in New Relic uses your metric's historical data patterns to predict future trends, providing insights into how metrics might behave in the future. This proactive approach helps you visualize trends and anticipate potential issues, enabling timely interventions to maintain optimal system performance. This feature currently supports predictions for both seasonal (data that has a recurring, repeatable pattern on a set cadence) and non-seasonal time series. Metrics that exhibit a strong trend or defined seasonal pattern are best suited for NRQL predictions. These predictions are best utilized when added to existing dashboards to give a quick visual indicator as to where your metrics are headed.

<Callout variant="important">
The NRQL Predictions feature is exclusive to users on the Advanced Compute SKU. New Relic offers it as part of the Compute pricing model or as an [add-on](/docs/accounts/accounts-billing/new-relic-one-pricing-billing/add-on-billing). NRQL queries executed with this feature consume CCUs.
</Callout>

Examples of situations where you might want to add a prediction to your chart:
* Your application is producing more logs over the past few hours and the disk space is running out.
* Your application is steadily running out of memory, threatening to crash the entire container.
* You need to project future revenue based upon observed seasonal and trend patterns.

While <DNT>**NRQL Predictions**</DNT> themselves do not identify potential issues, they equip you with the information you need to assess trends and plan for future challenges. To generate alerts when the predictions indicate an impending problem, you can enroll for the <DNT>**[Predictive alerts](/docs/alerts/create-alert/set-thresholds/predictive-alerts)**</DNT> feature, currently available in public preview. <DNT>**Predictive Alerts**</DNT> works alongside <DNT>**NRQL Predictions**</DNT> to generate predictions for your metrics and alert when those predictions pass a static threshold.

## Pricing [#pricing]

Your use of <DNT>**NRQL Predictions**</DNT> is billable during preview in accordance with your Order as applicable to the pricing model associated with your Account. New Relic Query Language queries related to use of this feature are billable as the Core Compute Product. If this feature becomes generally available, your use will be billable in accordance with your Order.
{/* ## Pricing [#pricing]

For further details on pricing, please contact our sales team or refer to your Order.
The <DNT>**NRQL Predictions**</DNT> is an Advanced Compute Product feature offered as an [add-on](/docs/accounts/accounts-billing/new-relic-one-pricing-billing/add-on-billing) or as a part of the Compute pricing model. Advanced [CCUs](/docs/licenses/license-information/product-definitions/new-relic-one-pricing-definitions/#compute-capacity-unit) are consumed when NRQL queries are executed for this feature. */}

## Usage [#usage]

Expand Down
Loading