Skip to content

feat(core): Add managed tunnel helpers that derive the tunnel path from the DSN - #25199

Draft
logaretm wants to merge 1 commit into
developfrom
awad/tunnel-core-dsn-path
Draft

logaretm wants to merge 1 commit into
developfrom
awad/tunnel-core-dsn-path

Conversation

@logaretm

@logaretm logaretm commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Each framework tunnel picked its own path at build time and needed a build step to share it with the client. This added complexity around how to pass that around, which is most determined by the framework, platform and runtime.

I'm pursuing an idea here to use a deterministic URL based on the DSN which would be present in both client/server setups where each can derive it separately, from within the runtime rather than the build-time.

It seems possible in all SSR frameworks except Next.js so I will see how far this goes.

@logaretm
logaretm added this pull request to stack #25201 October 8, 2026 15:45
…om the DSN

Browser and server SDKs can now derive the same opaque tunnel path from the DSN
with `getTunnelPath`, so they agree on it without a build step.
`isTunnelRequest` and `handleTunnelRequestIfMatched` let a server wrapper serve
the tunnel when its client has `_managedTunnel` set, which
`resolveServerTunnelOption` derives from the `tunnel` option. `allowedDsns`
defaults to the client's DSN and the forward to Sentry runs with tracing
suppressed.
@logaretm
logaretm force-pushed the awad/tunnel-core-dsn-path branch from af27973 to a2af1e1 Compare October 8, 2026 16:05
@logaretm logaretm changed the title feat(core): Derive the tunnel path from the DSN and match tunnel requests feat(core): Add managed tunnel helpers that derive the tunnel path from the DSN Oct 8, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant