Skip to content

Commit 03bfa7e

Browse files
committed
add note on client instrumentation
1 parent a7676be commit 03bfa7e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

docs/platforms/javascript/guides/nextjs/manual-setup.mdx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,13 @@ export default withSentryConfig(nextConfig, {
8787

8888
### Initialize Sentry Client-Side and Server-Side SDKs
8989

90-
Create three files in your application's root directory: `sentry.server.config.(js|ts)`, `sentry.edge.config.(js|ts)`, and `instrumentation-client.(js|ts)`. Add the following initialization code into each respective file:
90+
Create three files in your application's root directory:
91+
- `sentry.server.config.(js|ts)`
92+
- `sentry.edge.config.(js|ts)`
93+
- `instrumentation-client.(js|ts)`
94+
- If you previously had file called `sentry.client.config.(js|ts)`, you can also safely rename this to `instrumentation-client.(js|ts)` for all Next.js versions.
95+
96+
Add the following initialization code into each respective file:
9197

9298
<Alert level="info" title="Note">
9399
These files run in different environments (browser, server, edge) and are
@@ -112,8 +118,8 @@ Sentry.init({
112118
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
113119
tracesSampleRate: 1.0,
114120
// ___PRODUCT_OPTION_END___ performance
115-
// Replay may only be enabled for the client-side
116121
// ___PRODUCT_OPTION_START___ session-replay
122+
// Replay may only be enabled for the client-side
117123
integrations: [Sentry.replayIntegration()],
118124

119125
// Capture Replay for 10% of all sessions,
@@ -188,7 +194,7 @@ Sentry.init({
188194
});
189195
```
190196

191-
<Alert level="success" title="Tip">
197+
<Alert title="Tip">
192198
Include your DSN directly in these files, or use a _public_ environment variable like `NEXT_PUBLIC_SENTRY_DSN`.
193199
</Alert>
194200

0 commit comments

Comments
 (0)