Skip to content

Commit 8f9b036

Browse files
committed
review suggestions
1 parent a861cfe commit 8f9b036

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

docs/platforms/javascript/guides/nuxt/install/cli-import.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@ description: "Learn how to use the node --import CLI flag."
77
## Understanding the `--import` CLI Flag
88

99
The [`--import` CLI flag](https://nodejs.org/api/cli.html#--importmodule) in Node is the default way in ESM to preload a module before the application starts.
10-
Setting this flag is crucial for ensuring proper server-side initialization, as Sentry needs to be initialized before the rest of the application runs.
10+
Setting this flag is crucial for ensuring proper server-side initialization, as Sentry needs to be initialized before
11+
Node.js resolves the entire import graph of your application. This is necessary for enabling proper instrumentation of ESM module
1112

1213
## Scenarios where `--import` does not work
1314

1415
- You're not able to add Node CLI flags or environment variables scoped to the function runtime, meaning these variables are not applied in other scopes, such as build time.
1516
- You don't know the path to the Nuxt server folder in the build output
16-
- **Netlify** only allows scoped environment variables on its paid plans at this time
17-
- **Vercel** doesn't currently provide an option for scoping environment variables
17+
- On **Netlify**, it is as of now not possible to configure `--import` properly.
18+
- On **Vercel**, it is as of now not possible to configure `--import` properly.
1819

1920
If any of those points apply to you, you cannot use the `--import` flag to initialize Sentry on the server-side.
20-
Check out the guide for using <PlatformLink to="/install/top-level-import/">a top-level import</PlatformLink> instead.
21+
Check out the guide for using <PlatformLink to="/install/limited-server-tracing">limited server tracing</PlatformLink> instead.
2122

2223
## Initializing Sentry with `--import`
2324

docs/platforms/javascript/guides/nuxt/install/dynamic-import.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ description: "Learn about how the Nuxt SDK leverages dynamic input() in the buil
77
## Understanding the `import()` expression
88

99
<Alert level='warning'>
10-
This installation method comes with restrictions when using more recent versions of Nuxt/Nitro.
10+
This installation method does not work with more recent versions of Nuxt/Nitro.
1111

12-
We recommend the guide for installing the SDK with the <PlatformLink to="/install/cli-import">CLI flag `--import`</PlatformLink> or a <PlatformLink to="/install/top-level-import/">top-level import</PlatformLink>
12+
We recommend the guide for installing the SDK with the <PlatformLink to="/install/cli-import">CLI flag `--import`</PlatformLink> or <PlatformLink to="/install/limited-server-tracing">limited server tracing</PlatformLink>
1313
</Alert>
1414

1515
The `import()` expression, or dynamic import, enables flexible, conditional module loading in ESM.
@@ -47,8 +47,7 @@ As a temporary workaround, you can add the following overrides in your applicati
4747
}
4848
```
4949

50-
You can also check out the guide for installing the SDK with the <PlatformLink to="/install/cli-import">CLI flag `--import`</PlatformLink> or a <PlatformLink to="/install/top-level-import/">top-level import</PlatformLink>.
51-
50+
You can also check out the guide for installing the SDK with the <PlatformLink to="/install/cli-import">CLI flag `--import`</PlatformLink> or <PlatformLink to="/install/limited-server-tracing">limited-server-tracing</PlatformLink>.
5251

5352
## Initializing Sentry with Dynamic `import()`
5453

docs/platforms/javascript/guides/nuxt/install/limited-server-tracing.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: "Learn about how the Nuxt SDK can be set up with limited server tra
66

77
## Understanding Limited Server Tracing
88

9-
Sentry needs to be initialized before the application starts.
9+
Sentry needs to be initialized before the import graph is resolved by Node.
1010
If the default way of adding an <PlatformLink to="/install/cli-import">`--import` CLI flag</PlatformLink> flag does not work for you,
1111
set up the SDK for adding a top-level `import`.
1212

platform-includes/getting-started-verify/javascript.nuxt.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ export default defineEventHandler(event => {
1414

1515
```
1616

17-
<Alert level="warning">
18-
Sentry server-side monitoring **does not work in development mode!**
19-
20-
If you want to test server-side monitoring locally, build your project and run:
17+
If you want to test server-side monitoring locally, build your project and run:
2118
```
2219
# Start your app after building your project with `nuxi build`
2320
node --import ./.output/server/sentry.server.config.mjs .output/server/index.mjs
2421
```
2522

23+
<Alert level="warning">
24+
Sentry server-side monitoring **does not work in development mode!**
25+
2626
In case you experience any issues with the server-side setup, check out <PlatformLink to="/troubleshooting">Troubleshooting</PlatformLink>
2727
or read through the different <PlatformLink to="/install">installation methods</PlatformLink>.
2828
</Alert>

src/middleware.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ const USER_DOCS_REDIRECTS: Redirect[] = [
7777
from: '/platforms/javascript/performance/instrumentation/custom-instrumentation/caches-module/',
7878
to: '/platforms/javascript/guides/node/performance/instrumentation/custom-instrumentation/caches-module/',
7979
},
80+
{
81+
from: '/platforms/javascript/guides/nuxt/install/top-level-import/',
82+
to: '/platforms/javascript/guides/nuxt/install/limited-server-tracing/',
83+
},
8084
{
8185
from: '/account/early-adopter-features/discord/',
8286
to: '/organization/integrations/notification-incidents/discord/',

0 commit comments

Comments
 (0)