Commit cfc41ca
feat(cloudflare): Instrument bundled packages via orchestrion diagnostics channels
Integrate the server-utils orchestrion channel-integration mechanism into the
Cloudflare SDK, so bundled npm packages (e.g. `mysql`) are traced without
monkey-patching, which workerd doesn't support anyway.
- Add the `@sentry/cloudflare/vite` plugin, which runs the orchestrion transform
(injecting `diagnostics_channel.tracingChannel` calls) and injects a
registration module that puts the channel-subscriber integrations on the
global marker. Workers built without the plugin don't ship that code.
- `getDefaultIntegrations()` reads the registered integrations from the marker
at `init()`, activating only those whose module was actually transformed, and
warns (debug only, once per isolate) about modules whose transform failed.
- Add a Cloudflare + MySQL e2e test app exercising real `db` spans in workerd.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 7e8f420 commit cfc41ca
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
0 commit comments