Skip to content

Commit 29b7c85

Browse files
Add a "good to know" note to JS Basic Options docs (#9445)
Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com>
1 parent 5f6227e commit 29b7c85

File tree

1 file changed

+7
-0
lines changed
  • docs/platforms/javascript/common/configuration

1 file changed

+7
-0
lines changed

docs/platforms/javascript/common/configuration/options.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ initialized.
1313

1414
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.
1515

16+
<Note>
17+
18+
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.
19+
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.
20+
21+
</Note>
22+
1623
<ConfigKey name="dsn">
1724

1825
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.

0 commit comments

Comments
 (0)