Commit a4a0f0e
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
| 105 | + | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
0 commit comments