Skip to content

Commit 224bd54

Browse files
Merge pull request #22088 from newrelic/notebooks-for-data
Feat: Notebook for data sharing
2 parents 9ac640c + 345b54c commit 224bd54

File tree

7 files changed

+1092
-0
lines changed

7 files changed

+1092
-0
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
---
2+
title: Blocks in notebook
3+
tags:
4+
- Query your data
5+
- Explore and query data
6+
- Notebooks
7+
- NRQL
8+
metaDescription: 'Learn about notebook blocks, active blocks, action toolbars, and how to add and manage query blocks in your New Relic notebooks.'
9+
freshnessValidatedDate: never
10+
---
11+
12+
Query blocks are the core component of notebooks, allowing you to write NRQL queries and visualize the results within your document. You can add multiple query blocks to a single notebook to build a comprehensive data story.
13+
14+
## Active block
15+
16+
The active block is the currently focused, interactive unit within your notebook. It serves as your immediate workspace for writing code, running queries, or adding documentation.
17+
18+
The active block is immediately visible, making it easy to spot within your notebook. It is identified by two key visual cues:
19+
* **Clear Borders**: The active block is highlighted with a distinct, clear border color.
20+
* **Visible Toolbar**: It is the only cell that displays the actions.
21+
22+
Queries coming from [Data Explorer](https://docs.newrelic.com/whats-new/2024/11/whats-new-11-11-data-explorer/) are added to the active block if the active block is of type query. If the active block is currently markdown, a new query block is added.
23+
24+
To change an active block you need to select or add another block in the notebook.
25+
26+
When a Markdown Block is active, it automatically enters editing mode featuring a two-column layout:
27+
* **Editing Column (Left)**: This is where you type and format your Markdown code.
28+
* **Live Preview Column (Right)**: This displays a real-time visual preview of your formatted documentation.
29+
30+
## Action toolbar
31+
32+
To help you optimize your workspace and maintain a clean view, the notebooks interface features an action toolbar. It consolidates core query actions into a compact, icon-based menu and groups secondary controls into a dedicated Actions Menu.
33+
34+
### Core actions (Top of the Query block)
35+
36+
These essential, frequently used actions are accessible at the top of the query block:
37+
* **Run query**: This is now represented by a play icon and executes the current query.
38+
* **Recent queries**: Allows you to quickly access and reuse your last 10 recently executed queries from your current session.
39+
* **Recommended queries**: Provides suggestions for queries.
40+
* **Copy query link**: Generates a shareable link to the current query.
41+
42+
### Actions Menu (Secondary controls)
43+
44+
The Actions Menu houses additional, less frequently used, or organizational controls.
45+
* **Add another query**: Inserts a new, empty query block into your notebook.
46+
* **Remove query**: Deletes the query from multi-query TIMESERIES.
47+
* **PromQL translator**: A utility for translating queries into PromQL (Prometheus Query Language).
48+
* **Clear**: Removes the query from the query input.
49+
* **Create alert**: Initiates the process for setting up a new alert based on the query results.
50+
* **Move up/down/to the top/to the bottom**: Reorganizes the current query block's position within the notebook.
51+
* **Delete block**: Deletes the active block.
52+
53+
## Add a query block
54+
55+
To add a query block to your notebook:
56+
57+
1. Open your notebook in the query console.
58+
2. Click **+ Query**.
59+
3. Write your [NRQL query](https://docs.newrelic.com/docs/nrql/nrql-syntax-clauses-functions/) in the query editor.
60+
4. Press **Run** or **Enter** to execute the query and display results.
61+
62+
<Callout variant="tip">
63+
All NRQL queries supported in the standard query builder work in notebook query blocks. You can query any data type including metrics, events, logs, and traces. All [chart types](https://docs.newrelic.com/docs/query-your-data/explore-query-data/use-charts/chart-types/) and customizations available in the standard query builder are supported in notebooks.
64+
</Callout>
65+
66+
67+
## Query block management
68+
69+
<CollapserGroup>
70+
<Collapser
71+
id="duplicate-query-block"
72+
title="Duplicate a query block"
73+
>
74+
75+
1. Select the query block.
76+
2. Click the **three-dot menu** in the top-right corner.
77+
3. Select **Duplicate**.
78+
79+
</Collapser>
80+
81+
<Collapser
82+
id="move-query-blocks"
83+
title="Move query blocks"
84+
>
85+
86+
Reorder your query blocks to improve your narrative flow and organize your analysis logically. This helps you tell a better story by placing related queries together or arranging them in a sequence that makes sense for your investigation.
87+
88+
1. Select the query block you want to move.
89+
2. Click the **three-dot menu**.
90+
3. Select from:
91+
* **Move up**
92+
* **Move down**
93+
* **Move to top**
94+
* **Move to bottom**
95+
96+
</Collapser>
97+
98+
<Collapser
99+
id="delete-query-block"
100+
title="Delete a query block"
101+
>
102+
103+
1. Select the query block you want to delete.
104+
2. Click the **three-dot menu**.
105+
3. Select **Delete**.
106+
4. Confirm the deletion.
107+
108+
</Collapser>
109+
</CollapserGroup>
110+
111+
## What's next?
112+
113+
* Return to [Get started with notebooks](/docs/query-your-data/explore-query-data/notebooks/introduction-notebooks) for an overview
114+
* Explore [Dashboards](/docs/query-your-data/explore-query-data/dashboards/introduction-dashboards) for building persistent data visualizations
115+
* Learn more about [Chart types](/docs/query-your-data/explore-query-data/use-charts/chart-types) for visualization options
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
---
2+
title: Create data-driven documents with notebooks
3+
tags:
4+
- Query your data
5+
- Explore and query data
6+
- Notebooks
7+
metaDescription: 'Use New Relic notebooks to create structured, data-driven documents that combine queries, visualizations, and descriptive text into shareable assets for investigations, post-mortems, and analytical insights.'
8+
freshnessValidatedDate: never
9+
---
10+
11+
<Callout title="Preview feature">
12+
We're still actively developing notebooks, but we're excited for you to try this powerful new feature! 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/).
13+
</Callout>
14+
15+
When investigating complex issues or sharing insights with your team, you often find yourself jumping between different tools, copying queries, taking screenshots, and struggling to maintain context as you piece together a complete story from your data. Traditional dashboards are great for monitoring, but they fall short when you need to document investigations, create detailed post-mortems, or build step-by-step analytical workflows.
16+
17+
Notebooks solve this problem by providing a dynamic and organized way to tell a complete story with your data. They are structured, data-driven documents that let you combine queries, visualizations, and descriptive text into a single, shareable asset, eliminating the need to switch between multiple tools or lose important context during your analysis.
18+
19+
## Use cases
20+
21+
Use notebooks to improve your workflow and turn raw data into actionable stories:
22+
23+
* **Query, analyze, and visualize data**: Query all your observability data (logs, metrics, events) and create visualizations to gain a better understanding of your system's performance.
24+
* **Create post-mortems and incident documents**: Collaborate with your team to document investigations and create a clear, reusable record for incident post-mortems and root cause analysis.
25+
* **Build reusable workflows and runbooks**: Create and share step-by-step guides for complex analysis.
26+
* **Add context and narrative**: Use Markdown to easily add detailed titles, notes, and explanations to your queries and charts, transforming disconnected data points into a cohesive story.
27+
28+
## Get started with notebooks
29+
30+
Now that you understand the basics of notebooks, you're ready to start creating and managing your own notebooks.
31+
32+
### Access notebooks
33+
34+
To access notebooks:
35+
36+
1. Go to **[one.newrelic.com](https://one.newrelic.com)**.
37+
2. Open the **Query your data** console from the drawer at the bottom of the page.
38+
3. Click **Notebooks** in the query builder header to see a list of all notebooks created by your organization.
39+
40+
<img
41+
title="Navigate to notebooks from query your data"
42+
alt="Screenshot showing how to navigate to notebooks from the query your data drawer"
43+
src="/images/notebooks-navigation.webp"
44+
/>
45+
46+
<figcaption>
47+
Navigate to notebooks by going to **Query your data > Notebooks**
48+
</figcaption>
49+
50+
<CollapserGroup>
51+
<Collapser
52+
id="create-notebook"
53+
title="Create a notebook"
54+
>
55+
56+
You have two simple ways to start a new notebook:
57+
58+
### Start from the notebooks index
59+
60+
1. Click **+ Create a notebook** at the top-right corner of the index.
61+
2. Give your notebook a meaningful name (names are searchable, so use relevant keywords like your service or application name).
62+
3. Click **Create**.
63+
4. In the query console drawer, type your first query.
64+
65+
### Start from the query console
66+
67+
1. Open the query console (the drawer at the bottom of the platform).
68+
2. Create your desired queries and Markdown blocks.
69+
3. Click the **Save**.
70+
4. Name your notebook, and click **Save**.
71+
72+
</Collapser>
73+
74+
<Collapser
75+
id="manage-notebooks"
76+
title="Manage your notebooks"
77+
>
78+
79+
### Search and sort notebooks
80+
81+
To find specific notebooks in your organization:
82+
83+
1. **Search by name**: Use the search bar at the top of the notebooks index to find notebooks by name or keywords.
84+
2. **Sort notebooks**: Click the sort dropdown to organize notebooks by:
85+
* Name (A-Z or Z-A)
86+
* Last modified date (newest or oldest first)
87+
* Created date (newest or oldest first)
88+
* Favorites (starred notebooks appear first)
89+
3. **Filter by favorites**: Click the star filter to show only your favorite notebooks.
90+
91+
### Duplicate a notebook
92+
93+
1. Open the notebook you want to duplicate.
94+
2. Click the arrow next to the tab name in the console drawer and click **duplicate**.
95+
3. Click **Duplicate** from the context menu.
96+
4. A copy of the notebook will open in a new tab, ready for editing.
97+
98+
### Mark a notebook as favorite
99+
100+
To quickly find your most important notebooks, you can mark them as a favorite:
101+
102+
1. Click the star icon next to a notebook's name in the index page.
103+
2. The icon will turn yellow, and the notebook will be grouped at the top of the index list.
104+
3. Click the star icon again to remove it from your favorites.
105+
106+
</Collapser>
107+
108+
<Collapser
109+
id="delete-notebook"
110+
title="Delete a notebook"
111+
>
112+
113+
<Callout variant="caution">
114+
Deleting a notebook is permanent and cannot be undone. Once deleted, the notebook and all its content are permanently removed from the system. Make sure to duplicate any notebooks you want to preserve before deleting.
115+
</Callout>
116+
117+
1. On the notebook index list, click the three-dot action menu for the notebook you wish to delete.
118+
2. Click the **Delete** option.
119+
3. Confirm the deletion by clicking **Delete** again.
120+
121+
</Collapser>
122+
</CollapserGroup>
123+
124+
## Notebook blocks
125+
126+
Blocks are the fundamental building units of a notebook. They are individual sections you add to structure your analysis and narrative.
127+
128+
### Query blocks
129+
130+
Use query blocks to write [NRQL queries](/docs/nrql/nrql-syntax-clauses-functions/) and visualize the results. All single query [chart types](https://docs.newrelic.com/docs/query-your-data/explore-query-data/use-charts/chart-types/) and customizations available in the standard query builder are supported in notebooks.
131+
132+
### Text blocks
133+
134+
Use Markdown to add rich text, titles, context, explanations, and descriptive text to tell the story of your investigation.
135+
136+
### Block actions
137+
138+
Every [block](/docs/query-your-data/explore-query-data/notebooks/introduction-notebooks/) can be manipulated to organize your document:
139+
140+
* **Duplicate**: Create a copy of the block
141+
* **Delete**: Remove the block from your notebook
142+
* **Move Up/Down**: Reorder blocks within your notebook
143+
* **Move to Top/Bottom**: Quickly move blocks to the beginning or end
144+
145+
## Notebooks permissions
146+
147+
Before you start creating notebooks, it's important to understand how permissions work and who will have access to your notebooks.
148+
149+
### Organization association
150+
151+
Every notebook is a resource that belongs to the organization in which it was created. This association is permanent and cannot be changed. Notebooks cannot be shared between different organizations. If the organization is deleted, the notebook is deleted as well. If a user moves to a different organization, they will not have access to notebooks from their previous organization.
152+
153+
### Current permissions model
154+
155+
<Callout variant="tip">
156+
Notebooks currently do not have granular permission settings. Anyone in the organization who has access to the feature can create new notebooks, edit and delete existing ones.
157+
</Callout>
158+
159+
**Current capabilities:**
160+
* All organization members with notebooks access can view all notebooks
161+
* All organization members with notebooks access can create, edit, and delete any notebook
162+
* Notebooks are automatically shared across your entire organization
163+
164+
165+
## What's next?
166+
167+
Now that you understand the basics of notebooks, you can:
168+
169+
* Learn more about [blocks in notebook](/docs/query-your-data/explore-query-data/notebooks/add-queries-to-notebooks/)
170+
171+
You can also explore related features:
172+
* [Dashboards](/docs/query-your-data/explore-query-data/dashboards/introduction-dashboards) for building persistent data visualizations
173+
* [Query builder](/docs/query-your-data/explore-query-data/query-builder/introduction-query-builder) for creating individual queries
174+
* [Charts](/docs/query-your-data/explore-query-data/use-charts/use-your-charts) for understanding visualization options

0 commit comments

Comments
 (0)