Skip to content
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

fix(browser): Remove browserPerformanceTimeOrigin side-effects #14025

Draft
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Oct 18, 2024

Due to the side-effect, browserPerformanceTimeOrigin ends up in the non-tracing browser bundle.

This change ensures that the code is only included when tracing is in use at a slight cost to the tracing bundles.

Copy link
Contributor

github-actions bot commented Oct 18, 2024

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.01 KB -0.66% -155 B 🔽
@sentry/browser - with treeshaking flags 21.71 KB -0.59% -130 B 🔽
@sentry/browser (incl. Tracing) 35.68 KB +0.07% +24 B 🔺
@sentry/browser (incl. Tracing, Replay) 72.92 KB +0.03% +16 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 63.33 KB +0.03% +19 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 77.34 KB +0.03% +21 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 89.73 KB +0.03% +20 B 🔺
@sentry/browser (incl. Feedback) 39.77 KB -0.34% -136 B 🔽
@sentry/browser (incl. sendFeedback) 27.65 KB -0.44% -124 B 🔽
@sentry/browser (incl. FeedbackAsync) 32.4 KB -0.4% -131 B 🔽
@sentry/react 25.76 KB -0.47% -124 B 🔽
@sentry/react (incl. Tracing) 38.53 KB +0.05% +19 B 🔺
@sentry/vue 27.26 KB -0.46% -128 B 🔽
@sentry/vue (incl. Tracing) 37.54 KB +0.07% +25 B 🔺
@sentry/svelte 23.18 KB -0.56% -133 B 🔽
CDN Bundle 24.17 KB -0.38% -93 B 🔽
CDN Bundle (incl. Tracing) 35.86 KB +0.14% +49 B 🔺
CDN Bundle (incl. Tracing, Replay) 70.96 KB +0.06% +37 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 76.28 KB +0.09% +66 B 🔺
CDN Bundle - uncompressed 71.08 KB -0.34% -244 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 106.94 KB +0.15% +159 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 221.01 KB +0.08% +161 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 234.21 KB +0.07% +161 B 🔺
@sentry/nextjs (client) 38.81 KB +0.07% +27 B 🔺
@sentry/sveltekit (client) 36.2 KB +0.06% +22 B 🔺
@sentry/node 157.86 KB -0.08% -124 B 🔽
@sentry/node - without tracing 98.74 KB -0.13% -131 B 🔽
@sentry/aws-serverless 126.47 KB -0.11% -134 B 🔽

View base workflow run

@timfish
Copy link
Collaborator Author

timfish commented Dec 4, 2024

@mydea or @billyvg do you know why my changes could be causing this Replay test failure with an incorrect segmentId?
https://github.com/getsentry/sentry-javascript/actions/runs/12156896052/job/33901817087?pr=14025#step:6:426

@timfish
Copy link
Collaborator Author

timfish commented Dec 13, 2024

@lforst since this is now a breaking change, can I rebase this PR on top of the v9 branch?

@lforst
Copy link
Member

lforst commented Dec 13, 2024

@lforst since this is now a breaking change, can I rebase this PR on top of the v9 branch?

We already cut the v8 branch so the branch to target with breaking changes is now develop.

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.

3 participants