chore(deps): Bump @sentry/nextjs and @sentry/browser to 10.65.0#18723
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit aa3c4c5. Configure here.
sergical
force-pushed
the
sergical/chore/bump-sentry-sdk-10-65
branch
from
July 14, 2026 21:24
aa3c4c5 to
b565161
Compare
Fixes docs traffic classification. The tracesSampler reads samplingContext.normalizedRequest to classify traffic (AI agent / bot / user) and sample accordingly, but @sentry/core did not populate normalizedRequest in the sampling context for root spans until 10.63.0 (getsentry/sentry-javascript#21833). On the previous 10.55.0 that field was always undefined, so all traffic was classified "unknown": agent traces under-sampled, bots not filtered, and docs.trace.sampled unable to segment. No code changes needed — the existing sampler works once the SDK populates the field. Also consolidates the previously split @sentry/core versions onto 10.65. Co-Authored-By: Claude <noreply@anthropic.com>
sergical
force-pushed
the
sergical/chore/bump-sentry-sdk-10-65
branch
from
July 14, 2026 21:36
b565161 to
d5c0f61
Compare
chargome
approved these changes
Jul 15, 2026
6 tasks
sergical
added a commit
that referenced
this pull request
Jul 20, 2026
…ad it (#18771) ## DESCRIBE YOUR PR Production builds of both docs.sentry.io and develop.sentry.dev have emitted **zero server-side Sentry telemetry since Mar 5, 2026** — no middleware spans, no `http.server` spans, no `docs.trace.sampled` metrics, and no AI-agent/bot/user traffic classification. This one-file move fixes it. **Root cause:** Next.js production builds discover `middleware.ts` and `instrumentation.ts` by scanning only `rootDir` — the parent of the `pages/` (or `app/`) directory — with no `src/` fallback (`next/dist/build/index.js`, identical logic in 15.1 and 15.5). For two years the repo had `src/pages`, so `rootDir` was `src/` and both `src/middleware.ts` and `src/instrumentation.ts` were found. When #16687 moved `pages/` to the repo root, `rootDir` flipped to the repo root: middleware broke visibly (redirects died) and was moved to the root in that same PR, but `src/instrumentation.ts` was left behind and silently dropped from the build — `register()` and `Sentry.init` stopped running in the node and edge runtimes entirely. Dev was unaffected because the dev bundler *does* check `src/`, which hid the breakage locally. This also explains why the SDK bump in #18723 changed nothing in production: the sampler it fixed never executes, because the file that installs it is not in the build. - Move `instrumentation.ts` from `src/` to the repo root (next to `middleware.ts`), importing `tracesSampler` via the `sentry-docs` path alias - `instrumentation-client.ts` intentionally stays in `src/` — Next resolves it through a webpack alias that checks `src/` first, which is why browser telemetry never broke **Verified with a local `next build`:** before the move, `.next/server/` contains no instrumentation entries; after it, `instrumentation.js` and `edge-instrumentation.js` are emitted and the edge bundle contains the DSN, `tracesSampler`, and the `docs.trace.sampled` metric emission. **Post-deploy verification** (in `sentry/docs` and `sentry/develop-docs`): - `spans · span.op:http.server.middleware · group by sdk.version, release` → should show the current release on SDK 10.65 - `metrics · docs.trace.sampled · group by traffic_type` → should split into `ai_agent` / `bot` / `user` instead of being absent ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: 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 added an urgent due date to it. 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) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <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.

DESCRIBE YOUR PR
Bumps
@sentry/nextjsand@sentry/browserto10.65.0(within the existing^10range) to fix docs traffic classification, which was silently broken.src/tracesSampler.tsreadssamplingContext.normalizedRequestto classify traffic as AI agent / bot / user and sample accordingly (agents 100%, bots 0%, users 30%), emitting thedocs.trace.sampledmetric. But@sentry/coredid not populatenormalizedRequestin the sampling context for root spans until 10.63.0 (getsentry/sentry-javascript#21833). On the resolved10.55.0that field was alwaysundefined, so all traffic was classifiedunknown: agent traces were under-sampled, bot noise wasn't filtered, and the metric couldn't segment traffic.No code changes — the existing sampler works as designed once the SDK populates the field. Verified on a preview deploy that
10.65.0populates the sampler'snormalizedRequest(with the user-agent) on the real Vercel runtime; the metric will show the correctai_agent/bot/userbreakdown in production once deployed.@sentry/nextjs+@sentry/browserto^10.65.0@sentry/coreversions onto10.65.0IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes: