Skip to content

Commit 7881580

Browse files
docs(js): Use split layout in Remix quick start guide (#17286)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR This branch updates the following quick start guides to use the new split layout: - Remix wizard - Remix manual setup - Remix on Cloudflare I also created new include files for the split layout, which I'll clean up once all guides are updated :) Closes: #17263 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
1 parent 9a2eeae commit 7881580

File tree

7 files changed

+281
-54
lines changed

7 files changed

+281
-54
lines changed

docs/platforms/javascript/guides/cloudflare/frameworks/remix.mdx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ description: "Learn how to instrument your Remix app on Cloudflare Workers and P
88
platform="javascript.remix"
99
/>
1010

11-
## Step 1: Install
11+
<StepConnector selector="h2" showNumbers={true}>
12+
13+
## Install
1214

1315
Choose the features you want to configure, and this guide will show you how:
1416

@@ -26,8 +28,15 @@ Choose the features you want to configure, and this guide will show you how:
2628

2729
### Install the Sentry SDK
2830

31+
<SplitLayout>
32+
<SplitSection>
33+
<SplitSectionText>
34+
2935
Run the command for your preferred package manager to add the Sentry SDK to your application:
3036

37+
</SplitSectionText>
38+
<SplitSectionCode>
39+
3140
```bash {tabTitle:npm}
3241
npm install @sentry/remix --save
3342
```
@@ -40,7 +49,13 @@ yarn add @sentry/remix
4049
pnpm add @sentry/remix
4150
```
4251

52+
</SplitSectionCode>
53+
</SplitSection>
54+
</SplitLayout>
55+
4356
<PlatformContent
4457
includePath="getting-started-complete"
4558
platform="javascript.remix"
4659
/>
60+
61+
</StepConnector>

docs/platforms/javascript/guides/remix/index.mdx

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,28 @@ categories:
1111

1212
<PlatformContent includePath="getting-started-prerequisites" />
1313

14-
## Step 1: Install
14+
<StepConnector selector="h2" showNumbers={true}>
15+
16+
## Install
17+
18+
<SplitLayout>
19+
<SplitSection>
20+
<SplitSectionText>
1521

1622
To install Sentry using the installation wizard, run the following command within your project:
1723

24+
The wizard then guides you through the setup process, asking you to enable additional (optional) Sentry features for your application beyond error monitoring.
25+
26+
</SplitSectionText>
27+
<SplitSectionCode>
28+
1829
```bash
1930
npx @sentry/wizard@latest -i remix
2031
```
2132

22-
The wizard then guides you through the setup process, asking you to enable additional (optional) Sentry features for your application beyond error monitoring.
33+
</SplitSectionCode>
34+
</SplitSection>
35+
</SplitLayout>
2336

2437
<Include name="quick-start-features-expandable" />
2538

@@ -36,10 +49,17 @@ This guide assumes that you enable all features and allow the wizard to create a
3649

3750
</Expandable>
3851

39-
## Step 2: Server-Side Performance Monitoring
52+
## Configure Server-Side Performance Monitoring
53+
54+
<SplitLayout>
55+
<SplitSection>
56+
<SplitSectionText>
4057

4158
To capture performance data on the server side, wrap your Remix root component (`root.tsx`) with `withSentry`:
4259

60+
</SplitSectionText>
61+
<SplitSectionCode>
62+
4363
```tsx {filename: root.tsx}
4464
import {
4565
Links,
@@ -72,11 +92,15 @@ function App() {
7292
export default withSentry(App);
7393
```
7494

75-
## Step 3: Avoid Ad Blockers With Tunneling (Optional)
95+
</SplitSectionCode>
96+
</SplitSection>
97+
</SplitLayout>
7698

77-
<PlatformContent includePath="getting-started-tunneling" />
99+
## Avoid Ad Blockers With Tunneling (Optional)
78100

79-
## Step 4: Verify Your Setup
101+
<PlatformContent includePath="getting-started-tunneling-splitlayout" />
102+
103+
## Verify Your Setup
80104

81105
If you haven't tested your Sentry configuration yet, let's do it now. You can confirm that Sentry is working properly and sending data to your Sentry project by using the example page created by the installation wizard:
82106

@@ -115,3 +139,5 @@ Now's a good time to customize your setup and look into more advanced topics. Ou
115139
- [Get support](https://sentry.zendesk.com/hc/en-us/)
116140

117141
</Expandable>
142+
143+
</StepConnector>

docs/platforms/javascript/guides/remix/manual-setup.mdx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ description: "Learn how to manually set up Sentry in your Remix app and capture
1414
platform="javascript.remix"
1515
/>
1616

17-
## Step 1: Install
17+
<StepConnector selector="h2" showNumbers={true}>
18+
19+
## Install
1820

1921
Choose the features you want to configure, and this guide will show you how:
2022

@@ -33,8 +35,15 @@ Choose the features you want to configure, and this guide will show you how:
3335

3436
### Install the Sentry SDK
3537

38+
<SplitLayout>
39+
<SplitSection>
40+
<SplitSectionText>
41+
3642
Run the command for your preferred package manager to add the Sentry SDK to your application:
3743

44+
</SplitSectionText>
45+
<SplitSectionCode>
46+
3847
<OnboardingOption optionId="profiling" hideForThisOption>
3948

4049
```bash {tabTitle:npm}
@@ -66,4 +75,10 @@ pnpm add @sentry/remix @sentry/profiling-node
6675

6776
</OnboardingOption>
6877

78+
</SplitSectionCode>
79+
</SplitSection>
80+
</SplitLayout>
81+
6982
<PlatformContent includePath="getting-started-complete" />
83+
84+
</StepConnector>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<Expandable title="Using environment variables in Vite configs">
2+
3+
<SplitLayout>
4+
<SplitSection>
5+
<SplitSectionText>
6+
7+
Vite doesn't automatically load `.env` files into `process.env` when evaluating the config file. If you store your auth token in a `.env` file and want to access it via `process.env.SENTRY_AUTH_TOKEN`, use Vite's [`loadEnv`](https://vite.dev/guide/api-javascript#loadenv) helper.
8+
9+
Alternatively, use a `.env.sentry-build-plugin` file, which the Sentry plugin reads automatically.
10+
11+
</SplitSectionText>
12+
<SplitSectionCode>
13+
14+
```javascript {filename:vite.config.js}
15+
import { defineConfig, loadEnv } from "vite";
16+
17+
export default defineConfig(({ mode }) => {
18+
const env = loadEnv(mode, process.cwd(), "");
19+
20+
return {
21+
plugins: [
22+
sentryVitePlugin({
23+
authToken: env.SENTRY_AUTH_TOKEN,
24+
// ...
25+
}),
26+
],
27+
};
28+
});
29+
```
30+
31+
</SplitSectionCode>
32+
</SplitSection>
33+
</SplitLayout>
34+
35+
</Expandable>

0 commit comments

Comments
 (0)