Skip to content

feat(core): Log warnings when returning null in beforeSendSpan #14433

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 6 commits into from
Nov 22, 2024

Conversation

chargome
Copy link
Member

This PR adds a unified warning message for when spans are dropped via beforeSendSpan, which will be deprecated in v9.

closes #14335

@chargome chargome self-assigned this Nov 22, 2024
@chargome chargome changed the title log warnings when returning null in beforeSendSpan chore(core): Log warnings when returning null in beforeSendSpan Nov 22, 2024
Copy link
Contributor

github-actions bot commented Nov 22, 2024

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 23.01 KB +0.64% +148 B 🔺
@sentry/browser - with treeshaking flags 21.72 KB +0.75% +164 B 🔺
@sentry/browser (incl. Tracing) 35.62 KB +0.47% +169 B 🔺
@sentry/browser (incl. Tracing, Replay) 72.41 KB +0.25% +178 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.7 KB +0.28% +174 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 76.71 KB +0.23% +176 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 89.18 KB +0.2% +178 B 🔺
@sentry/browser (incl. Feedback) 39.75 KB +0.36% +142 B 🔺
@sentry/browser (incl. sendFeedback) 27.64 KB +0.51% +141 B 🔺
@sentry/browser (incl. FeedbackAsync) 32.43 KB +0.4% +130 B 🔺
@sentry/react 25.71 KB +0.52% +136 B 🔺
@sentry/react (incl. Tracing) 38.49 KB +0.47% +181 B 🔺
@sentry/vue 27.21 KB +0.65% +179 B 🔺
@sentry/vue (incl. Tracing) 37.44 KB +0.43% +161 B 🔺
@sentry/svelte 23.18 KB +0.72% +168 B 🔺
CDN Bundle 24.18 KB +0.61% +150 B 🔺
CDN Bundle (incl. Tracing) 37.19 KB +0.47% +178 B 🔺
CDN Bundle (incl. Tracing, Replay) 71.96 KB +0.21% +154 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 77.31 KB +0.21% +164 B 🔺
CDN Bundle - uncompressed 71.15 KB +0.43% +306 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 110.52 KB +0.3% +333 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 223.32 KB +0.15% +333 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 236.54 KB +0.14% +333 B 🔺
@sentry/nextjs (client) 38.58 KB +0.43% +168 B 🔺
@sentry/sveltekit (client) 36.13 KB +0.49% +177 B 🔺
@sentry/node 134.63 KB +0.13% +171 B 🔺
@sentry/node - without tracing 96.47 KB +0.18% +175 B 🔺
@sentry/aws-serverless 106.7 KB +0.13% +138 B 🔺

View base workflow run

@chargome chargome requested a review from lforst November 22, 2024 12:55
@lforst lforst changed the title chore(core): Log warnings when returning null in beforeSendSpan feat(core): Log warnings when returning null in beforeSendSpan Nov 22, 2024
chargome and others added 2 commits November 22, 2024 14:49
Co-authored-by: Luca Forstner <luca.forstner@sentry.io>
@chargome chargome merged commit b0c3f5f into develop Nov 22, 2024
151 of 152 checks passed
@chargome chargome deleted the cg/warn-before-send-span branch November 22, 2024 15:28
lforst added a commit that referenced this pull request Nov 26, 2024
Backfills items to the draft migration guide for v9 that we missed

- #14433
- #14454
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warn when null is returned from beforeSendSpan
2 participants