Summary
On Windows with Node >= 24.13 (the sync Module.registerHooks() path), registerDiagnosticsChannelInjection from @sentry/server-runtime-injection instruments nothing. Modules load uninstrumented and no spans are produced. No warning is emitted. Linux and macOS are unaffected.
Root cause
The vendored @apm-js-collab/tracing-hooks resolve hook passes a file:// URL to module-details-from-path, which splits on path.sep (\ on Windows) and so never finds node_modules, returning undefined. No transformer gets registered. On the async Module.register() path the failure is masked by the separate Module.prototype._compile CJS patch; the sync path has no such fallback, so it breaks outright.
Fix belongs upstream in apm-js-collab/tracing-hooks (fileURLToPath(url.url) before module-details-from-path), then re-vendored into @sentry/server-runtime-injection.
Environment
@sentry/node / @sentry/server-runtime-injection 11.0.0 (@apm-js-collab/tracing-hooks 0.13.2)
- Windows, Node 24.13+
- Found via
@sentry/electron e2e (Electron 40–44); a plain Node 24 + Windows app requiring any instrumented package reproduces it.
Summary
On Windows with Node >= 24.13 (the sync
Module.registerHooks()path),registerDiagnosticsChannelInjectionfrom@sentry/server-runtime-injectioninstruments nothing. Modules load uninstrumented and no spans are produced. No warning is emitted. Linux and macOS are unaffected.Root cause
The vendored
@apm-js-collab/tracing-hooksresolve hook passes afile://URL tomodule-details-from-path, which splits onpath.sep(\on Windows) and so never findsnode_modules, returningundefined. No transformer gets registered. On the asyncModule.register()path the failure is masked by the separateModule.prototype._compileCJS patch; the sync path has no such fallback, so it breaks outright.Fix belongs upstream in
apm-js-collab/tracing-hooks(fileURLToPath(url.url)beforemodule-details-from-path), then re-vendored into@sentry/server-runtime-injection.Environment
@sentry/node/@sentry/server-runtime-injection11.0.0 (@apm-js-collab/tracing-hooks0.13.2)@sentry/electrone2e (Electron 40–44); a plain Node 24 + Windows app requiring any instrumented package reproduces it.