Skip to content

feat(node): Support Node 26#20710

Merged
mydea merged 16 commits into
developfrom
fn/support-node-26
May 11, 2026
Merged

feat(node): Support Node 26#20710
mydea merged 16 commits into
developfrom
fn/support-node-26

Conversation

@mydea
Copy link
Copy Markdown
Member

@mydea mydea commented May 7, 2026

This adds v26 to the node test matrix on CI, ensuring we support this properly.

@mydea mydea self-assigned this May 7, 2026
@mydea mydea requested review from a team, JPeer264 and Lms24 and removed request for a team May 7, 2026 11:20
@mydea
Copy link
Copy Markdown
Member Author

mydea commented May 7, 2026

Depends on this (or something similar) to be released: getsentry/sentry-javascript-profiling-node-binaries#32

@mydea mydea force-pushed the fn/support-node-26 branch 2 times, most recently from b019b0b to c876f25 Compare May 8, 2026 08:03
@mydea mydea changed the title ci: Ensure we test against node 26 feat(node): Support Node 26 May 8, 2026
@mydea mydea force-pushed the fn/support-node-26 branch 2 times, most recently from d128f42 to b82c941 Compare May 8, 2026 08:58
mydea added a commit that referenced this pull request May 11, 2026
We want to leverage this for Node 26 to filter deprecation messages from
IITM, but this could also be used by users if they want to silence
certain things.

Required for #20710
@mydea mydea force-pushed the fn/support-node-26 branch from b82c941 to eb764f1 Compare May 11, 2026 11:15
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 26.37 kB - -
@sentry/browser - with treeshaking flags 24.82 kB - -
@sentry/browser (incl. Tracing) 44.24 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 46.46 kB - -
@sentry/browser (incl. Tracing, Profiling) 49.22 kB - -
@sentry/browser (incl. Tracing, Replay) 83.86 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 73.31 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 88.55 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 101.19 kB - -
@sentry/browser (incl. Feedback) 43.53 kB - -
@sentry/browser (incl. sendFeedback) 31.19 kB - -
@sentry/browser (incl. FeedbackAsync) 36.27 kB - -
@sentry/browser (incl. Metrics) 27.65 kB - -
@sentry/browser (incl. Logs) 27.78 kB - -
@sentry/browser (incl. Metrics & Logs) 28.47 kB - -
@sentry/react 28.11 kB - -
@sentry/react (incl. Tracing) 46.49 kB - -
@sentry/vue 31.24 kB - -
@sentry/vue (incl. Tracing) 46.09 kB - -
@sentry/svelte 26.39 kB - -
CDN Bundle 28.95 kB - -
CDN Bundle (incl. Tracing) 46.97 kB - -
CDN Bundle (incl. Logs, Metrics) 30.36 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 48.09 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 69.68 kB - -
CDN Bundle (incl. Tracing, Replay) 84.37 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 85.42 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 90.16 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 91.26 kB - -
CDN Bundle - uncompressed 84.98 kB - -
CDN Bundle (incl. Tracing) - uncompressed 140.53 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 89.17 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 144 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 214 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 259.24 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 262.69 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 272.94 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 276.38 kB - -
@sentry/nextjs (client) 49.01 kB - -
@sentry/sveltekit (client) 44.72 kB - -
@sentry/node-core 60.59 kB +0.08% +43 B 🔺
@sentry/node 165.66 kB +0.03% +45 B 🔺
@sentry/node - without tracing 73.62 kB +0.06% +44 B 🔺
@sentry/aws-serverless 107.77 kB +0.04% +40 B 🔺
@sentry/cloudflare (withSentry) - minified 169.66 kB - -
@sentry/cloudflare (withSentry) 428.38 kB - -

View base workflow run

@mydea mydea force-pushed the fn/support-node-26 branch from 9271a0d to f1fc10b Compare May 11, 2026 12:18
@mydea mydea marked this pull request as ready for review May 11, 2026 14:00
@mydea mydea requested a review from a team as a code owner May 11, 2026 14:00
@mydea mydea merged commit ed8602c into develop May 11, 2026
266 checks passed
@mydea mydea deleted the fn/support-node-26 branch May 11, 2026 14:01
Comment on lines +42 to 51
const core = coreConsoleIntegration({
...options,
filter: [
...(options.filter || []),
// Deprecation on Node 26 for module.require(), which is used by IITM
'[DEP0205] DeprecationWarning',
],
});
core.setup?.(client);
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The Lambda-specific console instrumentation instrumentConsoleLambda bypasses configured filters, causing all console messages to be captured as breadcrumbs regardless of the filter settings.
Severity: LOW

Suggested Fix

Update the instrumentConsoleLambda function to apply the filters stored in the _filter set before calling triggerHandlers. The implementation should check if a console message matches any of the filters and, if so, prevent it from being captured.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: packages/node-core/src/integrations/console.ts#L42-L51

Potential issue: In Lambda environments, the `instrumentConsoleLambda` function is
registered to handle console instrumentation. This function unconditionally calls
`triggerHandlers` for every console message, ignoring any filters that have been
configured via `addConsoleInstrumentationFilter`. As a result, messages that are
intended to be filtered out, such as the `'[DEP0205] DeprecationWarning'`, are still
captured as breadcrumbs, leading to unnecessary noise in the telemetry data.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f73ad06. Configure here.

/** Exported only for tests. */
export const _nodeProfilingIntegration = ((): ProfilingIntegration<NodeClient> => {
if (![16, 18, 20, 22, 24].includes(NODE_MAJOR)) {
if (![16, 18, 20, 22, 24, 26].includes(NODE_MAJOR)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Profiling warning message omits Node 26 from supported list

Medium Severity

The version check on line 642 was updated to include 26 in the supported list (![16, 18, 20, 22, 24, 26].includes(NODE_MAJOR)), but the warning message on line 647 still says "16, 18, 20, 22, 24". Users on unsupported versions (e.g., Node 27) will see an incomplete list of supported versions, omitting that 26 is also supported.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f73ad06. Configure here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants