Skip to content

ref(core): Remove beforeSendSpan null return warning - #24129

Draft
msonnb wants to merge 1 commit into
developfrom
ms/remove-before-send-span-null-warning
Draft

msonnb wants to merge 1 commit into
developfrom
ms/remove-before-send-span-null-warning

Conversation

@msonnb

@msonnb msonnb commented Sep 7, 2026 •

Copy link
Copy Markdown
Member

Remove the unconditional warning when beforeSendSpan returns null, saving ~90B (compressed) / ~200B (uncompressed).

The type already disallows returning null since v9. Keeps the runtime fallback to the original span for JavaScript callers, with one regression test covering the shared behavior.

@msonnb msonnb changed the title refactor(core): Remove beforeSendSpan null return warning ref(core): Remove beforeSendSpan null return warning Sep 7, 2026
@msonnb msonnb changed the title ref(core): Remove beforeSendSpan null return warning ref(core): Remove beforeSendSpan null return warning Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 29.17 kB -0.24% -69 B 🔽
@sentry/browser - with treeshaking flags 27.41 kB -0.35% -94 B 🔽
@sentry/browser - with treeshaking flags tracing without tracing 27.32 kB -0.31% -83 B 🔽
@sentry/browser (incl. Tracing) 51.08 kB -0.15% -74 B 🔽
@sentry/browser (incl. Tracing + Span Streaming) 51.09 kB -0.17% -83 B 🔽
@sentry/browser (incl. Tracing, Profiling) 54.08 kB -0.18% -94 B 🔽
@sentry/browser (incl. Tracing, Replay) 90.67 kB -0.11% -97 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 79.75 kB -0.14% -107 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 95.36 kB -0.11% -104 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 108.35 kB -0.06% -59 B 🔽
@sentry/browser (incl. Feedback) 46.69 kB -0.17% -77 B 🔽
@sentry/browser (incl. sendFeedback) 34.22 kB -0.23% -76 B 🔽
@sentry/browser (incl. FeedbackAsync) 39.33 kB -0.23% -89 B 🔽
@sentry/browser (incl. Metrics) 30.18 kB -0.25% -73 B 🔽
@sentry/browser (incl. Logs) 30.43 kB -0.28% -85 B 🔽
@sentry/browser (incl. Metrics & Logs) 31.1 kB -0.26% -81 B 🔽
@sentry/react 31 kB -0.29% -89 B 🔽
@sentry/react (incl. Tracing) 53.46 kB -0.15% -78 B 🔽
@sentry/vue 36.64 kB -0.28% -100 B 🔽
@sentry/vue (incl. Tracing) 53.61 kB -0.17% -89 B 🔽
@sentry/svelte 29.19 kB -0.26% -74 B 🔽
CDN Bundle 30.94 kB -0.27% -81 B 🔽
CDN Bundle (incl. Tracing) 51.68 kB -0.19% -97 B 🔽
CDN Bundle (incl. Logs, Metrics) 33.19 kB -0.3% -99 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) 53.64 kB -0.21% -110 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) 73.89 kB -0.16% -115 B 🔽
CDN Bundle (incl. Tracing, Replay) 89.26 kB -0.12% -106 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.22 kB -0.13% -117 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 95.42 kB -0.12% -107 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 97.38 kB -0.12% -113 B 🔽
CDN Bundle - uncompressed 91.46 kB -0.23% -202 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 153.83 kB -0.14% -202 B 🔽
CDN Bundle (incl. Logs, Metrics) - uncompressed 98.03 kB -0.21% -202 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 159.78 kB -0.13% -202 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 227.6 kB -0.09% -202 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 273.56 kB -0.08% -202 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 279.5 kB -0.08% -202 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.26 kB -0.08% -202 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 293.19 kB -0.07% -202 B 🔽
@sentry/nextjs (client) 55.68 kB -0.19% -101 B 🔽
@sentry/sveltekit (client) 51.5 kB -0.19% -97 B 🔽
@sentry/core/server 39.91 kB -0.2% -76 B 🔽
@sentry/core/browser 13.52 kB -0.81% -110 B 🔽
@sentry/node 141.79 kB -0.07% -92 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.88 kB - -
@sentry/node - without tracing 90.8 kB -0.1% -90 B 🔽
@sentry/node - without channel injection 120.19 kB -0.06% -66 B 🔽
@sentry/aws-serverless 99.05 kB -0.09% -83 B 🔽
@sentry/cloudflare (withSentry) - minified 206.4 kB -0.11% -211 B 🔽
@sentry/cloudflare (withSentry) 513.64 kB -0.08% -373 B 🔽

View base workflow run

@msonnb
msonnb force-pushed the ms/remove-before-send-span-null-warning branch from 9a549b9 to 066c5bd Compare September 7, 2026 12:20
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you apply the label PR: no-auto-close I will leave it alone ... forever!

Co-Authored-By: GPT-6 <codex@openai.com>
@msonnb
msonnb force-pushed the ms/remove-before-send-span-null-warning branch from 066c5bd to 9ccb8c8 Compare September 28, 2026 14:21

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant