Skip to content

ref(node): Stop using registerSpanErrorInstrumentation() on server#21169

Draft
mydea wants to merge 1 commit into
developfrom
fn/remove-server-error-span
Draft

ref(node): Stop using registerSpanErrorInstrumentation() on server#21169
mydea wants to merge 1 commit into
developfrom
fn/remove-server-error-span

Conversation

@mydea
Copy link
Copy Markdown
Member

@mydea mydea commented May 26, 2026

I think this does nothing on node, because the implementation of this calls this under the hood:

addGlobalErrorInstrumentationHandler(errorCallback);
addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);

basically browser-only, using window.onerror. I believe this is handled specifically in node anyhow so should not be used/needed and allows us to streamline this a bit and potentially move this to a browser-only place eventually.

@mydea mydea self-assigned this May 26, 2026
@mydea mydea force-pushed the fn/remove-server-error-span branch from 53a9eb2 to c0f6a9e Compare May 26, 2026 13:29
@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.32 kB - -
@sentry/browser - with treeshaking flags 25.74 kB - -
@sentry/browser (incl. Tracing) 45.3 kB -0.04% -16 B 🔽
@sentry/browser (incl. Tracing + Span Streaming) 47.54 kB -0.03% -13 B 🔽
@sentry/browser (incl. Tracing, Profiling) 50.28 kB -0.04% -20 B 🔽
@sentry/browser (incl. Tracing, Replay) 84.9 kB -0.02% -16 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 74.41 kB -0.03% -17 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 89.62 kB -0.02% -16 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 102.23 kB -0.02% -16 B 🔽
@sentry/browser (incl. Feedback) 44.51 kB - -
@sentry/browser (incl. sendFeedback) 32.13 kB - -
@sentry/browser (incl. FeedbackAsync) 37.25 kB - -
@sentry/browser (incl. Metrics) 28.41 kB - -
@sentry/browser (incl. Logs) 28.64 kB - -
@sentry/browser (incl. Metrics & Logs) 29.33 kB - -
@sentry/react 29.05 kB -0.01% -2 B 🔽
@sentry/react (incl. Tracing) 47.53 kB -0.04% -15 B 🔽
@sentry/vue 32.24 kB - -
@sentry/vue (incl. Tracing) 47.16 kB -0.04% -15 B 🔽
@sentry/svelte 27.35 kB - -
CDN Bundle 29.73 kB - -
CDN Bundle (incl. Tracing) 47.82 kB -0.05% -20 B 🔽
CDN Bundle (incl. Logs, Metrics) 31.21 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.07 kB -0.05% -22 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) 70.53 kB - -
CDN Bundle (incl. Tracing, Replay) 85.32 kB -0.02% -17 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.48 kB -0.03% -18 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 91.19 kB -0.02% -18 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.35 kB -0.03% -20 B 🔽
CDN Bundle - uncompressed 87.8 kB - -
CDN Bundle (incl. Tracing) - uncompressed 144.26 kB -0.03% -36 B 🔽
CDN Bundle (incl. Logs, Metrics) - uncompressed 92.29 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 148.01 kB -0.03% -36 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 217.02 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 263.04 kB -0.02% -36 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.78 kB -0.02% -36 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.73 kB -0.02% -36 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.47 kB -0.02% -36 B 🔽
@sentry/nextjs (client) 50.02 kB -0.04% -16 B 🔽
@sentry/sveltekit (client) 45.78 kB -0.04% -15 B 🔽
@sentry/core/server 76.46 kB -0.03% -22 B 🔽
@sentry/core/browser 63.21 kB -0.04% -19 B 🔽
@sentry/node-core 62.3 kB -0.47% -288 B 🔽
@sentry/node 130.78 kB -0.25% -323 B 🔽
@sentry/node - without tracing 74.75 kB -0.37% -274 B 🔽
@sentry/aws-serverless 86.95 kB -0.34% -292 B 🔽
@sentry/cloudflare (withSentry) - minified 172.53 kB -0.57% -984 B 🔽
@sentry/cloudflare (withSentry) 430.87 kB -0.62% -2.65 kB 🔽

View base workflow run

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.

1 participant