Sentry JavaScript SDK 11.13 adds managed tunnels for ad-blocked events
Brief
Sentry’s managed tunnel routes browser events through your app’s server, helping keep errors and traces from being lost to ad blockers.
Enable the managed tunnel
- Upgrade Sentry JavaScript SDKs to 11.13.0 or later; set
tunnel: truein the browser’sSentry.init. - Add
Sentry.serveTunnelIntegration()to the server’sSentry.init. If the browser uses a different DSN, list it inallowedDsns. - Remove
tunnelRouteif you used it with Next.js or TanStack Start.
How it works
- The browser and server derive a stable tunnel path from the DSN, avoiding per-build path mismatches.
- The server forwards only events for allowed DSNs and leaves visitor cookies behind. The feature works across supported JavaScript runtimes.
Generated by AI from the original article. Check the source for full details.