feat(node)!: Remove init, preload entry points and preloadOpenTelemetry - #23074
Conversation
|
buglitzer moch |
size-limit report 📦
|
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 56dbdfd. Configure here.
…lemetry` Removes the `@sentry/node/init` and `@sentry/node/preload` no-code entry points and the `preloadOpenTelemetry()` function. All instrumentation is channel-based via orchestrion and set up when the instrumented module loads, so preloading no longer does anything. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
56dbdfd to
58d24fe
Compare
There was a problem hiding this comment.
Nice!
side-note, absolutely not relevant for this PR: ignoreLayersType is very cryptic to understand for users. Most express users likely don't even know what a layer is. Should we think about a more human-friendly option here? Ignoring middleware spans is something people want to do. ignoreSpans covers this use case universally but since we have the option on integration level, it can be used more precisely and probably reduce perf overhead for perf-conscious users.
... this also made me realize we don't document the express integration 😅 and this option is only documented for Koa
|
@Lms24 right, we don't have documentations for any of the vendored instrumentations. Def some work to do there. |
What
Remove the following from
@sentry/node, part of the v11 major:@sentry/node/initand@sentry/node/preloadno-code entry points.preloadOpenTelemetry()function.node-express-{cjs,esm}-preloade2e apps and theno-codeintegration suite that tested them.Also repurposes the
express/late-initintegration suite (renamed toexpress/ignore-layers-type) into a focusedignoreLayersTypetest.Why
All instrumentation is channel-based via orchestrion and is set up when the instrumented module loads, so preloading no longer does anything.
preloadOpenTelemetry()could only ever preload the Sentry HTTP breadcrumb/propagation instrument, which normalinit()already sets up, so it had quietly stopped doing its advertised job.The issue proposed deprecating
init/preload, but sincedevelopis the v11 line a deprecation cycle buys nothing, so these are removed outright.@sentry/node/importstays as the one supported hook.@sentry/node/loaderand@sentry/node/auto-diagnostic-channelsfrom the issue are already moot:/loaderwas removed with the iitm cleanup, and/importalready is the orchestrion diagnostics-channel hook that/auto-diagnostic-channelswas meant to become.The
late-initsuite existed to guard lazy Express option loading via a laterinit(), a mechanism that now lives only in@sentry/core'spatchLayer(Deno-only, unit-tested) and is unreachable in node under orchestrion. It was also the only node e2e test exercisingignoreLayersType, so it is kept and refocused on that option rather than deleted.Closes: #21483