Skip to content

Commit

Permalink
Add a "good to know" note to JS Basic Options docs (#9445)
Browse files Browse the repository at this point in the history
Co-authored-by: vivianyentran <[email protected]>
  • Loading branch information
jeffinnes and vivianyentran authored Mar 15, 2024
1 parent 5f6227e commit 29b7c85
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/platforms/javascript/common/configuration/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ initialized.

The list of common options across SDKs. These work more or less the same in all SDKs, but some subtle differences will exist to better support the platform. Options that can be read from an environment variable (`SENTRY_DSN`, `SENTRY_ENVIRONMENT`, `SENTRY_RELEASE`) are read automatically.

<Note>

If you are using a framework or runtime that requires a prefix to expose environment variables to the client, you must set these options in the `init()` function. These options will not be read into the client side automatically.
This applies to `NEXT_PUBLIC_` in [Next.js](https://nextjs.org/docs/app/building-your-application/configuring/environment-variables) and `VITE_` in [Vite](https://vitejs.dev/guide/env-and-mode.html#env-files), among others.

</Note>

<ConfigKey name="dsn">

The _DSN_ tells the SDK where to send the events. If this value is not provided, the SDK will try to read it from the `SENTRY_DSN` environment variable. If that variable also does not exist, the SDK will just not send any events.
Expand Down

0 comments on commit 29b7c85

Please sign in to comment.