-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
docs(nuxt): Remove beta, add dev mode command, add cloudflare link #14651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,6 @@ categories: | |
- server | ||
--- | ||
|
||
<Alert level="warning"> | ||
This SDK is currently in **beta**. Beta features are still in progress and may | ||
have bugs. Please reach out on | ||
[GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose) if | ||
you have any feedback or concerns. | ||
</Alert> | ||
|
||
<PlatformContent includePath="getting-started-prerequisites" /> | ||
|
||
## Step 1: Install | ||
|
@@ -58,14 +51,29 @@ To test the server side as well, refer to the "Verify" section in the [Manual se | |
|
||
</Expandable> | ||
|
||
To test Sentry on the server side, you first need to build your project since Sentry's server-side monitoring **doesn't work in development mode**.\ | ||
Then run your project and make sure to load Sentry on the server side by explicitly adding it via [`--import`](/platforms/javascript/guides/nuxt/install/cli-import/): | ||
To test Sentry on the server side, you can run your Nuxt application in either production or development mode. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We also have this information in manual-setup.mdx. It's only showing when you enable the Tracing onboarding option. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the manual-setup file, you can replace:
with the content you created here (including the new subsections) if this makes sense to you. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed it a bit - it's okay that this is only included with error monitoring. |
||
We recommend testing in production mode as it most closely resembles your deployed application's environment. | ||
|
||
### Run in Production Mode (recommended) | ||
s1gr1d marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
After building with `nuxi build`, run your project and make sure to load Sentry on the server side by explicitly adding it via `--import` (read more about this flag in [Installation Methods](/platforms/javascript/guides/nuxt/install)) | ||
s1gr1d marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
``` | ||
# Start your app after building your project with `nuxi build` | ||
node --import ./.output/server/sentry.server.config.mjs .output/server/index.mjs | ||
``` | ||
|
||
### Run in Development Mode | ||
|
||
The server config file is generated in the `.nuxt` directory the first time you run `nuxt dev`. If you delete your `.nuxt` directory, you'll need to run `nuxt dev` once without the `NODE_OPTIONS` variable to regenerate it. | ||
|
||
If you only want to use Sentry on the client-side or only need basic error monitoring on the server side, you can omit the --import flag when running your application. | ||
s1gr1d marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
``` | ||
# Run the dev server with the --import flag after running `nuxt dev` once (without the flag) | ||
NODE_OPTIONS='--import ./.nuxt/dev/sentry.server.config.mjs' nuxt dev | ||
``` | ||
|
||
After building and running your project: | ||
|
||
1. Open the example page `/sentry-example-page` in your browser. For most Nuxt applications, this will be at localhost. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,11 @@ Check out the guide for using <PlatformLink to="/install/limited-server-tracing" | |
|
||
## Initializing Sentry with `--import` | ||
|
||
By default, the SDK will add the Sentry server config to the build output (typically, `.output/server/sentry.server.config.mjs`). | ||
By default, the SDK will add the Sentry server config to the build output (typically, `.output/server/sentry.server.config.mjs` or ` ./.nuxt/dev/sentry.server.config.mjs` during development). | ||
|
||
<Alert> | ||
To find the exact path to the built Sentry server config file, enable `debug` mode in your Sentry configuration within `nuxt.config.ts`. Sentry will then print the exact path during the build process. | ||
</Alert> | ||
Comment on lines
+27
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it make sense to include this Alert in the "Verify your setup" section? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you think this is vital information for the quick start guide then go for it! But I think we need more context, so maybe include parts of the previous sentence in the alert. Something like:
|
||
|
||
### 1. Adding `--import` to `node` command | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Alert box is also in the manual-setup file