Skip to content

fix(telemetry): upgrade Sentry SDK to 10.39.0 and remove custom patches#249

Merged
BYK merged 1 commit intomainfrom
byk/upgrade-sentry-sdk
Feb 16, 2026
Merged

fix(telemetry): upgrade Sentry SDK to 10.39.0 and remove custom patches#249
BYK merged 1 commit intomainfrom
byk/upgrade-sentry-sdk

Conversation

@BYK
Copy link
Member

@BYK BYK commented Feb 16, 2026

Summary

Upgrade @sentry/bun and @sentry/node from 10.38.0 → 10.39.0 and remove all custom patches/workarounds that are now fixed upstream.

Changes

  • Removed patches/@sentry%2Fcore@10.38.0.patch (92 lines) — Added .unref() to timers in setupWeightBasedFlushing, _isClientDoneProcessing, and makePromiseBuffer to prevent the CLI from hanging on exit. Fixed upstream by #19062 and #19174.
  • Removed runtime context workaround in src/lib/telemetry.ts (14 lines) — Manually overrode options.runtime after Sentry.init() to report Bun instead of Node.js. Fixed upstream — NodeClient now uses options.runtime || { name: 'node', ... } and @sentry/bun passes { name: 'bun', version: Bun.version }. Tracked as #19269.
  • Updated package.json — Bumped both SDK packages to 10.39.0 and removed @sentry/core from patchedDependencies.

Verification

  • Verified all three upstream fixes by reading the 10.39.0 source code and linked PRs
  • bun install, typecheck, lint, and tests all pass cleanly
  • No new test failures introduced (pre-existing ~95 failures on main are unrelated)

Upstream 10.39.0 fixes all issues we had manually patched:

- Timer .unref() calls that prevented CLI from exiting (#19062, #19174)
- Bun runtime context override in NodeClient (#19269)

Remove the @sentry/core@10.38.0 patch file and the runtime context
workaround in telemetry.ts since they are no longer needed.
@github-actions
Copy link
Contributor

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Build

  • Add hole-punch tool to reduce compressed binary size by BYK in #245
  • Add gzip-compressed binary downloads by BYK in #244

Bug Fixes 🐛

  • (polyfill) Add exited promise and stdin to Bun.spawn Node.js polyfill by BYK in #248
  • (telemetry) Upgrade Sentry SDK to 10.39.0 and remove custom patches by BYK in #249
  • (upgrade) Remove v prefix from release URLs and work around Bun.write streaming bug by BYK in #243

Internal Changes 🔧

  • (build) Replace local hole-punch script with binpunch package by BYK in #246
  • Use @sentry/api client for requests by MathurAditya724 in #226

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

Codecov Results 📊

✅ Patch coverage is 100.00%. Project has 4126 uncovered lines.
❌ Project coverage is 68.17%. Comparing base (base) to head (head).

Files with missing lines (71)
File Patch % Lines
human.ts 58.29% ⚠️ 395 Missing
resolve-target.ts 20.26% ⚠️ 366 Missing
list.ts 14.39% ⚠️ 345 Missing
api-client.ts 59.38% ⚠️ 262 Missing
list.ts 23.47% ⚠️ 212 Missing
oauth.ts 30.68% ⚠️ 183 Missing
list.ts 21.96% ⚠️ 167 Missing
plan.ts 19.37% ⚠️ 154 Missing
resolver.ts 3.23% ⚠️ 120 Missing
help.ts 19.85% ⚠️ 109 Missing
upgrade.ts 61.37% ⚠️ 107 Missing
view.ts 36.48% ⚠️ 101 Missing
interactive-login.ts 9.17% ⚠️ 99 Missing
errors.ts 5.94% ⚠️ 95 Missing
view.ts 25.81% ⚠️ 92 Missing
view.ts 39.44% ⚠️ 86 Missing
clipboard.ts 4.49% ⚠️ 85 Missing
status.ts 24.07% ⚠️ 82 Missing
migration.ts 47.44% ⚠️ 82 Missing
list.ts 27.18% ⚠️ 75 Missing
browser.ts 4.11% ⚠️ 70 Missing
login.ts 33.33% ⚠️ 64 Missing
span-tree.ts 5.00% ⚠️ 57 Missing
explain.ts 33.33% ⚠️ 56 Missing
api.ts 89.80% ⚠️ 47 Missing
upgrade.ts 66.91% ⚠️ 46 Missing
telemetry.ts 84.35% ⚠️ 46 Missing
seer.ts 75.54% ⚠️ 45 Missing
schema.ts 89.56% ⚠️ 40 Missing
refresh.ts 40.63% ⚠️ 38 Missing
seer.ts 79.87% ⚠️ 30 Missing
preload.ts 53.23% ⚠️ 29 Missing
view.ts 87.27% ⚠️ 28 Missing
utils.ts 88.94% ⚠️ 25 Missing
view.ts 61.54% ⚠️ 25 Missing
detector.ts 90.10% ⚠️ 20 Missing
binary.ts 88.67% ⚠️ 17 Missing
list.ts 91.16% ⚠️ 16 Missing
list.ts 90.70% ⚠️ 16 Missing
code-scanner.ts 95.00% ⚠️ 16 Missing
help.ts 57.14% ⚠️ 15 Missing
sentry-client.ts 92.22% ⚠️ 13 Missing
arg-parsing.ts 90.00% ⚠️ 12 Missing
dsn-cache.ts 94.62% ⚠️ 12 Missing
logout.ts 56.00% ⚠️ 11 Missing
token.ts 52.17% ⚠️ 11 Missing
fix.ts 83.61% ⚠️ 10 Missing
qrcode.ts 33.33% ⚠️ 10 Missing
fs-utils.ts 57.14% ⚠️ 9 Missing
view.ts 94.70% ⚠️ 7 Missing
project-root.ts 97.73% ⚠️ 7 Missing
version-check.ts 91.76% ⚠️ 7 Missing
feedback.ts 84.21% ⚠️ 6 Missing
auth.ts 95.52% ⚠️ 6 Missing
shell.ts 96.23% ⚠️ 6 Missing
app.ts 93.90% ⚠️ 5 Missing
region.ts 86.49% ⚠️ 5 Missing
setup.ts 97.84% ⚠️ 4 Missing
list.ts 97.33% ⚠️ 4 Missing
index.ts 95.96% ⚠️ 4 Missing
project-aliases.ts 97.40% ⚠️ 2 Missing
project-root-cache.ts 96.92% ⚠️ 2 Missing
output.ts 89.47% ⚠️ 2 Missing
alias.ts 99.42% ⚠️ 1 Missing
completions.ts 99.37% ⚠️ 1 Missing
env-file.ts 99.19% ⚠️ 1 Missing
parser.ts 98.63% ⚠️ 1 Missing
colors.ts 98.21% ⚠️ 1 Missing
trace.ts 99.16% ⚠️ 1 Missing
helpers.ts 97.62% ⚠️ 1 Missing
helpers.ts 94.74% ⚠️ 1 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    68.18%    68.17%    -0.01%
==========================================
  Files          108       108         —
  Lines        12968     12961        -7
  Branches         0         0         —
==========================================
+ Hits          8842      8835        -7
- Misses        4126      4126         —
- Partials         0         0         —

Generated by Codecov Action

@BYK BYK marked this pull request as ready for review February 16, 2026 20:52
@BYK BYK merged commit 604b4e6 into main Feb 16, 2026
23 checks passed
@BYK BYK deleted the byk/upgrade-sentry-sdk branch February 16, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant