Deno 2.9.2 has a working Module.registerHooks, and hasStableSyncModuleHooks already returns true for Deno unconditionally (register.ts:20). Calling the register function directly works:
$ deno run -A reg.mjs
marker after register: {"runtime":[]} # hooks registered
But @sentry/deno's init() never calls it:
$ deno run -A nospans.mjs
orchestrion marker: undefined
Node's init() calls registerDiagnosticsChannelInjection() and then detectOrchestrionSetup(). Deno instead expects the user to remember deno run --import=@sentry/deno/import app.ts, and gives no warning at all if they forget. All 22 channel integrations still install and report Integration installed.
Work item. Call registerDiagnosticsChannelInjection() from @sentry/deno's init() behind the same enableRuntimeChannelInjection option Node uses, and call detectOrchestrionSetup() after client creation. Keep @sentry/deno/import working for the case where modules are imported before init().
**Prior art **(related history only). #21451 (merged) added the @sentry/deno/import runtime hook, and #22790 (merged) raised the floor to Deno >= 2.8.3, which is what makes the Module.registerHooks path safe to call unconditionally. No issue covers calling it from init().
Deno 2.9.2 has a working
Module.registerHooks, andhasStableSyncModuleHooksalready returnstruefor Deno unconditionally (register.ts:20). Calling the register function directly works:But
@sentry/deno'sinit()never calls it:Node's
init()callsregisterDiagnosticsChannelInjection()and thendetectOrchestrionSetup(). Deno instead expects the user to rememberdeno run --import=@sentry/deno/import app.ts, and gives no warning at all if they forget. All 22 channel integrations still install and reportIntegration installed.Work item. Call
registerDiagnosticsChannelInjection()from@sentry/deno'sinit()behind the sameenableRuntimeChannelInjectionoption Node uses, and calldetectOrchestrionSetup()after client creation. Keep@sentry/deno/importworking for the case where modules are imported beforeinit().**Prior art **(related history only). #21451 (merged) added the
@sentry/deno/importruntime hook, and #22790 (merged) raised the floor to Deno >= 2.8.3, which is what makes theModule.registerHookspath safe to call unconditionally. No issue covers calling it frominit().