Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Next.js v11 build-time instrumentation: Turbopack build timeout and opt-out trace coverage

未关闭
#24,764 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
活跃
技术栈
javascript, nextjs

调研方向

Start with maybeAddOrchestrionRule in constructTurbopackConfig and compare the default node rule with the reported node_modules path-filtering experiment. Reproduce clean Turbopack production builds with buildTimeInstrumentation enabled and disabled, then inspect generated output for the named AI SDK, OpenAI, Anthropic, and database integrations. Done means a documented minimal reproduction or profiling result plus an explicit account of trace coverage and supported configuration.

由索引模型根据 Issue 内容生成。

描述

Bug Next.js Waiting for: Product Owner
Environment
  • @sentry/nextjs 11.0.0
  • Next.js 16.3.6, Turbopack production build
  • pnpm workspace monorepo
  • Vercel build machine: 4 cores, 8 GB
Observed regression

Our first production Git deployment upgrading from Sentry 10 to 11 stopped at Creating an optimized production build and was terminated with BUILD_EXCEEDED_MAXIMUM_TIME (45 minutes). The preceding build, also without cache, compiled in 2.2 minutes. There is no explicit Vercel OOM error.

Isolation and mitigation

A clean local build with 4-CPU affinity, an 8-GB memory cgroup, no swap, and production environment completed with only buildTimeInstrumentation: false changed (98-second compilation).

We inspected maybeAddOrchestrionRule in constructTurbopackConfig: the *.{js,mjs,cjs} rule has condition node. An experimental local patch added a node_modules path condition derived from getSentryInstrumentations() module names. A subsequent clean source build on Vercel compiled in 107 seconds and completed in 4m15s; AI SDK/OpenAI/Anthropic registration calls were present in generated output. This suggests the broad loader rule may contribute, but we have not profiled the precise bottleneck or produced a public minimal reproduction.

We are removing that custom patch and using the supported buildTimeInstrumentation: false option while investigating.

Questions
  1. Is excessive Turbopack loader work with the default Orchestrion rule a known v11 issue? Is package-level filtering supported or planned?
  2. Which automatic server traces are lost with buildTimeInstrumentation: false on Vercel, particularly bundled AI SDK 7, OpenAI and Anthropic SDKs, and database clients? Which still work through runtime channels or Next.js instrumentation?
  3. Is there a supported selective option to preserve these integrations without passing every server JavaScript module through the loader?
  4. What profiling output or minimal reproduction would be most useful?

Error reporting, source map upload and explicit application spans remain configured. We are not claiming this mitigation preserves all automatic trace coverage.

主要语言
TypeScript
星标
8.7k
派生
1.9k
平均合并
1 天 15 小时
30 天内合并 PR
495

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

getsentry/sentry-javascript 的其他 Issue

查看 getsentry/sentry-javascript 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。