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 28.72 kB -0.28% -80 B 🔽
@sentry/browser - with treeshaking flags 27.01 kB -0.34% -92 B 🔽
@sentry/browser - with treeshaking flags tracing without tracing 26.91 kB -0.38% -100 B 🔽
@sentry/browser (incl. Tracing) 49.11 kB -0.22% -108 B 🔽
@sentry/browser (incl. Tracing + Span Streaming) 49.13 kB -0.2% -94 B 🔽
@sentry/browser (incl. Tracing, Profiling) 52.04 kB -0.17% -86 B 🔽
@sentry/browser (incl. Tracing, Replay) 88.67 kB -0.11% -89 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.85 kB -0.13% -101 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 93.36 kB -0.09% -81 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 106.29 kB -0.08% -80 B 🔽
@sentry/browser (incl. Feedback) 46.21 kB -0.19% -84 B 🔽
@sentry/browser (incl. sendFeedback) 33.78 kB -0.25% -84 B 🔽
@sentry/browser (incl. FeedbackAsync) 38.87 kB -0.27% -104 B 🔽
@sentry/browser (incl. Metrics) 29.73 kB -0.3% -88 B 🔽
@sentry/browser (incl. Logs) 30 kB -0.28% -83 B 🔽
@sentry/browser (incl. Metrics & Logs) 30.67 kB -0.26% -78 B 🔽
@sentry/react 30.47 kB -0.27% -81 B 🔽
@sentry/react (incl. Tracing) 51.34 kB -0.16% -81 B 🔽
@sentry/vue 35.97 kB -0.24% -85 B 🔽
@sentry/vue (incl. Tracing) 51.39 kB -0.18% -88 B 🔽
@sentry/svelte 28.74 kB -0.32% -92 B 🔽
CDN Bundle 30.43 kB -0.38% -114 B 🔽
CDN Bundle (incl. Tracing) 49.66 kB -0.17% -80 B 🔽
CDN Bundle (incl. Logs, Metrics) 32.71 kB -0.34% -110 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) 51.6 kB -0.19% -95 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) 73.37 kB -0.15% -107 B 🔽
CDN Bundle (incl. Tracing, Replay) 87.18 kB -0.13% -109 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.08 kB -0.11% -97 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 93.13 kB -0.1% -87 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.11 kB -0.11% -100 B 🔽
CDN Bundle - uncompressed 90.26 kB -0.23% -202 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 147.97 kB -0.14% -202 B 🔽
CDN Bundle (incl. Logs, Metrics) - uncompressed 96.83 kB -0.21% -202 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 153.93 kB -0.14% -202 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 226.09 kB -0.09% -202 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.56 kB -0.08% -202 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.51 kB -0.08% -202 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.26 kB -0.08% -202 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 287.2 kB -0.08% -202 B 🔽
@sentry/nextjs (client) 53.95 kB -0.16% -86 B 🔽
@sentry/sveltekit (client) 49.55 kB -0.21% -101 B 🔽
@sentry/core/server 38.54 kB -0.22% -84 B 🔽
@sentry/core/browser 13.44 kB -0.8% -108 B 🔽
@sentry/node 127.53 kB -0.06% -72 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.58 kB - -
@sentry/node - without tracing 88.61 kB -0.1% -83 B 🔽
@sentry/node - without channel injection 106.81 kB -0.07% -72 B 🔽
@sentry/aws-serverless 96.98 kB -0.1% -88 B 🔽
@sentry/cloudflare (withSentry) - minified 201.7 kB -0.11% -211 B 🔽
@sentry/cloudflare (withSentry) 502.03 kB -0.08% -373 B 🔽

View base workflow run

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant