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

Draft
wants to merge 17 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 3 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
28 changes: 28 additions & 0 deletions src/content/docs/nrql/nrql-syntax-clauses-functions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,34 @@
</CollapserGroup>
</Collapser>

<Collapser
className="freq-link"
id="sel-forecast"
title={<><InlineCode>FORECAST</InlineCode> clause</>}
>
<Callout title="preview">
We're still working on this feature, but we'd love for you to try it out!

Check notice on line 911 in src/content/docs/nrql/nrql-syntax-clauses-functions.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/nrql/nrql-syntax-clauses-functions.mdx#L911

[Microsoft.SentenceLength] Try to keep sentences short (< 30 words).
Raw output
{"message": "[Microsoft.SentenceLength] Try to keep sentences short (\u003c 30 words).", "location": {"path": "src/content/docs/nrql/nrql-syntax-clauses-functions.mdx", "range": {"start": {"line": 911, "column": 3}}}, "severity": "INFO"}

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 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

To indicate the forecast range and historical data span, use `integer units`. For example:

* `FORECAST by 1 hour using 2 days`
* `FORECAST by 6 hours using 1 week`
* `FORECAST by 1 day using 1 month`
</Collapser>

<Collapser
className="freq-link"
id="sel-until"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Other things metrics and events helps you do:

* See data from different points of view: from raw data to different visualizations that provide insights on evolution, distribution, and more.
* Drill down into data using filters.
* See the forecast of your data trend (Available in [on-demand forecasting](/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting)).
* Add your searches to a [dashboard](/docs/dashboards/new-relic-one-dashboards/get-started/introduction-new-relic-one-dashboards).
* Understand how [NRQL](/docs/query-data/nrql-new-relic-query-language/getting-started/introduction-nrql) works: metrics and events shows how queries are built.

Expand Down Expand Up @@ -257,6 +258,35 @@ At the working space you can see:
src="/images/queries-nrql_screenshot-crop_metrics-events-share-export.webp"
/>
</Collapser>

<Collapser
className="freq-link"
id="share-export"
title="Forecast"
>

<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>

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


<img
title="On-demand forecasting"
alt="On-demand forecasting"
src="/images/on-demand-forecast.webp"
/>

<figcaption>
<DNT>**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Metrics and events**</DNT>: Forecasted view.
</figcaption>
</Collapser>
</CollapserGroup>

## Visualize your custom metric after creating it [#visualize-metric]
Expand Down Expand Up @@ -310,6 +340,28 @@ See the following examples to learn how and when to use metrics and events.
3. Find the attribute you made changes to and check the update was successful.
</Collapser>

<Collapser
className="freq-link"
id="use-case-new-data"
title="See forecast of a line or area chart (Available in on-demand forecasting)"
>

<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>

<DNT>
**I want to see the future trend of a line chart so that I can take proactive measures based on the forecasted data.**
</DNT>

1. go to <DNT>**[one.newrelic.com](https://one.newrelic.com) > All capabilities > Metrics and events**</DNT>.
2. Select a line or area chart.
3. Select <DNT>**Make a forecast**</DNT> from the <DNT>**Options**</DNT> menu. The forecasted chart opens in the <DNT>**Data explorer**</DNT>.
4. Save it to a dashboard.
</Collapser>

<Collapser
className="freq-link"
id="use-case-troubleshooting"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

* 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.
* See the forecasted trend of your data (Available in [on-demand forecasting](/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting)).
* Add your searches to a dashboard.
* Understand how NRQL works: the Data Explorer automatically generates the NRQL queries based on your selections.

Expand All @@ -46,6 +47,10 @@
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.

Check notice on line 50 in src/content/docs/query-your-data/explore-query-data/query-builder/introduction-new-data-explorer.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/query-your-data/explore-query-data/query-builder/introduction-new-data-explorer.mdx#L50

[new-relic.ComplexWords] Consider using 'change' instead of 'Modify'.
Raw output
{"message": "[new-relic.ComplexWords] Consider using 'change' instead of 'Modify'.", "location": {"path": "src/content/docs/query-your-data/explore-query-data/query-builder/introduction-new-data-explorer.mdx", "range": {"start": {"line": 50, "column": 27}}}, "severity": "INFO"}
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

7. **Add to dashboard**: Add your chart to a dashboard for future reference.

<img
title="Data explorer view"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
---
title: On-demand forecasting
tags:
- Forecast on a chart
redirects:
freshnessValidatedDate: never
---
<Callout title="preview">
We're still working on this feature, but we'd love for you to try it out!

Check notice on line 9 in src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx#L9

[Microsoft.SentenceLength] Try to keep sentences short (< 30 words).
Raw output
{"message": "[Microsoft.SentenceLength] Try to keep sentences short (\u003c 30 words).", "location": {"path": "src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx", "range": {"start": {"line": 9, "column": 3}}}, "severity": "INFO"}

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>


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

This proactive approach helps you to anticipate issues before they occur, enabling timely interventions to maintain optimal system performance.

Check notice on line 17 in src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx#L17

[new-relic.ComplexWords] Consider using 'expect' instead of 'anticipate'.
Raw output
{"message": "[new-relic.ComplexWords] Consider using 'expect' instead of 'anticipate'.", "location": {"path": "src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx", "range": {"start": {"line": 17, "column": 38}}}, "severity": "INFO"}

Check notice on line 17 in src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx#L17

[new-relic.ComplexWords] Consider using 'keep' or 'support' instead of 'maintain'.
Raw output
{"message": "[new-relic.ComplexWords] Consider using 'keep' or 'support' instead of 'maintain'.", "location": {"path": "src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx", "range": {"start": {"line": 17, "column": 108}}}, "severity": "INFO"}
Forecasting is a powerful tool for decision-making, helping teams to allocate resources effectively, and plan for potential challenges.

Check notice on line 18 in src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx#L18

[new-relic.ComplexWords] Consider using 'assign' or 'divide' instead of 'allocate'.
Raw output
{"message": "[new-relic.ComplexWords] Consider using 'assign' or 'divide' instead of 'allocate'.", "location": {"path": "src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx", "range": {"start": {"line": 18, "column": 70}}}, "severity": "INFO"}

<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)

</Callout>

## Getting started [#getting-started-on-demand-forecast]
Waiting for the content to add here.

<img
title="On-demand forecasting"
alt="On-demand forecasting"
src="/images/on-demand-forecast.webp"
/>

<figcaption>
<DNT>**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Metrics and events**</DNT>: Forecasted view.
</figcaption>

## Create a forecast [#create-forecast]
Follow these steps to create a forecast on a line or area chart in New Relic:

<Steps>

<Step>
### Access a line or area chart [#access-a-line-chart]

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

<Step>
### Make a forecast [#make-a-forecast]

In the upper-right corner of the chart, select <DNT>**Make a forecast**</DNT> from the <DNT>**Options**</DNT> menu.
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.

Check notice on line 56 in src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx#L56

[Microsoft.Wordiness] Consider using 'per' instead of 'as per'.
Raw output
{"message": "[Microsoft.Wordiness] Consider using 'per' instead of 'as per'.", "location": {"path": "src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx", "range": {"start": {"line": 56, "column": 124}}}, "severity": "INFO"}
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.


</Step>

<Step>
### Add to dashboard [#add-to-dashboard]

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


You can now view the forecasted chart on the selected dashboard.

</Step>

</Steps>

## Default forecasting range [#default-forecasting-range]
The default forecast range in New Relic provides a baseline for projecting future trends based on historical data.
This range is automatically set to ensure users receive meaningful insights without a manual NRQL configuration.
Understanding these default settings helps users make informed decisions about when and how to customize their forecasts for more precise predictions.

### Default values [#default-values]
When you create a forecast in New Relic, the system automatically appends the `FORECAST` function to the existing chart query, and sets the following default values:
* **Forecast range**: The forecast covers 20% of the total time specified in your query window, allowing you to see a short-term projection based on current trends.
* **Historical data**: The system analyzes historical data that is twice the length of your query window, providing a comprehensive dataset to enhance the accuracy of the forecast.

Check failure on line 81 in src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx#L81

[Microsoft.Contractions] Use 'that's' instead of 'that is'.
Raw output
{"message": "[Microsoft.Contractions] Use 'that's' instead of 'that is'.", "location": {"path": "src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx", "range": {"start": {"line": 81, "column": 60}}}, "severity": "ERROR"}


### 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.

Check notice on line 85 in src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx#L85

[Microsoft.Wordiness] Consider using 'per' instead of 'as per'.
Raw output
{"message": "[Microsoft.Wordiness] Consider using 'per' instead of 'as per'.", "location": {"path": "src/content/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting.mdx", "range": {"start": {"line": 85, "column": 111}}}, "severity": "INFO"}
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"?

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"


When you create a forecast of a chart, the revised NRQL query appears with the `FORECAST` function, as in the following example:

```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

```
The forecasted chart appears as following:

<img
title="default forecast"
alt="default forecast"
src="/images/on-demand-forecast-default.webp"
/>

<figcaption>
<DNT>**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > dashboards**</DNT>: default 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

* **`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


Example:

```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

```

The refined forecast of the chart appears as following:

<img
title="Refined forecast"
alt="Refined forecast"
src="/images/on-demand-forecast-refined.webp"
/>

<figcaption>
<DNT>**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > dashboards**</DNT>: refined forecast.

</figcaption>
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,18 @@

## Chart share and view options [#share-charts]

Most charts have various options, including a chart-embed option, getting a chart as an image, and adding a chart to a dashboard. See [Import, export, add, and share dashboards and charts](/docs/query-your-data/explore-query-data/dashboards/dashboards-charts-import-export-data/)
Most charts have various options, including a chart-embed option, getting a chart as an image, and adding a chart to a dashboard. See [Import, export, add, and share dashboards and charts](/docs/query-your-data/explore-query-data/dashboards/dashboards-charts-import-export-data/).

## Chart with a forecasted trend [#chart-forecasted-trend]

<Callout title="preview">
We're still working on this feature, but we'd love for you to try it out!

Check notice on line 295 in src/content/docs/query-your-data/explore-query-data/use-charts/use-your-charts.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/query-your-data/explore-query-data/use-charts/use-your-charts.mdx#L295

[Microsoft.SentenceLength] Try to keep sentences short (< 30 words).
Raw output
{"message": "[Microsoft.SentenceLength] Try to keep sentences short (\u003c 30 words).", "location": {"path": "src/content/docs/query-your-data/explore-query-data/use-charts/use-your-charts.mdx", "range": {"start": {"line": 295, "column": 3}}}, "severity": "INFO"}

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, the line and area charts will have the forecasting option, allowing you to project future trends based on historical data.
See [On-demand forecasting](/docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting) for more information.

## Use open-source charting library [#victory-charts]

Expand Down
4 changes: 3 additions & 1 deletion src/nav/dashboards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ pages:
path: /docs/query-your-data/explore-query-data/use-charts/use-your-charts
- title: Chart types
path: /docs/query-your-data/explore-query-data/use-charts/chart-types
- title: Chart refresh rates
- title: Chart refresh rates
path: /docs/query-your-data/explore-query-data/use-charts/chart-refresh-rates
- title: On-demand forecasting
path: /docs/query-your-data/explore-query-data/use-charts/on-demand-forecasting
- title: Dashboards
pages:
- title: Get started with dashboards
Expand Down
Binary file added static/images/on-demand-forecast-default.webp
Binary file not shown.
Binary file added static/images/on-demand-forecast-refined.webp
Binary file not shown.
Binary file added static/images/on-demand-forecast.webp
Binary file not shown.
Loading