Skip to content

Commit a4a0f0e

Browse files
fix: upgrade @sentry/* to ^10.70.0 to fix span retention memory leaks (#1572)
* fix: upgrade @sentry/* to ^10.70.0 to fix span retention memory leaks The web process leaks ~570 MiB/h of old-space heap. In-prod sampling heap profiles show the retained memory is request-scoped tracing machinery — spans, OTel contexts, and the request/response objects they reference — with no app code among the top allocators. Upstream shipped fixes matching that signature exactly, all after our pinned 10.40.0: - 10.56.0: WeakRef for Span<->Scope circular references, and the sent-span cache moved to an LRUMap capped at 10k entries (#21242, closes #18339 "memory leak with high tracesSampleRate") - 10.49.0: WeakRef for OTel context stored on scope (#20328) - 10.43.0: vercel-ai tool-call span map leak (#19328) — the VercelAI integration is active in this process The running build demonstrably predates the fix: the live exporter's _sentSpans map measured 29,333 entries, three times the post-fix cap. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: add changelog entry for Sentry upgrade Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 84a75e4 commit a4a0f0e

4 files changed

Lines changed: 424 additions & 768 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Fixed
1515
- Fixed the web process being capped at a ~4GiB heap regardless of how much memory the container has, which caused multi-second garbage collection pauses on larger deployments. [#1569](https://github.com/sourcebot-dev/sourcebot/pull/1569)
16+
- Upgraded `@sentry/*` to `^10.70.0`, fixing memory leaks where spans retained request data indefinitely. [#1572](https://github.com/sourcebot-dev/sourcebot/pull/1572)
1617

1718
## [5.1.6] - 2026-08-10
1819

packages/backend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"@octokit/app": "^16.1.1",
2828
"@octokit/rest": "^21.0.2",
2929
"@sentry/cli": "^2.42.2",
30-
"@sentry/node": "^10.40.0",
31-
"@sentry/profiling-node": "^10.40.0",
30+
"@sentry/node": "^10.70.0",
31+
"@sentry/profiling-node": "^10.70.0",
3232
"@sourcebot/db": "workspace:*",
3333
"@sourcebot/schemas": "workspace:*",
3434
"@sourcebot/shared": "workspace:*",

packages/web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@
102102
"@replit/codemirror-lang-solidity": "^6.0.2",
103103
"@replit/codemirror-lang-svelte": "^6.0.0",
104104
"@replit/codemirror-vim": "^6.2.1",
105-
"@sentry/nextjs": "^10.40.0",
106-
"@sentry/profiling-node": "^10.40.0",
105+
"@sentry/nextjs": "^10.70.0",
106+
"@sentry/profiling-node": "^10.70.0",
107107
"@shopify/lang-jsonc": "^1.0.0",
108108
"@sourcebot/codemirror-lang-tcl": "^1.0.13",
109109
"@sourcebot/db": "workspace:*",

0 commit comments

Comments
 (0)