You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Browser Session envelope is sent directly at SDK init time, causing SDK overhead increases #21817
Our browserSessionIntegration sends a session envelope request directly in setupOnce (i.e. during Sentry.init()). While the SDK does not block init on the request, it invokes the processing and sending pipeline. This adds overhead. Moreover, a request leaving the web app this early has influence on the browser's network. We could demonstrate this in our Lighthouse performance tests, where we observed that especially under Ligththouse Lantern test mode, the additional request drastically increases the test app's LCP and decreases LH performance scores.
We can quite easily defer sending the session envelope. We still start the session right away (no harm in that, and arguably, that's the correct thing to do) but we call captureSession either via requestIdleCallback or via a ~5s timeout (TBD). Obviously, this should still happen "soon" after the pageload to avoid loosing out on short user sessions.
changed the title [-]Browser Session envelope is sent directly at SDK init time, SDK overhead increases[/-][+]Browser Session envelope is sent directly at SDK init time, causing SDK overhead increases[/+]on Jun 26, 2026
Activity
linear-code commentedon Jun 26, 2026
JS-2876
[-]Browser Session envelope is sent directly at SDK init time, SDK overhead increases[/-][+]Browser Session envelope is sent directly at SDK init time, causing SDK overhead increases[/+]fix(browser): Defer sending session envelope until browser is idle (#…
github-actions commentedon Jul 1, 2026
A PR closing this issue has just been released 🚀
This issue was referenced by PR #21844, which was included in the 10.63.0 release.