Skip to content

Conversation

@JPeer264
Copy link
Member

closes #18921
closes JS-1526

This adds a new mode option to the BrowserSessionIntegration.

New explained:

  • single: A session is created once when the page is loaded. Session is not updated on navigation. This is useful for webviews or single-page apps where URL changes should not trigger new sessions.
  • navigation (default): A session is created on page load and on every navigation change

The default is to navigation to not introduce any breaking change

Merge checklist

  • Add Sentry Docs issue to add this to the docs

@JPeer264 JPeer264 requested review from Lms24 and s1gr1d January 27, 2026 13:24
@JPeer264 JPeer264 self-assigned this Jan 27, 2026
@linear
Copy link

linear bot commented Jan 27, 2026

@JPeer264 JPeer264 force-pushed the jp/browser-session-mode branch from 6dae52a to 85aa5da Compare January 27, 2026 13:26
@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.34 kB +0.09% +22 B 🔺
@sentry/browser - with treeshaking flags 23.85 kB +0.08% +19 B 🔺
@sentry/browser (incl. Tracing) 42.14 kB +0.01% +3 B 🔺
@sentry/browser (incl. Tracing, Profiling) 46.78 kB +0.01% +3 B 🔺
@sentry/browser (incl. Tracing, Replay) 80.79 kB +0.05% +34 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 70.43 kB +0.04% +25 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 85.48 kB +0.03% +18 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 97.68 kB +0.03% +28 B 🔺
@sentry/browser (incl. Feedback) 42.05 kB +0.02% +5 B 🔺
@sentry/browser (incl. sendFeedback) 30.02 kB +0.04% +10 B 🔺
@sentry/browser (incl. FeedbackAsync) 35 kB -0.01% -3 B 🔽
@sentry/browser (incl. Metrics) 26.45 kB +0.08% +21 B 🔺
@sentry/browser (incl. Logs) 26.6 kB +0.1% +24 B 🔺
@sentry/browser (incl. Metrics & Logs) 27.27 kB +0.11% +29 B 🔺
@sentry/react 27.07 kB +0.08% +20 B 🔺
@sentry/react (incl. Tracing) 44.39 kB +0.06% +23 B 🔺
@sentry/vue 29.78 kB +0.07% +20 B 🔺
@sentry/vue (incl. Tracing) 43.95 kB +0.05% +21 B 🔺
@sentry/svelte 25.36 kB +0.1% +23 B 🔺
CDN Bundle 27.91 kB +0.08% +22 B 🔺
CDN Bundle (incl. Tracing) 42.95 kB +0.04% +16 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 43.77 kB +0.05% +19 B 🔺
CDN Bundle (incl. Tracing, Replay) 79.69 kB +0.02% +10 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 85.13 kB +0.02% +16 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 86.05 kB +0.03% +24 B 🔺
CDN Bundle - uncompressed 81.67 kB +0.09% +71 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 127.21 kB +0.06% +71 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 130.05 kB +0.06% +71 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 243.81 kB +0.03% +71 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 256.62 kB +0.03% +71 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 259.43 kB +0.03% +71 B 🔺
@sentry/nextjs (client) 46.75 kB +0.05% +19 B 🔺
@sentry/sveltekit (client) 42.53 kB +0.05% +19 B 🔺
@sentry/node-core 52.02 kB - -
@sentry/node 166.05 kB - -
@sentry/node - without tracing 93.79 kB - -
@sentry/aws-serverless 109.31 kB - -

View base workflow run

@JPeer264 JPeer264 force-pushed the jp/browser-session-mode branch from c45eae4 to 452d0c4 Compare January 27, 2026 16:39
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.

Sessions - Provide more options to control session creation

2 participants