Skip to content

ref(core): Avoid keeping span-FF map on GLOBAL_OBJ #16924

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 15, 2025

Conversation

mydea
Copy link
Member

@mydea mydea commented Jul 11, 2025

Instead, we can just check the required things directly on the span. This is likely a bit more expensive than checking a map, but I would not assume this operation should be happening too excessively, so IMHO this should be fine.

This is also part of #16846

@aliu39 do you see any problems with this change?

@mydea mydea requested review from chargome and aliu39 July 11, 2025 08:04
@mydea mydea self-assigned this Jul 11, 2025
@mydea mydea force-pushed the fn/avoid-feature-flag-globals branch from 437d2ea to 7af3f35 Compare July 11, 2025 08:05
cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

github-actions bot commented Jul 11, 2025

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.88 kB - -
@sentry/browser - with treeshaking flags 22.35 kB - -
@sentry/browser (incl. Tracing) 39.75 kB - -
@sentry/browser (incl. Tracing, Replay) 77.88 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 67.61 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 82.58 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 94.68 kB - -
@sentry/browser (incl. Feedback) 40.58 kB - -
@sentry/browser (incl. sendFeedback) 28.56 kB - -
@sentry/browser (incl. FeedbackAsync) 33.46 kB - -
@sentry/react 25.61 kB - -
@sentry/react (incl. Tracing) 41.72 kB - -
@sentry/vue 28.31 kB - -
@sentry/vue (incl. Tracing) 41.53 kB - -
@sentry/svelte 23.9 kB - -
CDN Bundle 25.18 kB - -
CDN Bundle (incl. Tracing) 39.44 kB - -
CDN Bundle (incl. Tracing, Replay) 75.44 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 80.91 kB - -
CDN Bundle - uncompressed 73.54 kB - -
CDN Bundle (incl. Tracing) - uncompressed 116.99 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 231.18 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 243.99 kB - -
@sentry/nextjs (client) 43.32 kB - -
@sentry/sveltekit (client) 40.2 kB - -
@sentry/node 167.63 kB - -
@sentry/node - without tracing 100.33 kB - -
@sentry/aws-serverless 128.44 kB +0.01% +2 B 🔺

View base workflow run

@mydea mydea force-pushed the fn/avoid-feature-flag-globals branch from 7af3f35 to f22cd1e Compare July 11, 2025 08:25
Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Andrew already had a go at this in #16651

mydea added 3 commits July 15, 2025 10:32
Instead, we can just check the required things directly on the span. This is likely a bit more expensive than checking a map, but I would not assume this operation should be happening too excessively, so IMHO this should be fine.

This is also part of #16846
@mydea mydea force-pushed the fn/avoid-feature-flag-globals branch from 0eaffd2 to b3416f1 Compare July 15, 2025 08:33
@mydea mydea enabled auto-merge (squash) July 15, 2025 08:33
@mydea mydea merged commit 50120cb into develop Jul 15, 2025
168 checks passed
@mydea mydea deleted the fn/avoid-feature-flag-globals branch July 15, 2025 08:48
msonnb pushed a commit that referenced this pull request Jul 15, 2025
Instead, we can just check the required things directly on the span.
This is likely a bit more expensive than checking a map, but I would not
assume this operation should be happening too excessively, so IMHO this
should be fine.

This is also part of
#16846

@aliu39 do you see any problems with this change?
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.

2 participants