Consider dropping Bun 1.3 support in v12
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- bun, node.js, typescript
- 领域
- backend, observability
调研方向
Start with packages/bun/package.json and .github/workflows/build.yml to review the current Bun minimum and CI matrix. Then check the Bun integration test exclusions and vite.config.mts entries named in the issue. Done means the v12 minimum is Bun 1.4, CI no longer tests 1.3.14, and the Bun 1.3-specific exclusions are removed; this is proposed release policy work and may need maintainer agreement.
由索引模型根据 Issue 内容生成。
描述
Bun 1.3.14 is the oldest Bun version that the SDK supports and tests in CI. On Bun 1.3, @sentry/bun does not instrument outgoing node:http requests. They get no sentry-trace or baggage headers and no spans, so traces break across services. Bun 1.4.0 and later work correctly.
We cannot fix this well on Bun 1.3. I suggest we drop Bun 1.3 in v12 and require Bun 1.4 or later.
Cause
- Bun 1.3 does not publish the
http.client.request.createddiagnostics channel. Bun 1.4.0 does. @sentry/nodedecides to use that channel fromprocess.versions.node. Bun 1.3.14 reports Node 24.3.0, so the SDK subscribes to a channel that never fires.- The fallback in
@sentry/core(client-patch.ts) wrapsClientRequest.prototype._storeHeader. Bun 1.3 uses anotherClientRequestimplementation that has no_storeHeader, so the fallback patches nothing.
Why a fix on Bun 1.3 is not practical
We tested these options on Bun 1.3.14:
- Wrap
ClientRequest.prototype.end: each request has its ownwriteandendmethods, so the request never calls the prototype hook. Also, a request with a streamed body sends its headers at the firstwrite(), beforeend(). - Wrap
http.requestandhttp.geton the module object: only code that calls through the default import orrequire('node:http')gets the wrapper. Named imports (import { request }) and namespace imports (import * as http) keep the original functions.http.getalso does not callhttp.requestinternally, so the wrapper must rewrite the request options before the call.
A fix would be a Bun-1.3-only rewrite of the request options. Named and namespace imports would still not work.
What changes if we drop Bun 1.3
- The minimum Bun version becomes 1.4:
engines.buninpackages/bun/package.json(now>=1.3.14) and the docs. - The CI matrix drops
1.3.14injob_bun_unit_testsandjob_bun_integration_tests(.github/workflows/build.yml). dev-packages/bun-integration-testscan remove the Bun < 1.4 excludes (BUN_BUILD_BEFORE_1_4_EXCLUDE,SENTRY_BUN_BEFORE_1_4_EXCLUDE) andBUN_BEFORE_1_4invite.config.mts. Those excludes also cover two other Bun 1.3 problems: CommonJS bundles oflangchainandlanggraphthrowrequire_ai is not a function, and theproxysuite fails in the@sentry/bunalias preload.
Until then
On Bun 1.3, express/with-http/base is excluded in the bun-build project (#26611). Users on Bun 1.3 who need trace propagation for outgoing node:http requests should upgrade to Bun 1.4 or later.
- 主要语言
- TypeScript
- 星标
- 8.8k
- 派生
- 1.9k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 744
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/sentry-javascript 的其他 Issue
-
AWS Lambda Waiting for: Product Owner
难度 1/5 1 小时以内 新手友好度 82/100
getsentry/sentry-javascript#26910 · 1 条评论 ·
维护者通常 1 天内回复
-
Only create Nuxt database and storage spans when there is a parent span可能重新可做 关联的 PR 已关闭且未合并。 未关闭Improvement Nuxt
难度 2/5 1-3 小时 新手友好度 83/100
getsentry/sentry-javascript#25805 · 3 条评论 ·
维护者通常 1 天内回复
-
Only create Cloudflare storage and D1 db spans when there is a parent span可能重新可做 关联的 PR 已关闭且未合并。 未关闭Cloudflare Workers Improvement Spans
难度 2/5 1-3 小时 新手友好度 78/100
getsentry/sentry-javascript#25804 · 1 条评论 ·
维护者通常 1 天内回复
-
Core Feature: Typescript Meta: Breaking
难度 2/5 1-3 小时 新手友好度 65/100
getsentry/sentry-javascript#25286 · 2 条评论 ·
维护者通常 1 天内回复
-
javascript
难度 2/5 1-3 小时 新手友好度 75/100
getsentry/sentry-javascript#24200 · 2 条评论 ·
维护者通常 1 天内回复
查看 getsentry/sentry-javascript 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
garrytan/gbrain#10437 · 1 条评论 ·
维护者通常 1 天内回复
-
Bedrock "Too many tokens" throttle is not auto-retried, unlike "Too many requests"可能已有人在做 @acmerfight 今天认领。 未关闭untriaged
难度 2/5 1-3 小时 新手友好度 78/100
earendil-works/pi#12573 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
agentes-chat/agentes-chat#1506 ·
维护者通常 1 天内回复
-
comp/desktop desktop/files os/windows P2 type/perf
难度 2/5 1-3 小时 新手友好度 80/100
NousResearch/hermes-agent#160359 ·
维护者通常 1 天内回复
-
Missing repro Platform: Android
难度 2/5 1-3 小时 新手友好度 76/100
software-mansion/react-native-reanimated#11554 · 1 条评论 ·
维护者通常 1 天内回复