diff --git a/CHANGELOG.md b/CHANGELOG.md index 614883faa7eb..572f19a13b24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,27 @@ - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott +### Important Changes + +- **feat(browser): Add option to explicitly end pageload span via `reportPageLoaded()` ([#17697](https://github.com/getsentry/sentry-javascript/issues/17212))** + + With this release you can take manual control of ending the pageload span. Usually this span is ended automatically by the SDK, based on a period of inactivity after the initial page was loaded in the browser. If you want full control over the pageload duration, you can tell Sentry, when your page was fully loaded: + + ```js + Sentry.init({ + //... + integrations: [ + // 1. Enable manual pageload reporting + Sentry.browserTracingIntegration({ enableReportPageLoaded: true }), + ], + }); + + // 2. Whenever you decide the page is loaded, call: + Sentry.reportPageLoaded(); + ``` + + Note that if `Sentry.reportPageLoaded()` is not called within 30 seconds of the initial pageload (or whatever value the `finalTimeout` option is set to), the pageload span will be ended automatically. + ## 10.12.0 ### Important Changes