-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Feat: Notebook for data sharing #22088
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
Changes from all commits
aa646d8
002350c
b79c475
3b08f30
1961d30
ab8a48e
87870dd
79a9ea9
cd68d69
345b54c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| --- | ||
| title: Blocks in notebook | ||
| tags: | ||
| - Query your data | ||
| - Explore and query data | ||
| - Notebooks | ||
| - NRQL | ||
| metaDescription: 'Learn about notebook blocks, active blocks, action toolbars, and how to add and manage query blocks in your New Relic notebooks.' | ||
| freshnessValidatedDate: never | ||
| --- | ||
|
|
||
| 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. | ||
|
|
||
| ## Active block | ||
|
|
||
| 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. | ||
|
|
||
| The active block is immediately visible, making it easy to spot within your notebook. It is identified by two key visual cues: | ||
| * **Clear Borders**: The active block is highlighted with a distinct, clear border color. | ||
| * **Visible Toolbar**: It is the only cell that displays the actions. | ||
|
|
||
| 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. | ||
|
|
||
| To change an active block you need to select or add another block in the notebook. | ||
|
|
||
| When a Markdown Block is active, it automatically enters editing mode featuring a two-column layout: | ||
| * **Editing Column (Left)**: This is where you type and format your Markdown code. | ||
| * **Live Preview Column (Right)**: This displays a real-time visual preview of your formatted documentation. | ||
|
|
||
| ## Action toolbar | ||
|
|
||
| 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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Delete this. No valuable information here. |
||
|
|
||
| ### Core actions (Top of the Query block) | ||
|
|
||
| These essential, frequently used actions are accessible at the top of the query block: | ||
| * **Run query**: This is now represented by a play icon and executes the current query. | ||
| * **Recent queries**: Allows you to quickly access and reuse your last 10 recently executed queries from your current session. | ||
| * **Recommended queries**: Provides suggestions for queries. | ||
| * **Copy query link**: Generates a shareable link to the current query. | ||
|
|
||
| ### Actions Menu (Secondary controls) | ||
|
|
||
| The Actions Menu houses additional, less frequently used, or organizational controls. | ||
| * **Add another query**: Inserts a new, empty query block into your notebook. | ||
| * **Remove query**: Deletes the query from multi-query TIMESERIES. | ||
| * **PromQL translator**: A utility for translating queries into PromQL (Prometheus Query Language). | ||
| * **Clear**: Removes the query from the query input. | ||
| * **Create alert**: Initiates the process for setting up a new alert based on the query results. | ||
| * **Move up/down/to the top/to the bottom**: Reorganizes the current query block's position within the notebook. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this useful? Do the queries run in sequence? |
||
| * **Delete block**: Deletes the active block. | ||
|
|
||
| ## Add a query block | ||
|
|
||
| To add a query block to your notebook: | ||
|
|
||
| 1. Open your notebook in the query console. | ||
| 2. Click **+ Query**. | ||
| 3. Write your [NRQL query](https://docs.newrelic.com/docs/nrql/nrql-syntax-clauses-functions/) in the query editor. | ||
| 4. Press **Run** or **Enter** to execute the query and display results. | ||
|
|
||
| <Callout variant="tip"> | ||
| 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. | ||
| </Callout> | ||
|
|
||
|
|
||
| ## Query block management | ||
|
|
||
| <CollapserGroup> | ||
| <Collapser | ||
| id="duplicate-query-block" | ||
| title="Duplicate a query block" | ||
| > | ||
|
|
||
| 1. Select the query block. | ||
| 2. Click the **three-dot menu** in the top-right corner. | ||
| 3. Select **Duplicate**. | ||
|
|
||
| </Collapser> | ||
|
|
||
| <Collapser | ||
| id="move-query-blocks" | ||
| title="Move query blocks" | ||
| > | ||
|
|
||
| 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. | ||
|
|
||
| 1. Select the query block you want to move. | ||
| 2. Click the **three-dot menu**. | ||
| 3. Select from: | ||
| * **Move up** | ||
| * **Move down** | ||
| * **Move to top** | ||
| * **Move to bottom** | ||
|
|
||
| </Collapser> | ||
|
|
||
| <Collapser | ||
| id="delete-query-block" | ||
| title="Delete a query block" | ||
| > | ||
|
|
||
| 1. Select the query block you want to delete. | ||
| 2. Click the **three-dot menu**. | ||
| 3. Select **Delete**. | ||
| 4. Confirm the deletion. | ||
|
|
||
| </Collapser> | ||
| </CollapserGroup> | ||
|
|
||
| ## What's next? | ||
|
|
||
| * Return to [Get started with notebooks](/docs/query-your-data/explore-query-data/notebooks/introduction-notebooks) for an overview | ||
| * Explore [Dashboards](/docs/query-your-data/explore-query-data/dashboards/introduction-dashboards) for building persistent data visualizations | ||
| * Learn more about [Chart types](/docs/query-your-data/explore-query-data/use-charts/chart-types) for visualization options | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,174 @@ | ||
| --- | ||
| title: Create data-driven documents with notebooks | ||
| tags: | ||
| - Query your data | ||
| - Explore and query data | ||
| - Notebooks | ||
| 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.' | ||
| freshnessValidatedDate: never | ||
| --- | ||
|
|
||
| <Callout title="Preview feature"> | ||
| 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/). | ||
| </Callout> | ||
|
|
||
| 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. | ||
|
|
||
| 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. | ||
|
|
||
| ## Use cases | ||
|
|
||
| Use notebooks to improve your workflow and turn raw data into actionable stories: | ||
|
|
||
| * **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. | ||
| * **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. | ||
| * **Build reusable workflows and runbooks**: Create and share step-by-step guides for complex analysis. | ||
| * **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. | ||
|
|
||
| ## Get started with notebooks | ||
|
|
||
| Now that you understand the basics of notebooks, you're ready to start creating and managing your own notebooks. | ||
|
|
||
| ### Access notebooks | ||
|
|
||
| To access notebooks: | ||
|
|
||
| 1. Go to **[one.newrelic.com](https://one.newrelic.com)**. | ||
| 2. Open the **Query your data** console from the drawer at the bottom of the page. | ||
| 3. Click **Notebooks** in the query builder header to see a list of all notebooks created by your organization. | ||
|
|
||
| <img | ||
| title="Navigate to notebooks from query your data" | ||
| alt="Screenshot showing how to navigate to notebooks from the query your data drawer" | ||
| src="/images/notebooks-navigation.webp" | ||
| /> | ||
|
|
||
| <figcaption> | ||
| Navigate to notebooks by going to **Query your data > Notebooks** | ||
| </figcaption> | ||
|
|
||
| <CollapserGroup> | ||
| <Collapser | ||
| id="create-notebook" | ||
| title="Create a notebook" | ||
| > | ||
|
|
||
| You have two simple ways to start a new notebook: | ||
|
|
||
| ### Start from the notebooks index | ||
|
|
||
| 1. Click **+ Create a notebook** at the top-right corner of the index. | ||
| 2. Give your notebook a meaningful name (names are searchable, so use relevant keywords like your service or application name). | ||
| 3. Click **Create**. | ||
| 4. In the query console drawer, type your first query. | ||
|
|
||
| ### Start from the query console | ||
|
|
||
| 1. Open the query console (the drawer at the bottom of the platform). | ||
| 2. Create your desired queries and Markdown blocks. | ||
| 3. Click the **Save**. | ||
| 4. Name your notebook, and click **Save**. | ||
|
|
||
| </Collapser> | ||
|
|
||
| <Collapser | ||
| id="manage-notebooks" | ||
| title="Manage your notebooks" | ||
| > | ||
|
|
||
| ### Search and sort notebooks | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need this? This is regular behavior. Why are we writing about it unless there is something special here. |
||
|
|
||
| To find specific notebooks in your organization: | ||
|
|
||
| 1. **Search by name**: Use the search bar at the top of the notebooks index to find notebooks by name or keywords. | ||
| 2. **Sort notebooks**: Click the sort dropdown to organize notebooks by: | ||
| * Name (A-Z or Z-A) | ||
| * Last modified date (newest or oldest first) | ||
| * Created date (newest or oldest first) | ||
| * Favorites (starred notebooks appear first) | ||
| 3. **Filter by favorites**: Click the star filter to show only your favorite notebooks. | ||
|
|
||
| ### Duplicate a notebook | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When u duplicate a notebook, does it ask for org information or anything? Is it duplicated in the same org as the orginal one? What is the benefit? I am guessing we should approach this from the angle of templates. |
||
|
|
||
| 1. Open the notebook you want to duplicate. | ||
| 2. Click the arrow next to the tab name in the console drawer and click **duplicate**. | ||
| 3. Click **Duplicate** from the context menu. | ||
| 4. A copy of the notebook will open in a new tab, ready for editing. | ||
|
|
||
| ### Mark a notebook as favorite | ||
|
|
||
| To quickly find your most important notebooks, you can mark them as a favorite: | ||
|
|
||
| 1. Click the star icon next to a notebook's name in the index page. | ||
| 2. The icon will turn yellow, and the notebook will be grouped at the top of the index list. | ||
| 3. Click the star icon again to remove it from your favorites. | ||
|
|
||
| </Collapser> | ||
|
|
||
| <Collapser | ||
| id="delete-notebook" | ||
| title="Delete a notebook" | ||
| > | ||
|
|
||
| <Callout variant="caution"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can a deleted notebook be retrieved? |
||
| 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. | ||
| </Callout> | ||
|
|
||
| 1. On the notebook index list, click the three-dot action menu for the notebook you wish to delete. | ||
| 2. Click the **Delete** option. | ||
| 3. Confirm the deletion by clicking **Delete** again. | ||
|
|
||
| </Collapser> | ||
| </CollapserGroup> | ||
|
|
||
| ## Notebook blocks | ||
|
|
||
| Blocks are the fundamental building units of a notebook. They are individual sections you add to structure your analysis and narrative. | ||
|
|
||
| ### Query blocks | ||
|
|
||
| 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. | ||
|
|
||
| ### Text blocks | ||
|
|
||
| Use Markdown to add rich text, titles, context, explanations, and descriptive text to tell the story of your investigation. | ||
|
|
||
| ### Block actions | ||
|
|
||
| Every [block](/docs/query-your-data/explore-query-data/notebooks/introduction-notebooks/) can be manipulated to organize your document: | ||
|
|
||
| * **Duplicate**: Create a copy of the block | ||
| * **Delete**: Remove the block from your notebook | ||
| * **Move Up/Down**: Reorder blocks within your notebook | ||
| * **Move to Top/Bottom**: Quickly move blocks to the beginning or end | ||
|
|
||
| ## Notebooks permissions | ||
|
|
||
| Before you start creating notebooks, it's important to understand how permissions work and who will have access to your notebooks. | ||
|
|
||
| ### Organization association | ||
|
|
||
| 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. | ||
|
|
||
| ### Current permissions model | ||
|
|
||
| <Callout variant="tip"> | ||
| 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. | ||
| </Callout> | ||
|
|
||
| **Current capabilities:** | ||
| * All organization members with notebooks access can view all notebooks | ||
| * All organization members with notebooks access can create, edit, and delete any notebook | ||
| * Notebooks are automatically shared across your entire organization | ||
|
|
||
|
|
||
| ## What's next? | ||
|
|
||
| Now that you understand the basics of notebooks, you can: | ||
|
|
||
| * Learn more about [blocks in notebook](/docs/query-your-data/explore-query-data/notebooks/add-queries-to-notebooks/) | ||
|
|
||
| You can also explore related features: | ||
| * [Dashboards](/docs/query-your-data/explore-query-data/dashboards/introduction-dashboards) for building persistent data visualizations | ||
| * [Query builder](/docs/query-your-data/explore-query-data/query-builder/introduction-query-builder) for creating individual queries | ||
| * [Charts](/docs/query-your-data/explore-query-data/use-charts/use-your-charts) for understanding visualization options | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this mean? Not sure what we are trying to say here?
Also, how do you make a block "not active"?