diff --git a/app/globals.css b/app/globals.css
index 11591d2a063dd..de7c493bb4107 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -165,3 +165,18 @@ body {
{
color: rgb(134, 142, 150) !important;
}
+
+/* CSS Counters for Onboarding Steps */
+.onboarding-steps {
+ counter-reset: onboarding-step;
+}
+
+.onboarding-step {
+ counter-increment: onboarding-step;
+}
+
+.onboarding-step .step-heading::before,
+.onboarding-step h2::before {
+ content: "Step " counter(onboarding-step) ": ";
+ font-weight: inherit;
+}
diff --git a/docs/platforms/javascript/guides/react/index.mdx b/docs/platforms/javascript/guides/react/index.mdx
index d317748f25310..06b2cc6ef2141 100644
--- a/docs/platforms/javascript/guides/react/index.mdx
+++ b/docs/platforms/javascript/guides/react/index.mdx
@@ -11,7 +11,11 @@ categories:
-## Step 1: Install
+
+
+
+
+## Install
Choose the features you want to configure, and this guide will show you how:
@@ -37,7 +41,11 @@ yarn add @sentry/react
pnpm add @sentry/react
```
-## Step 2: Configure
+
+
+
+
+## Configure
### Initialize the Sentry SDK
@@ -112,8 +120,9 @@ const container = document.getElementById(“app”);
const root = createRoot(container);
root.render();
```
-
-## Step 3: Capture React Errors
+
+
+## Capture React Errors
To make sure Sentry captures all your app's errors, configure error handling based on your React version.
@@ -159,8 +168,10 @@ import * as Sentry from "@sentry/react";
[here](features/error-boundary/#manually-capturing-errors).
-
-## Step 4: Set Up React Router
+
+
+
+## Set Up React Router
If you're using `react-router` in your application, you need to set up the Sentry integration for your specific React Router version to trace `navigation` events.\
Select your React Router version to start instrumenting your routing:
@@ -169,43 +180,34 @@ Select your React Router version to start instrumenting your routing:
- [Older React Router versions](features/react-router)
- [TanStack Router](features/tanstack-router)
-## Step 5: Capture Redux State Data (Optional)
-
-
- ## Step 4: Capture Redux State Data (Optional)
-
+
+## Capture Redux State Data (Optional)
To capture Redux state data, use `Sentry.createReduxEnhancer` when initializing your Redux store.
-
- ## Step 6: Add Readable Stack Traces With Source Maps (Optional)
-
-
- ## Step 5: Add Readable Stack Traces With Source Maps (Optional)
+
+## Add Readable Stack Traces With Source Maps (Optional)
+
-
- ## Step 7: Avoid Ad Blockers With Tunneling (Optional)
-
-
- ## Step 6: Avoid Ad Blockers With Tunneling (Optional)
+
+## Avoid Ad Blockers With Tunneling (Optional)
+
-
- ## Step 8: Verify Your Setup
-
-
- ## Step 7: Verify Your Setup
+
+## Verify Your Setup
+
Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
### Issues
@@ -230,6 +232,8 @@ To verify that Sentry captures errors and creates issues in your Sentry project,
+
+
### Tracing
@@ -254,6 +258,8 @@ Open the page in a browser (for most React applications, this will be at localho
+
+
### View Captured Data in Sentry
Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
@@ -277,3 +283,7 @@ Now's a good time to customize your setup and look into more advanced topics. Ou
- [Get support](https://sentry.zendesk.com/hc/en-us/)
+
+
+
+
diff --git a/docs/platforms/javascript/guides/svelte/index.mdx b/docs/platforms/javascript/guides/svelte/index.mdx
index fdbc91d52e8ae..29a90deefe55a 100644
--- a/docs/platforms/javascript/guides/svelte/index.mdx
+++ b/docs/platforms/javascript/guides/svelte/index.mdx
@@ -9,7 +9,11 @@ categories:
-## Step 1: Install
+
+
+
+
+## Install
Choose the features you want to configure, and this guide will show you how:
@@ -34,8 +38,11 @@ yarn add @sentry/svelte
```bash {tabTitle:pnpm}
pnpm add @sentry/svelte
```
+
+
+
-## Step 2: Configure
+## Configure
To use the SDK, initialize it in your Svelte entry point before bootstrapping your app. In a typical Svelte project, that is your `main.js` or `main.ts` file.
@@ -160,16 +167,25 @@ const app = new App({
export default app;
```
+
+
+
-## Step 3: Add Readable Stack Traces With Source Maps (Optional)
+## Add Readable Stack Traces With Source Maps (Optional)
-## Step 4: Avoid Ad Blockers With Tunneling (Optional)
+
+
+
+## Avoid Ad Blockers With Tunneling (Optional)
-## Step 5: Verify Your Setup
+
+
+
+## Verify Your Setup
Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
@@ -205,6 +221,8 @@ To verify that Sentry captures errors and creates issues in your Sentry project,
+
+
### Tracing
@@ -244,6 +262,7 @@ Open the page in a browser and click the button to trigger a frontend error and
+
### View Captured Data in Sentry
Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
@@ -267,3 +286,7 @@ Now's a good time to customize your setup and look into more advanced topics. Ou
- [Get support](https://sentry.zendesk.com/hc/en-us/)
+
+
+
+
diff --git a/src/components/onboarding/index.tsx b/src/components/onboarding/index.tsx
index b345f136925e6..10274c1a0501c 100644
--- a/src/components/onboarding/index.tsx
+++ b/src/components/onboarding/index.tsx
@@ -142,25 +142,42 @@ const validateOptionIds = (options: Pick[]) => {
export function OnboardingOption({
children,
- optionId,
+ optionId = 'all',
hideForThisOption,
+ isStep = false,
}: {
- children: React.ReactNode;
- optionId: OptionId;
+ children: ReactNode;
+ optionId: OptionId | 'all';
hideForThisOption?: boolean;
+ isStep?: boolean;
}) {
- validateOptionIds([{id: optionId}]);
+ if (optionId !== 'all') {
+ // Allow not passing an optionId when isStep is true
+ validateOptionIds([{id: optionId}]);
+ }
+ const className = [hideForThisOption ? 'hidden' : '', isStep ? 'onboarding-step' : '']
+ .filter(Boolean)
+ .join(' ');
+
return (
{children}
);
}
+/**
+ * Wrapper component that provides CSS counter context for numbered onboarding steps
+ * @param children - OnboardingOption components that should be numbered as steps
+ */
+export function OnboardingSteps({children}: {children: ReactNode}) {
+ return {children}
;
+}
+
/**
* Updates DOM elements' visibility based on selected onboarding options
*/
diff --git a/src/mdxComponents.ts b/src/mdxComponents.ts
index 6023dc61be8f7..9f652ffe2f1c8 100644
--- a/src/mdxComponents.ts
+++ b/src/mdxComponents.ts
@@ -18,7 +18,11 @@ import {GuideGrid} from './components/guideGrid';
import {JsBundleList} from './components/jsBundleList';
import {LambdaLayerDetail} from './components/lambdaLayerDetail';
import {LinkWithPlatformIcon} from './components/linkWithPlatformIcon';
-import {OnboardingOption, OnboardingOptionButtons} from './components/onboarding';
+import {
+ OnboardingOption,
+ OnboardingOptionButtons,
+ OnboardingSteps,
+} from './components/onboarding';
import {OrgAuthTokenNote} from './components/orgAuthTokenNote';
import {PageGrid} from './components/pageGrid';
import {ParamTable} from './components/paramTable';
@@ -84,6 +88,7 @@ export function mdxComponents(
PlatformSdkPackageName,
OnboardingOption,
OnboardingOptionButtons,
+ OnboardingSteps,
RelayMetrics,
SandboxLink,
SignInNote,