You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/platforms/javascript/guides/nextjs/manual-setup.mdx
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -167,6 +167,8 @@ const moduleExports = {
167
167
// 'Configure Serverside Auto-instrumentation':
168
168
// - autoInstrumentServerFunctions
169
169
// - excludeServerRoutes
170
+
// 'Configure Tunneling to avoid Ad-Blockers':
171
+
// - tunnelRoute
170
172
},
171
173
};
172
174
@@ -391,3 +393,25 @@ const moduleExports = {
391
393
```
392
394
393
395
Excluded routes can be specified either as regexes or strings. When using a string, make sure that it matches the route exactly, and has a leading slash but no trailing one.
396
+
397
+
## Configure Tunneling to avoid Ad-Blockers
398
+
399
+
_(New in version 7.26.0)_
400
+
401
+
You might notice that Sentry events are sometimes blocked by Ad-Blockers.
402
+
Ad-blockers can be circumvented by using **tunneling**.
403
+
404
+
The Sentry Next.js SDK provides an easy way to set up tunneling for your application.
405
+
Use the `tunnelRoute` option in the `sentry` object in your `next.config.js` to provide a route the SDK will use to tunnel events to Sentry:
406
+
407
+
```javascript {filename:next.config.js}
408
+
constmoduleExports= {
409
+
sentry: {
410
+
tunnelRoute:"/monitoring-tunnel",
411
+
},
412
+
};
413
+
```
414
+
415
+
Please note that this option will tunnel Sentry events through your Next.js application so you might experience increased server usage.
416
+
417
+
Learn more about tunneling in the <PlatformLinkto="/troubleshooting/#dealing-with-ad-blockers">troubleshooting section</PlatformLink>.
0 commit comments