---
title: "Digging better tunnels: keeping Sentry events from getting lost to ad blockers"
description: "Sentry's JavaScript SDKs (v11.13+) now route browser events around ad blockers through a same-origin tunnel enabled with `tunnel: true` in the browser and `serveTunnelIntegration` on the server."
url: "https://swe.quest/articles/digging-better-tunnels-keeping-sentry-events-from-getting-lost-to-ad-blockers-febbeb118acdaf69"
canonical: "https://blog.sentry.io/sentry-tunnel-ad-blockers/"
source: "Sentry"
published: "2026-12-01"
difficulty: "medium"
kind: "Case study"
reading_minutes: 11
tags: ["javascript","observability","networking","developer-tools"]
---

# Digging better tunnels: keeping Sentry events from getting lost to ad blockers

A post on [Sentry](https://swe.quest/sources/sentry.md), published 2026-12-01, 11 min read, Case study. Original: [https://blog.sentry.io/sentry-tunnel-ad-blockers/](https://blog.sentry.io/sentry-tunnel-ad-blockers/)

## Summary

Sentry's JavaScript SDKs (v11.13+) now route browser events around ad blockers through a same-origin tunnel enabled with \`tunnel: true\` in the browser and \`serveTunnelIntegration\` on the server. The tunnel path is a 32-bit FNV-1a hash of the DSN, which keeps browser and server in sync without shared build steps and avoids the drift that per-build random paths caused. Requests are intercepted at the runtime entry point (node:http, Bun/Deno serve, Workers, Lambda) so auth and CSRF middleware can't reject them first, with a generated route file as a Vercel/Next.js workaround. The handler acts as an allowlist, not an open proxy: it forwards only allowed DSNs, reads just the envelope's first line before deciding, forwards visitor IP and user agent but drops cookies, and handles HTTP/2 pseudo-header and Host-parsing crashes.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [Networking](https://swe.quest/tags/networking.md) (Infrastructure)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)

## Prerequisites

- HTTP request handling
- Node.js middleware ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- JavaScript bundlers ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))

## Keywords

Sentry, Next.js, Vercel, FNV-1a, TanStack Start, Cloudflare Workers, Bun, Relay

## Related posts

- [Sentry JavaScript SDK v11 adds tracing for all JS platforms](https://swe.quest/articles/sentry-javascript-sdk-v11-adds-tracing-for-all-js-platforms-2ee0190e0544fb8c.md): Sentry · 2026-10-09 · Medium · 12 min read · Observability, JavaScript, Build systems, Runtimes & VMs
  Sentry's JavaScript SDK v11 replaces OpenTelemetry export-patching instrumentations (require-in-the-middle, import-in-the-middle, shimmer) with a source-code transformer that injects node:diagnostics\_channel tracingChannel calls into library functions, plus integrations that subscribe to those channels and emit Sentry spans.
- [March 2 incident update](https://swe.quest/articles/march-2-incident-update-65a8001bd7d767d2.md): Deno · 2021-03-04 · Medium · 4 min read · Incidents & postmortems, CDN & edge, Serverless, JavaScript
  A 98-minute outage of deno.land media, deno.land/x and deno.land/std module serving, doc.deno.land and cdn.deno.land was caused by a faulty Cloudflare abuse-prevention filter.
- [Bun v1.4.1](https://swe.quest/articles/bun-v1-4-1-d28e00ae252842cf.md): Bun · 2026-09-04 · Medium · 38 min read · JavaScript, Runtimes & VMs, Performance engineering, Build systems, Networking
  Bun v1.4.1 fixes 202 issues and ships runtime, install and bundler improvements.
- [How to use Google Analytics in Deno Deploy](https://swe.quest/articles/how-to-use-google-analytics-in-deno-deploy-7d1a9e6159a166b9.md): Deno · 2022-03-08 · Medium · 2 min read · Serverless, TypeScript, Observability
  Server-side Google Analytics on Deno Deploy sidesteps ad blockers, which Deno says over 70% of its audience uses, and gives more reliable tracking than the client-side snippet.
- [Bun v1.3.4](https://swe.quest/articles/bun-v1-3-4-fdb372d4f6ff0ddc.md): Bun · 2025-12-06 · Medium · 7 min read · JavaScript, Runtimes & VMs, Testing
  Bun 1.3.4 adds the URLPattern Web API (passing 408 Web Platform Tests), Jest-style fake timers in bun:test, custom proxy headers in fetch() and a %j console format specifier.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
