Commit 39428c8
feat(server-runtime-injection): Split runtime orchestrion injection into a dedicated package
The runtime diagnostics-channel injection (`register`/`hook`/`import-hook` + the
vendored transformer chain meriyah/esquery/astring/source-map/tracing-hooks) must
stay EXTERNAL when apps bundle their server, while the rest of `@sentry/server-utils`
(barrel + config + bundler plugins) is meant to be bundled. Sharing one package made
externalization fiddly. This moves the runtime injection into a new package,
`@sentry/server-runtime-injection`, so "keep this external" is a clean package boundary.
- New package holds `register`/`hook`/`import-hook` (subpaths `/register`, `/hook`,
`/import-hook`) and vendors the transformer chain; it depends on `@sentry/server-utils`
and imports `SENTRY_INSTRUMENTATIONS` from `./orchestrion/config` (config stays put).
- `@sentry/server-utils` drops the runtime dir/exports and the runtime-only vendored deps;
the lone `config/index.ts` bundler re-export moves to a new `./orchestrion/bundler-transforms`
subpath so importing config stays transformer-free (bun updated).
- References updated: node SDK + test mock, deno import, the shared `--import` template +
`makeOrchestrionLoader` guard, Next.js externalization (`ORCHESTRION_RUNTIME_EXTERNAL_PACKAGES`,
nextjs-anchored require-ability check, forwarder generation) + tests, `.size-limit.js`.
- Dep added to runtime-injection consumers (node, nextjs, deno, aws/gcp-serverless, astro,
tanstackstart-react); package registered in workspaces, `.craft.yml`, CODEOWNERS, aws e2e.
Stacked on the detect/warn PR (#23675).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 2d039c7 commit 39428c8
42 files changed
Lines changed: 402 additions & 144 deletions
File tree
- .github
- dev-packages
- e2e-tests/test-applications/aws-serverless/src
- rollup-utils
- code
- packages
- astro
- aws-serverless
- bun/src
- core/src/utils
- deno
- src
- google-cloud-serverless
- nextjs
- scripts
- src/config
- test/config
- webpack
- node
- src/sdk
- test/sdk
- nuxt
- server-runtime-injection
- src
- test
- server-utils
- src/orchestrion/config
- test/orchestrion
- tanstackstart-react
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
| 414 | + | |
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
| 58 | + | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | | - | |
197 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
0 commit comments