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
docs(replay): Add CDN bundle instructions to README (#6431)
Add a subsection about CDN bundle installation and usage.
The only thing that's different in this doc compared to a normal integration CDN bundle doc on [Sentry docs](https://docs.sentry.io/platforms/javascript/install/cdn/#available-bundles) is that I can't specify the `integrity` attribute in the script tag because we can't automatically get the correct checksum in the Readme. I opted to leave it out and add a sentence that links people to our CDN bundle checksum table.
Copy file name to clipboardExpand all lines: packages/replay/README.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,8 @@ Make sure to use the exact same version of `@sentry/replay` as your other Sentry
22
22
23
23
## Installation
24
24
25
+
Install the Replay package with NPM or your favourite package manager. Alternatively, you can load the Replay integration via a [CDN bundle](#loading-replay-as-a-cdn-bundle).
// Add Sentry.Integrations.Replay to your Sentry.init call
112
+
Sentry.init({
113
+
// This sets the sample rate to be 10%. You may want this to be 100% while
114
+
// in development and sample at a lower rate in production
115
+
replaysSessionSampleRate:0.1,
116
+
117
+
// If the entire session is not sampled, use the below sample rate to sample
118
+
// sessions when an error occurs.
119
+
replaysOnErrorSampleRate:1.0,
120
+
121
+
dsn:'__DSN__',
122
+
integrations: [newSentry.Integrations.Replay()],
123
+
});
124
+
```
125
+
126
+
The Replay initilialization [configuration](#configuration) options are identical to the options of the NPM package.
127
+
128
+
Please visit our [CDN bundle docs](https://docs.sentry.io/platforms/javascript/install/cdn/#available-bundles) to get the correct `integrity` checksums for your version.
129
+
Note that the two bundle versions always have to match.
130
+
90
131
## Sessions
91
132
92
133
A session starts when the Session Replay SDK is first loaded and initialized. The session will continue until 5 minutes passes without any user interactions[^1] with the application *OR* until a maximum of 30 minutes have elapsed. Closing the browser tab will end the session immediately according to the rules for [SessionStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage).
0 commit comments