Repository navigation
feat(nextjs): Use the Deno fetch integration when Next.js runs on Deno - #26295
Merged
Merged
Conversation
Contributor
size-limit report 📦Compared: 7a6c137 (PR test merge using develop at d56b709) Against: 621a801 (develop) · base run #65856
|
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 4 not successful, 55 successful. See the run.
Successful checks
|
JPeer264
force-pushed
the
jp/nextjs-deno-entry
branch
from
November 11, 2026 15:09
82f1962 to
ef6c02f
Compare
JPeer264
marked this pull request as ready for review
November 11, 2026 15:16
JPeer264
requested review from
chargome and
isaacs
and removed request for
msonnb
November 11, 2026 15:16
andreiborza
approved these changes
Nov 11, 2026
nicohrubec
approved these changes
Nov 12, 2026
isaacs
force-pushed
the
jp/nextjs-deno-entry
branch
from
November 12, 2026 10:25
ef6c02f to
8790176
Compare
isaacs
force-pushed
the
jp/nextjs-deno-entry
branch
from
November 12, 2026 11:19
8790176 to
af49e71
Compare
Adds a `deno` export condition. Its `init` replaces the undici fetch integration with the fetch integration of `@sentry/deno` and reports Deno as the runtime. `@sentry/deno` is an optional peer dependency. Next.js bundles `@sentry/nextjs` without the `deno` condition, so `withSentryConfig` makes it external when the build runs on Deno. Next.js loads the external package with `require`. Deno applies the `deno` condition to `require` only with `--conditions=deno`, and it needs a `default` condition to load the ESM-only `@sentry/deno` from CommonJS. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
JPeer264
force-pushed
the
jp/nextjs-deno-entry
branch
from
November 12, 2026 13:28
af49e71 to
0956fc6
Compare
1 of 6 tasks
51 tasks done
8 of 10 tasks
JPeer264
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Nov 18, 2026
<!-- Keep the urgency section so automation can prioritize this PR. You may delete other sections you don't need. --> ## DESCRIBE YOUR PR follow up to getsentry/sentry-javascript#26294 follow up to getsentry/sentry-javascript#26295 This adds setup pages for Next.js apps that build and run with Bun or Deno. They are below Manual Setup next to Cloudflare, and the Bun and Deno framework selectors link to them. The pages show the `@sentry/bun` and `@sentry/deno` packages that the Next.js SDK needs on these runtimes, and the start commands `bun --bun next start` and `deno run -A --conditions=deno npm:next start`. The parts that the Cloudflare, Bun and Deno pages share move to `includes/nextjs/`. Pages Router and Webpack Setup move below the runtime pages in the sidebar. ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. Select exactly one option. For deadlines, replace `YYYY-MM-DD` with the due date. You can update this information later by editing the PR description. - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] Other deadline: YYYY-MM-DD - [x] No deadline: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've supplied a deadline. Thanks in advance for your help! ## PRE-MERGE CHECKLIST _Make sure you've checked the following before merging your changes:_ - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
closes #24830
closes JS-3835
Description
This adds a
denoexport condition to@sentry/nextjs. On Deno,inituses the fetch integration of@sentry/denoand reports Deno as the runtime. Whennext buildruns on Deno,withSentryConfigmakes@sentry/nextjsexternal. Thenextjs-16 (deno)e2e variant is now required.@sentry/denois an optional peer dependency:Why
Outgoing
fetchcalls had no spans on Deno, unless users added the integration by hand.Deno decisions
Next.js loads the external SDK with
require, and Deno applies thedenocondition torequireonly with--conditions=deno. The alternative is a lazyrequireof@sentry/denoin the Node.js entry.@sentry/denoalso gets adefaultexport condition, so Deno can load it from CommonJS.Known issues
--conditions=deno, the app runs with the Node.js entry and has nofetchspans.