From 69c9f7824b61f9c0fbd33fcd9b918996cdd2534e Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Wed, 18 Feb 2026 09:24:22 +0100 Subject: [PATCH] feat(js/browser): Document new `lifecycle` option of `browserSessionIntegration` --- .../configuration/integrations/browsersession.mdx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/platforms/javascript/common/configuration/integrations/browsersession.mdx b/docs/platforms/javascript/common/configuration/integrations/browsersession.mdx index adef6df0e2d1e8..3b8bd83974ae30 100644 --- a/docs/platforms/javascript/common/configuration/integrations/browsersession.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/browsersession.mdx @@ -36,3 +36,14 @@ Sentry.init({ integrations: [Sentry.browserSessionIntegration()], }); ``` + +## Configuration Options + + + +Controls how long one session lasts and when a new session is started. + +- `'route'`: A new session is started when the route changes, based on the [History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API). This is the default behavior. If you're building a single-page application (SPA), this will result in one session being created per soft navigation. +- `'page'`: A new session is started when the page changes on a hard page reload or navigation. This is useful if you're building a single-page application (SPA) and want to track one session across multiple routes as users navigate through your application. + +