Skip to content

Injection silently no-ops on Windows (registerHooks path) #24695

Description

@timfish

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.

Activity

  1. linear-code commented on Sep 24, 2026

    @linear-code
  2. self-assigned this
    on Sep 24, 2026
  3. changed the title [-]Orchestrion injection silently no-ops on Windows (sync registerHooks path)[/-] [+]Injection silently no-ops on Windows (`registerHooks` path)[/+] on Sep 24, 2026
  4. timfish commented on Sep 24, 2026

    @timfish
    CollaboratorAuthor
  5. github-actions commented on Sep 28, 2026

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #24705, which was included in the 11.1.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions