Repository navigation
ref(server-runtime-injection): Say when hook registration fails because the deployment is missing a file - #26272
Merged
mydea merged 2 commits intoNov 13, 2026
Conversation
Contributor
size-limit report 📦Compared: 87970b0 (PR test merge using develop at 7a37943) Against: 7a37943 (develop) · base run #65929 ✅ Baseline matches: this diff contains only this PR's changes.
|
mydea
reviewed
Nov 11, 2026
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 4 not successful, 45 successful. See the run.
Successful checks
|
mydea
marked this pull request as ready for review
November 11, 2026 08:47
sentry-junior Bot
added a commit
that referenced
this pull request
Nov 11, 2026
The registration test fails whenever the hook or anything it loads is missing, so the file-exists check adds nothing. Assert on the registration marker instead of the warning text, which #26272 rewords.
…se the deployment is missing a file When `Module.register()` fails with `ERR_MODULE_NOT_FOUND`, the always-on warning now says that a file is missing from the deployed output, so the bare "Cannot find module" no longer reads like an SDK bug. Refs #26121 Co-Authored-By: Francesco Gringl-Novy <francesco.novy@sentry.io>
… impact and the fix
mydea
force-pushed
the
fix/server-runtime-injection-missing-hook-warning
branch
from
November 13, 2026 07:38
bfc184b to
b75553e
Compare
mydea
enabled auto-merge (squash)
November 13, 2026 07:39
mydea
added a commit
that referenced
this pull request
Nov 13, 2026
…se the deployment is missing a file (#26272) **Why:** Follow-up to #26271. When `Module.register()` fails with `ERR_MODULE_NOT_FOUND`, the always-on warning used to just repeat Node's "Cannot find module …". That reads like an SDK bug, when the real cause is that a build tracer didn't ship all of `@sentry/server-runtime-injection`. The warning now says so. I checked on Node 22 that `error.code` survives the trip back from the loader thread. The warning still fires once per process: issue #26121 asks for it to be quiet, but staying silent would hide that channel integrations aren't recording anything (see #25677). **How to review:** It's a single branch in the `catch` block of `registerDiagnosticsChannelInjection()`, plus one unit test. Refs #26121 <!-- junior-request-attribution:start --> via **Francesco Gringl-Novy**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AD0CA8FXFXAS%3A1794383205.954799 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AD0CA8FXFXAS%3A1794383205.954799) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0CA8FXFXAS%3A1794383205.954799/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Francesco Gringl-Novy <francesco.novy@sentry.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why: Follow-up to #26271. When
Module.register()fails withERR_MODULE_NOT_FOUND, the always-on warning used to just repeat Node's "Cannot find module …". That reads like an SDK bug, when the real cause is that a build tracer didn't ship all of@sentry/server-runtime-injection. The warning now says so. I checked on Node 22 thaterror.codesurvives the trip back from the loader thread. The warning still fires once per process: issue #26121 asks for it to be quiet, but staying silent would hide that channel integrations aren't recording anything (see #25677).How to review: It's a single branch in the
catchblock ofregisterDiagnosticsChannelInjection(), plus one unit test.Refs #26121
via Francesco Gringl-Novy.
--
View Session [Sentry]