Skip to content

Commit

Permalink
feat: enable hiding pages in sidebar + pricing docs updates (#10407)
Browse files Browse the repository at this point in the history
* spend allocation changes

* update copy

* remove last ref
  • Loading branch information
isabellaenriquez committed Jun 15, 2024
1 parent 3e90f76 commit d7d3110
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 4 deletions.
1 change: 0 additions & 1 deletion docs/pricing/quotas/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ The first 6 actions in the list can all be done in [sentry.io](https://sentry.io
| Action | Errors | Span Units | Replays |Attachments |
| ------ | ------ | ------------ | ----------- |----------- |
| [Ensure spike protection is enabled](#spike-protection) | ✓ | ✓ | | ✓ |
| [Set a spend allocation budget](#spend-allocation) | ✓ | ✓ | | ✓ |
| [Adjust your quota](#adjusting-your-quota) | ✓ | ✓ | ✓ | ✓ |
| [Rate limit your events or attachments](#rate-limits) | ✓ | | | ✓ |
| [Review repeated events](#event-repetition) | ✓ | | | |
Expand Down
3 changes: 2 additions & 1 deletion docs/pricing/quotas/spend-allocation.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
title: "Spend Allocation"
sidebar_hidden: true
sidebar_order: 20
description: "Learn how to allocate reserved volume to specific projects so that the most important projects are always monitored."
---

<Note>

This feature is only available to organizations with a Business or Enterprise plan.
This feature is only available to organizations with an Enterprise plan.

</Note>

Expand Down
1 change: 0 additions & 1 deletion docs/pricing/quotas/spike-protection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ We recommend taking the following steps to manage your spikes:
- Set up [metric alerts](/product/alerts/alert-types/#metric-alerts) for the number of events in a project.
- If a specific release version has caused the spike, add the version identifier to the project's [inbound filters](/pricing/quotas/manage-event-stream-guide/#inbound-data-filters) to avoid accepting events from that release.
- Set up a [pay-as-you-go budget](/pricing/#pricing-how-it-works) to make sure you have time to adjust your volume in the event of a future spike.
- Set up [spend allocations](/pricing/quotas/#spend-allocation) to ensure your critical projects are guaranteed a portion of your reserved volume, even if there are spikes in other projects.

To review the events that were dropped to save your quota with Spike Protection, go to the "Usage Stats" tab of the **Stats** page for your Sentry org and select the event of interest from the "Category" dropdown. You'll be able to see project-level details of your stats by using the project selector.

Expand Down
7 changes: 6 additions & 1 deletion src/components/dynamicNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type Node = {
[key: string]: any;
context: {
[key: string]: any;
sidebar_hidden?: boolean;
sidebar_order?: number;
sidebar_title?: string;
title?: string;
Expand Down Expand Up @@ -62,7 +63,11 @@ export const renderChildren = (
return sortPages(
children.filter(
({name, node}) =>
node && !!node.context.title && name !== '' && exclude.indexOf(node.path) === -1
node &&
!!node.context.title &&
name !== '' &&
exclude.indexOf(node.path) === -1 &&
!node.context.sidebar_hidden
),
({node}) => node!
).map(({node, children: nodeChildren}) => {
Expand Down
3 changes: 3 additions & 0 deletions src/components/sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ type NavNode = {
context: {
draft: boolean;
title: string;
sidebar_hidden?: boolean;
sidebar_order?: number;
sidebar_title?: string;
};
Expand All @@ -215,6 +216,7 @@ const docNodeToNavNode = (node: DocNode): NavNode => ({
title: node.frontmatter.title,
sidebar_order: node.frontmatter.sidebar_order,
sidebar_title: node.frontmatter.sidebar_title,
sidebar_hidden: node.frontmatter.sidebar_hidden,
},
path: '/' + node.path + '/',
});
Expand Down Expand Up @@ -300,6 +302,7 @@ function PlatformSidebar({rootNode, platformName, guideName}: PlatformSidebarPro
title: n.frontmatter.title,
sidebar_order: n.frontmatter.sidebar_order,
sidebar_title: n.frontmatter.sidebar_title,
sidebar_hidden: n.frontmatter.sidebar_hidden,
},
path: '/' + n.path + '/',
};
Expand Down
5 changes: 5 additions & 0 deletions src/types/frontmatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ export interface FrontMatter {
*/
notoc?: boolean;

/**
* Set this to true to hide from the sidebar
*/
sidebar_hidden?: boolean;

/**
* The order of this page in auto generated sidebars and grids.
*/
Expand Down
1 change: 1 addition & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const splitToChunks = <T>(numChunks: number, arr: T[]): T[][] => {

type Page = {
context: {
sidebar_hidden?: boolean;
sidebar_order?: number;
sidebar_title?: string;
title?: string;
Expand Down

0 comments on commit d7d3110

Please sign in to comment.