Commit 936541e
fix(server-utils): Keep orchestrion registration out of tree-shaking (#23590)
## What
Keep the orchestrion registration that the bundler transform injects
from being tree-shaken away.
- Assign the injected `orchestrionModuleInjected(...)` result to a
`globalThis` property instead of discarding it.
## Why
The helper returns `void` and `@sentry/server-utils` sets `sideEffects:
false`, so a bare call statement is one a bundler can prove droppable.
rollup 4.63.0 (released 2026-08-25) does, and drops the registration.
Instrumented modules then publish on their diagnostics channel with
nothing subscribed, so no spans are recorded. This currently breaks
every Cloudflare E2E app that instruments through the vite transform,
and it silently disables DB instrumentation for users on vite or rollup
4.63.0 and later.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent cd518e2 commit 936541e
2 files changed
Lines changed: 19 additions & 1 deletion
File tree
- packages/server-utils
- src/orchestrion/bundler
- test/orchestrion
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
53 | 67 | | |
54 | 68 | | |
55 | 69 | | |
| |||
63 | 77 | | |
64 | 78 | | |
65 | 79 | | |
66 | | - | |
| 80 | + | |
67 | 81 | | |
68 | 82 | | |
69 | 83 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
| |||
0 commit comments