Skip to content

Commit ee4ed05

Browse files
authored
chore(repo): Add changelog entry for reportPageLoaded (#17724)
1 parent 0e0c711 commit ee4ed05

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@
44

55
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
66

7+
### Important Changes
8+
9+
- **feat(browser): Add option to explicitly end pageload span via `reportPageLoaded()` ([#17697](https://github.com/getsentry/sentry-javascript/issues/17212))**
10+
11+
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:
12+
13+
```js
14+
Sentry.init({
15+
//...
16+
integrations: [
17+
// 1. Enable manual pageload reporting
18+
Sentry.browserTracingIntegration({ enableReportPageLoaded: true }),
19+
],
20+
});
21+
22+
// 2. Whenever you decide the page is loaded, call:
23+
Sentry.reportPageLoaded();
24+
```
25+
26+
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.
27+
728
## 10.12.0
829

930
### Important Changes

0 commit comments

Comments
 (0)