Skip to content

Commit daf7a21

Browse files
authored
Clean up shopify hydrogen remix guide (#13024)
* Clean up shopify hydrogen remix guide * Update docs/platforms/javascript/guides/remix/frameworks/hydrogen.mdx
1 parent d3a6f26 commit daf7a21

File tree

1 file changed

+8
-27
lines changed
  • docs/platforms/javascript/guides/remix/frameworks

1 file changed

+8
-27
lines changed

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

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,23 @@ description: "Learn how to use the Sentry Remix SDK to instrument your Shopify H
55

66
If you're using the Shopify Hydrogen framework, you can use the Sentry Remix SDK to add Sentry instrumentation to your app.
77

8-
## 1. Installing Sentry Remix SDK
8+
## 1. Installing Sentry Remix and Clouflare SDKs
99

10-
First, install the Sentry Remix SDK with your package manager:
10+
First, install the Sentry Remix and Cloudflare SDKs with your package manager:
1111

1212
```bash {tabTitle:npm}
13-
npm install @sentry/remix --save
13+
npm install @sentry/remix @sentry/cloudflare --save
1414
```
1515

1616
```bash {tabTitle:yarn}
17-
yarn add @sentry/remix
17+
yarn add @sentry/remix @sentry/cloudflare
1818
```
1919

2020
```bash {tabTitle:pnpm}
21-
pnpm add @sentry/remix
21+
pnpm add @sentry/remix @sentry/cloudflare
2222
```
2323

24-
## 2. Installing Sentry Cloudflare SDK
25-
26-
After installing the Sentry Remix SDK, delete the newly generated `instrumentation.server.mjs` file and all newly generated code from `entry.server.tsx`. This instrumentation is not needed because you are going to use the Sentry Cloudflare SDK for server-side instrumentation.
27-
28-
Now you can install the Sentry Cloudflare SDK. First, install the SDK with your package manager:
29-
30-
```bash {tabTitle:npm}
31-
npm install @sentry/cloudflare --save
32-
```
33-
34-
```bash {tabTitle:yarn}
35-
yarn add @sentry/cloudflare
36-
```
37-
38-
```bash {tabTitle:pnpm}
39-
pnpm add @sentry/cloudflare
40-
```
41-
42-
## 3. Instrumenting Your Server
24+
## 2. Instrumenting Your Server
4325

4426
Then update your `server.ts` file to use the `wrapRequestHandler` method:
4527

@@ -80,7 +62,7 @@ export default {
8062
};
8163
```
8264

83-
## 4. Instrumenting Your Client
65+
## 3. Instrumenting Your Client
8466

8567
Wrap your Remix root component using `withSentry`:
8668

@@ -95,11 +77,10 @@ function App({ children }) {
9577
export default withSentry(App, useEffect, useLocation, useMatches);
9678
```
9779

98-
9980
Finally, update your `entry.client.tsx` file to initialize Sentry SDK on the client:
10081

10182
```tsx {filename:entry.client.tsx}
102-
import * as Sentry from "@sentry/remix/cloudflare";
83+
import * as Sentry from "@sentry/remix";
10384

10485
Sentry.init({
10586
dsn: "___PUBLIC_DSN___",

0 commit comments

Comments
 (0)