Skip to content

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Dec 19, 2025

Pre-work for #18160

We have multiple places in which we need to combine the ScopeData of global, isolation and current scopes, to apply this data to telemetry items (events, logs, metrics, soon also spansV2). Previously, we did this in-place or with helpers that were not re-used. This PR now unifies the various locations to one helper from core which can be reused everywhere.

Closes #18586 (added automatically)

@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.83 kB +0.02% +3 B 🔺
@sentry/browser - with treeshaking flags 23.32 kB +0.03% +5 B 🔺
@sentry/browser (incl. Tracing) 41.6 kB +0.02% +7 B 🔺
@sentry/browser (incl. Tracing, Profiling) 46.2 kB +0.01% +4 B 🔺
@sentry/browser (incl. Tracing, Replay) 80.17 kB +0.01% +3 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 69.91 kB +0.01% +4 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 84.85 kB +0.01% +2 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 97.11 kB +0.01% +8 B 🔺
@sentry/browser (incl. Feedback) 41.54 kB +0.01% +1 B 🔺
@sentry/browser (incl. sendFeedback) 29.51 kB +0.01% +1 B 🔺
@sentry/browser (incl. FeedbackAsync) 34.51 kB +0.01% +3 B 🔺
@sentry/browser (incl. Metrics) 25.84 kB -0.07% -17 B 🔽
@sentry/browser (incl. Logs) 26.05 kB -0.1% -24 B 🔽
@sentry/browser (incl. Metrics & Logs) 26.8 kB +0.26% +69 B 🔺
@sentry/react 26.57 kB +0.1% +26 B 🔺
@sentry/react (incl. Tracing) 43.83 kB +0.09% +38 B 🔺
@sentry/vue 29.29 kB +0.02% +4 B 🔺
@sentry/vue (incl. Tracing) 43.42 kB +0.02% +8 B 🔺
@sentry/svelte 24.84 kB +0.03% +7 B 🔺
CDN Bundle 27.24 kB -0.06% -16 B 🔽
CDN Bundle (incl. Tracing) 42.25 kB +0.02% +8 B 🔺
CDN Bundle (incl. Tracing, Replay) 78.96 kB +0.01% +2 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 84.42 kB +0.02% +15 B 🔺
CDN Bundle - uncompressed 80 kB -0.07% -55 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 125.44 kB -0.05% -55 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 241.97 kB -0.03% -55 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 254.74 kB -0.03% -55 B 🔽
@sentry/nextjs (client) 46.06 kB +0.09% +40 B 🔺
@sentry/sveltekit (client) 41.98 kB +0.01% +4 B 🔺
@sentry/node-core 51.62 kB +0.01% +4 B 🔺
@sentry/node 161.52 kB +0.01% +3 B 🔺
@sentry/node - without tracing 93.06 kB +0.01% +7 B 🔺
@sentry/aws-serverless 108.57 kB +0.01% +5 B 🔺

View base workflow run

@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2025

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 9,005 - 10,990 -18%
GET With Sentry 1,672 19% 1,876 -11%
GET With Sentry (error only) 5,861 65% 7,515 -22%
POST Baseline 1,166 - 1,112 +5%
POST With Sentry 557 48% 515 +8%
POST With Sentry (error only) 1,020 87% 924 +10%
MYSQL Baseline 3,251 - 3,701 -12%
MYSQL With Sentry 472 15% 405 +17%
MYSQL With Sentry (error only) 2,667 82% 3,010 -11%

View base workflow run

@Lms24 Lms24 self-assigned this Dec 19, 2025
@Lms24
Copy link
Member Author

Lms24 commented Dec 19, 2025

hmm not fully sure about the bundle size measurements here tbh. It makes sense that it slightly increases for the minimal npm package config (1 occurance) and then again decreases if you add logs or metrics (2 occurances). Not sure why adding logs AND metrics (3 occurances) actually increases size again 🤔

@Lms24 Lms24 requested review from AbhiPrasad and chargome December 19, 2025 17:03
@Lms24 Lms24 marked this pull request as ready for review December 19, 2025 17:03
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.

ref(core): Extract and reuse getFinalScopeData helper

2 participants