Skip to content

Commit 711bb7d

Browse files
authored
docs(replay): Add MIGRATION.md & add badges to README.md (#6405)
1 parent c93f605 commit 711bb7d

File tree

3 files changed

+70
-2
lines changed

3 files changed

+70
-2
lines changed

MIGRATION.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ This is no longer used.
1616

1717
This release deprecates `@sentry/hub` and all of it's exports. All of the `@sentry/hub` exports have moved to `@sentry/core`. `@sentry/hub` will be removed in the next major release.
1818

19+
# Upgrading Sentry Replay (beta, 7.24.0)
20+
21+
For details on upgrading Replay in its beta phase, please view the [dedicated Replay MIGRATION docs](./packages/replay/MIGRATION.md).
22+
1923
# Upgrading from 6.x to 7.x
2024

2125
The main goal of version 7 is to reduce bundle size. This version is breaking because we removed deprecated APIs, upgraded our build tooling, and restructured npm package contents.

packages/replay/MIGRATION.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Upgrading Replay from 0.6.x to 7.24.0
2+
3+
The Sentry Replay integration was moved to the Sentry JavaScript SDK monorepo. Hence we're jumping from version 0.x to the monorepo's 7.x version which is shared across all JS SDK packages.
4+
5+
## Replay sample rates are defined on top level (https://github.com/getsentry/sentry-javascript/issues/6351)
6+
7+
Instead of defining the sample rates on the integration like this:
8+
9+
```js
10+
Sentry.init({
11+
dsn: '__DSN__',
12+
integrations: [
13+
new Replay({
14+
sessionSampleRate: 0.1,
15+
errorSampleRate: 1.0,
16+
})
17+
],
18+
// ...
19+
});
20+
```
21+
22+
They are now defined on the top level of the SDK:
23+
24+
```js
25+
Sentry.init({
26+
dsn: '__DSN__',
27+
replaysSampleRate: 0.1,
28+
replaysOnErrorSampleRate: 1.0,
29+
integrations: [
30+
new Replay({
31+
// other replay config still goes in here
32+
})
33+
],
34+
});
35+
```
36+
37+
Note that the sample rate options inside of `new Replay({})` have been deprecated and will be removed in a future update.
38+
39+
## Removed deprecated options (https://github.com/getsentry/sentry-javascript/pull/6370)
40+
41+
Two options, which have been deprecated for some time, have been removed:
42+
43+
* `replaysSamplingRate` - instead use `sessionSampleRate`
44+
* `captureOnlyOnError` - instead use `errorSampleRate`
45+
46+
## New NPM package structure (https://github.com/getsentry/sentry-javascript/issues/6280)
47+
48+
The internal structure of the npm package has changed. This is unlikely to affect you, unless you have imported something from e.g.:
49+
50+
```js
51+
import something from '@sentry/replay/submodule';
52+
```
53+
54+
If you only imported from `@sentry/replay`, this will not affect you.

packages/replay/README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
1+
<p align="center">
2+
<a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
3+
<img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84">
4+
</a>
5+
</p>
6+
17
# Sentry Session Replay
28

3-
Note: Session Replay is currently in beta.
9+
[![npm version](https://img.shields.io/npm/v/@sentry/replay.svg)](https://www.npmjs.com/package/@sentry/replay)
10+
[![npm dm](https://img.shields.io/npm/dm/@sentry/replay.svg)](https://www.npmjs.com/package/@sentry/replay)
11+
[![npm dt](https://img.shields.io/npm/dt/@sentry/replay.svg)](https://www.npmjs.com/package/@sentry/replay)
12+
13+
**Note: Session Replay is currently in beta.** Functionality may change outside of major version bumps - while we try our best to avoid any breaking changes, semver cannot be guaranteed before Replay is out of beta. You can find more information about upgrading in [MIGRATION.md](./MIGRATION.md).
414

515
## Pre-requisites
616

7-
For the sentry-replay integration to work, you must have the [Sentry browser SDK package](https://www.npmjs.com/package/@sentry/browser), or an equivalent framework SDK (e.g. [@sentry/react](https://www.npmjs.com/package/@sentry/react)) installed. The minimum version required for the SDK is `7.23.0`.
17+
For the sentry-replay integration to work, you must have the [Sentry browser SDK package](https://www.npmjs.com/package/@sentry/browser), or an equivalent framework SDK (e.g. [@sentry/react](https://www.npmjs.com/package/@sentry/react)) installed. The minimum version required for the SDK is `7.24.0`.
818

919
Make sure to use the exact same version of `@sentry/replay` as your other Sentry package(s), e.g. `@sentry/browser` or `@sentry/react`.
1020

0 commit comments

Comments
 (0)