Repository navigation
feat(v10/nextjs): Add a tunnel route handler that sends only the event payload to Sentry - #25559
Merged
Merged
Conversation
…t payload to Sentry Backport of: #25456
s1gr1d
marked this pull request as ready for review
October 20, 2026 13:51
s1gr1d
requested review from
chargome,
logaretm and
nicohrubec
and removed request for
a team
October 20, 2026 13:51
s1gr1d
added this pull request to stack #25563
October 20, 2026 13:51
nicohrubec
approved these changes
Oct 20, 2026
Open
1 of 6 tasks
Contributor
size-limit report 📦
|
logaretm
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of: #25456
Differences to the original PR
src/server/index.ts,src/edge/index.ts: addsgetTunnelRouteIgnoreSpans()to the localnextjsIgnoreSpansarrays, because v10 has noNEXTJS_SERVER_IGNORE_SPANS.src/config/withSentryConfig/getFinalConfigObjectUtils.ts: logs withconsole.log/console.warnand skips the output withsilent, because v10 has nogetBuildLogger(fix(nextjs): Applysilentto the SDK's own build logs #23621).src/common/utils/dropMiddlewareTunnelRequests.ts,src/common/utils/tunnelPathnameMatch.ts: keeps the v10 code (isSentryRequestSpan,isSentryTunnelRequest) and adds only the new functions. The middleware skip of v10 does not change: in handler mode the client posts to the bare path, so the skip does not apply and the user's middleware runs, as on v11.src/common/wrapMiddlewareWithSentry.ts(v10 only): on Next.js 13, the wrapper starts the middleware span itself, and the span has no request target, so the newignoreSpansentries cannot match it. In handler mode, the wrapper now setssentry.drop_transactionon this span for tunnel requests. The middleware still runs.src/config/types.ts: the middleware paragraph starts with "With this handler", because in rewrite mode v10 still skips the middleware for tunnel requests.nextjs-16-tunnel: the handler test without server spans checks transactions, because v10 uses the static lifecycle by default.@sentry/conventionsis0.16.0, the version of v10. Playwright and@sentry-internal/test-utilskeep the v10 versions.CHANGELOG.md: the entry is under "Unreleased", with one more sentence about middleware.