Skip to content
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

[Draft for feb release]feat(On-demand forecast): Added On-demand forecasting content for PP #19667

Merged
merged 33 commits into from
Feb 25, 2025

Conversation

sujitnewrelic
Copy link
Contributor

Updated the existing topics and added a new one for On-demand forecasting capability on chart.

Updated the existing topics and added a new one for On-demand forecasting capability on chart.
@sujitnewrelic sujitnewrelic added content requests related to docs site content from_tw Identifies issues/PRs from Tech Docs writers labels Jan 8, 2025
@sujitnewrelic sujitnewrelic self-assigned this Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

Hi @sujitnewrelic 👋

Thanks for your pull request! Your PR is in a queue, and a writer will take a look soon. We generally publish small edits within one business day, and larger edits within three days.

We will automatically generate a preview of your request, and will comment with a link when the preview is ready (usually 10 to 20 minutes).

Copy link

netlify bot commented Jan 8, 2025

Deploy Preview for docs-website-netlify ready!

Name Link
🔨 Latest commit 1949d0c
🔍 Latest deploy log https://app.netlify.com/sites/docs-website-netlify/deploys/67bd7e2e13ade80008eccb0f
😎 Deploy Preview https://deploy-preview-19667--docs-website-netlify.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Jan 8, 2025

[!NOTE]

Our Vale automated writing feedback tool has suggestions for this PR. You can view these suggestions in the Files changed tab. If you're not a New Relic docs writer, we'll review any comments and you don't need to take any action (though feel free to make edits if you like!).

Copy link

[!NOTE]

Our Vale automated writing feedback tool has suggestions for this PR. You can view these suggestions in the Files changed tab. If you're not a New Relic docs writer, we'll review any comments and you don't need to take any action (though feel free to make edits if you like!).

- Added SS
- Updated syntax
- Add customization
Copy link

[!NOTE]

Our Vale automated writing feedback tool has suggestions for this PR. You can view these suggestions in the Files changed tab. If you're not a New Relic docs writer, we'll review any comments and you don't need to take any action (though feel free to make edits if you like!).

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>

If you have opted for On-demand forecasting, you can add forecast to line and area charts, which uses historical data to project future trends.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be On-Demand Forecasting, or should "On-demand forecasting" be otherwise set out as the name of a feature?

I'd also say "...you can add FORECAST to...", since it's a NRQL keyword, or change it to "you can add forecasting..." or "you can add a forecast..."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • Rechecking with Meda on the official feature name. I understand, it is "On-demand forecasting"
  • Changes it to "you can add a forecast..."

Select <DNT>**Make a forecast**</DNT> from the <DNT>**Options**</DNT> menu on the chart.
The forecast apears in dotted lines with the defult range set to 20% of the query window, highlighted in gray.

You can further refine your query for the forecast by adjusting the range as per your need. Refer [on-demand forecasting](/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting) for more details.
Copy link
Contributor

Choose a reason for hiding this comment

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

Refer to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@@ -46,6 +47,10 @@ To access the Data Explorer, navigate to the bottom <DNT>**Query your data**</DN
1. **Define the Scope**: Select the data type (metric, event, or log), the account, and the entities.
2. **Select the Time Range**: Use the time picker to define the time range for your query.
3. **Build Your Search**: Use the blocks on the left to browse the available data and construct your search. Blocks are searchable, and you can use the actions in the action menu to create and update your query.
4. **Refine your query**: Modify your query by adding filters, facets, and aggregations.
5. **Customize the chart visualization**: Upgrade your chart visualization from the customization options available.
6. **Make forecast for a line chart (If opted for on-demand forecast)**: Use <DNT>**Make a forecast**</DNT> from the **Options** menu to get a forecasted trend.
Copy link
Contributor

@mlobiondo-newrelic mlobiondo-newrelic Jan 13, 2025

Choose a reason for hiding this comment

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

Make a forecast for a line chart?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed



Forecasting in New Relic involves using historical data to predict future trends and potential performance issues.
By analyzing historical data, forecasting provides insights in to how these metrics might behave in the future.
Copy link
Contributor

Choose a reason for hiding this comment

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

into

Forecasting is a powerful tool for decision-making, helping teams to allocate resources effectively, and plan for potential challenges.

<Callout variant="tip">
New Relic currently uses the Holt-Winters model for forecasting, which reliably captures seasonal patterns and trends in your data.
Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be nice to have an explanatory link for Holt-Winters, maybe this one: https://en.wikipedia.org/wiki/Exponential_smoothing#Triple_exponential_smoothing_(Holt_Winters)

The forecasted chart opens in <DNT>**Data explorer**</DNT>.
The forecast range is automatically set to 20% of the query window, and highlighted in gray. The graph appears in dotted lines within the forecast range.

The chart query is pre-populated with the `FORECAST` function. you can [refine the query](#customize-forecastsing-range) as per your requirements and run it to get the updated graph.
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a typo in the customize-forecasting-range anchor.


1. Click <DNT>**Add to dashboard**</DNT>.
2. Enter a widget name.
3. Search and slect a dashboard in which you want to add the widget, or create a new dashboard for it.
Copy link
Contributor

Choose a reason for hiding this comment

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

select



### Customize the forecasting range [#customize-forecastsing-range]
You can customize a chart forecast through NRQL query to adjust the projection window and refine the accuracy as per your requirements.
Copy link
Contributor

Choose a reason for hiding this comment

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

"through NRQL query" sounds a little awkward, maybe "through editing the NRQL query"?


### Customize the forecasting range [#customize-forecastsing-range]
You can customize a chart forecast through NRQL query to adjust the projection window and refine the accuracy as per your requirements.
Refer to the [NRQL documentation](/docs/nrql/get-started/introduction-nrql-new-relics-query-language) to get familiar with the NRAQL query.
Copy link
Contributor

Choose a reason for hiding this comment

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

"to get familiar with NRQL" or "to get familiar with NRQL querying"


```sql
FROM NrAiIncidentDebug SELECT count(*) WHERE environment like 'production'
TIMESERIES 1 hour facet event since 1 day ago FORECAST
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd capitalize the keywords, i.e. FROM NrAiIncidentDebug SELECT count(*) WHERE environment LIKE 'production'
TIMESERIES 1 hour FACET event SINCE 1 day ago FORECAST

</figcaption>

You can customize the query using the following keywords to refine the forecast:
* **`by <a time range>`**: Project the forecast up to the specified time range.
Copy link
Contributor

Choose a reason for hiding this comment

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

BY


You can customize the query using the following keywords to refine the forecast:
* **`by <a time range>`**: Project the forecast up to the specified time range.
* **`using <a historical data span>`**: Analyze historical data from the defined span to project the forecast.
Copy link
Contributor

Choose a reason for hiding this comment

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

USING


```sql
FROM NrAiIncidentDebug SELECT count(*) WHERE environment like 'production'
TIMESERIES 1 hour facet event since 1 day ago FORECAST by 1 day using 30 days
Copy link
Contributor

Choose a reason for hiding this comment

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

Same re: capitalizing keywords


```sql
FROM NrAiIncidentDebug SELECT count(*) WHERE environment like 'production'
TIMESERIES 1 hour facet event since 1 day ago FORECAST
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd capitalize the keywords that aren't already capitalized.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

The `FORECAST` clause allows you to project future data trends based on historical data.
By default, the forecast window is set to 20% of the query window, and the historical data span is twice the query window.

you can customize these values using the `by <time range>` and `using <a historical data span>` parameters to tailor the forecast to your specific needs.
Copy link
Contributor

Choose a reason for hiding this comment

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

Same re: capitalizing keywords

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link

[!NOTE]

Our Vale automated writing feedback tool has suggestions for this PR. You can view these suggestions in the Files changed tab. If you're not a New Relic docs writer, we'll review any comments and you don't need to take any action (though feel free to make edits if you like!).

Copy link

[!NOTE]

Our Vale automated writing feedback tool has suggestions for this PR. You can view these suggestions in the Files changed tab. If you're not a New Relic docs writer, we'll review any comments and you don't need to take any action (though feel free to make edits if you like!).


To add prediction, from the <Icon name="fe-more-horizontal"/> menu, select <DNT>**Predict trend**</DNT>. In **Data Explorer**, the prediction trend appears on the chart, projecting future trends. The prediction range is automatically set to 20% of the query window, and highlighted in gray. The graph appears in dotted lines within the predicted range.

The chart query populates with the `PREDICT` function. You can [refine the query](/docs/nrql/nrql-syntax-clauses-functions/#sel-prediction) according to your requirements and run it to get the updated trend.
Copy link
Contributor

Choose a reason for hiding this comment

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

It is not obvious to me why "refine the query" jumps to the nrql reference section on PREDICT especially since many users will have come to this page from the nrql reference. Is there a reason not to jump down to #customize-prediction-range instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd also phrase this as "The PREDICT keyword will be appended to the chart query" or something along those lines.

FROM CrossClusterQuery SELECT count(*) WHERE status NOT IN ('successful', 'rejected') TIMESERIES PREDICT holtwinters(beta: 0.5) BY 3 hours USING 1 day
```

The refined prediction on the chart appears as follows:
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: At this point in the section, we switch from using "customize" to "refined" to describe the process of manually setting PREDICT parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

* 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 is not supported when used with the [`COMPARE WITH`](/docs/nrql/nrql-syntax-clauses-functions/#sel-compare) clause, [nested aggregations](/docs/nrql/using-nrql/nested-aggregation-make-ordered-computations-single-query) inside [subqueries](/docs/nrql/using-nrql/subqueries-in-nrql/).
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like there is a conjunction missing in this sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated it to:
"The PREDICT clause is not supported when used with the COMPARE WITH clause or nested aggregations inside subqueries."

Copy link
Contributor

Choose a reason for hiding this comment

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

Nested aggregation and subqueries are separate limitations (and subquery JOINs are an additional limitation), so maybe "The PREDICT clause is not supported when used with the COMPARE WITH clause, in nested aggregations, or inside subqueries or subquery JOINs."

### Access a line or area chart [#access-a-chart]

1. Go to [one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities).
2. To add prediction to a line or area chart, select it from <DNT>**Dashboards**</DNT>, or open it from <DNT>**Metrics and events**</DNT>.
Copy link
Contributor

Choose a reason for hiding this comment

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

Might want to add a note somewhere that area charts are converted to line charts for PREDICT. For faceted area charts, this means the original shape will be lost.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a tip as following:
"When you add prediction to an area chart, the chart type changes to a line chart with prediction."

</Callout>

```sql
FROM CrossClusterQuery SELECT count(*) WHERE status NOT IN ('successful', 'rejected') TIMESERIES PREDICT
Copy link
Contributor

Choose a reason for hiding this comment

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

CrossClusterQuery is an internal monitoring event that's not accessible to customers. Let's change this to "FROM Transaction SELECT count(*) WHERE error IS TRUE TIMESERIES PREDICT"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

...
```

With the `PREDICT` clause, you can incorporate predictions regarding future data trends into line and area charts based on historical data. This clause:
Copy link
Contributor

Choose a reason for hiding this comment

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

"into line charts" (area charts are not yet supported)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

To indicate the time range and historical data span, use `integer units`.

```sql
FROM CrossClusterQuery SELECT count(*) WHERE status NOT IN ('successful', 'rejected') TIMESERIES PREDICT holtwinters(beta: 0.5) BY 3 hours USING 1 day
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above, CrossClusterQuery is an internal monitoring event that's not accessible to customers. Let's change this to "FROM Transaction SELECT count(*) WHERE error IS TRUE TIMESERIES PREDICT holtwinters(beta: 0.5) BY 3 hours USING 1 day"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -26,6 +26,7 @@ Other things the data explorer view helps you:

* View data from different perspectives: from raw data to various visualizations that give insights on evolution, distribution, and more.
* Drill down into data using filters.
* View the prediction on your data trend (available with the public preview of [NRQL Predictions](/docs/query-your-data/explore-query-data/use-charts/nrql-predictions)).
Copy link
Contributor

Choose a reason for hiding this comment

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

Now that we've changed from forecast to prediction, I think "View a prediction based on your data's trend" sounds better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to "View a prediction based on the trend of your data"

<DNT>**NRQL Predictions**</DNT> in New Relic uses historical data 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. While <DNT>**NRQL Predictions**</DNT> itself does not identify potential issues, it equips you with the information needed to assess trends and plan for future challenges.


For automatic identification of potential issues, you can enroll for the <DNT>**Predictive Alerts**</DNT> feature, currently available in public preview. <DNT>**Predictive Alerts**</DNT> work alongside <DNT>**NRQL Predictions**</DNT> to automatically trigger alerts when projected trends indicate a potential issue, allowing for proactive management of your systems.
Copy link
Contributor

Choose a reason for hiding this comment

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

"enroll in" or "sign up for"

Copy link
Contributor Author

@sujitnewrelic sujitnewrelic Feb 20, 2025

Choose a reason for hiding this comment

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

"enroll for" is appropriate here.

Copy link
Contributor

Choose a reason for hiding this comment

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

"Enroll for" sounds awkward to me (and I think it's more common in non-US English) but I do see it used when I google, so I agree.

For customers on [usage-based billing](/docs/accounts/accounts-billing/new-relic-one-pricing-billing/new-relic-one-pricing-billing) plans, The query for NRQL predictions consumes [CCU](/docs/licenses/license-information/product-definitions/new-relic-one-pricing-definitions/#compute-capacity-unit) based on the events scanned, similar to other queries. It also consumes CCU for model evaluation, which appears as its product capability. During the public preview, New Relic doesn't charge CCU associated with model evaluation.

## Enrollment [#enrollment]
To enroll for the <DNT>**NRQL Predictions**</DNT> feature, navigate to <DNT>**[one.newrelic.com > Administration](https://one.newrelic.com//admin-portal) > Preview & Trials**</DNT>, and enable <DNT>**NRQL predictions**</DNT>.
Copy link
Contributor

Choose a reason for hiding this comment

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

"enroll in" or "sign up for"

Copy link
Contributor Author

@sujitnewrelic sujitnewrelic Feb 20, 2025

Choose a reason for hiding this comment

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

"enroll for" is appropriate here.

Example:

```sql
FROM CrossClusterQuery SELECT count(*) WHERE status NOT IN ('successful', 'rejected') TIMESERIES PREDICT
Copy link
Contributor

Choose a reason for hiding this comment

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

CrossClusterQuery is an internal monitoring event that's not accessible to customers. Let's change this to "FROM Transaction SELECT count(*) WHERE error IS TRUE TIMESERIES PREDICT"

Example:

```sql
FROM CrossClusterQuery SELECT count(*) WHERE status NOT IN ('successful', 'rejected') TIMESERIES PREDICT holtwinters(beta: 0.5) BY 3 hours USING 1 day
Copy link
Contributor

Choose a reason for hiding this comment

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

CrossClusterQuery is an internal monitoring event that's not accessible to customers. Let's change this to "FROM Transaction SELECT count(*) WHERE error IS TRUE TIMESERIES PREDICT holtwinters(beta: 0.5) BY 3 hours USING 1 day"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link

[!NOTE]

Our Vale automated writing feedback tool has suggestions for this PR. You can view these suggestions in the Files changed tab. If you're not a New Relic docs writer, we'll review any comments and you don't need to take any action (though feel free to make edits if you like!).

* Uses the `TIMESERIES <time period>` as the interval for predicted data points.
* Sets the prediction range to 20% of the query window by default.
* Processes historical data from the current query window and the two preceding ones to generate predictions by default.
* 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add somewhere that subqueries may need to be updated to include the USING timespan when using predict? Subqueries are resolved before evaluating the training window and thus need to include all information for training and visualization.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @cehme . Please raise a separate PR for this. I will update the document post our today's release.

@cbehera-newrelic cbehera-newrelic marked this pull request as ready for review February 25, 2025 05:14
Copy link
Contributor

@cbehera-newrelic cbehera-newrelic left a comment

Choose a reason for hiding this comment

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

LGTM

@cbehera-newrelic cbehera-newrelic merged commit 6b31167 into develop Feb 25, 2025
18 checks passed
@cbehera-newrelic cbehera-newrelic deleted the On-demad-forecast branch February 25, 2025 08:48
sujitnewrelic added a commit that referenced this pull request Feb 25, 2025
Final check corrections of the following PR:

#19667
#19933
#19853
#20055
#19937 (Only Maps part)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content requests related to docs site content from_tw Identifies issues/PRs from Tech Docs writers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants