-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(browser): Export
Replay
integration from Browser SDK (#6508)
Export the `Replay` integration from `@sentry/replay` in `@sentry/browser`. This will eliminate the need for users to separately install the `@sentry/replay` package as they have to do right now. Instead, they can just use Replay like it's part of the core Browser SDK or any FE Framework SDK that builds on top of Browser: ```js import * as Sentry from '@sentry/browser'; // or @sentry/react, ... Sentry.init({ // dsn, other options, etc replaysSessionSampleRate: 0.1, replaysOnErrorSampleRate: 1.0, integrations: [new Sentry.Replay()] }); ``` Alternatively, `import { Replay } from '@sentry/browser'` works, too. Note: This does not affect users who imported the integration from `@sentry/replay` so it should be fully backwards compatible.
- Loading branch information
Showing
12 changed files
with
93 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Options added to the Browser SDK's init options that are specific for Replay. | ||
* Note: This type was moved to @sentry/types to avoid a circular dependency between Browser and Replay. | ||
*/ | ||
export type BrowserClientReplayOptions = { | ||
/** | ||
* The sample rate for session-long replays. | ||
* 1.0 will record all sessions and 0 will record none. | ||
*/ | ||
replaysSessionSampleRate?: number; | ||
|
||
/** | ||
* The sample rate for sessions that has had an error occur. | ||
* This is independent of `sessionSampleRate`. | ||
* 1.0 will record all sessions and 0 will record none. | ||
*/ | ||
replaysOnErrorSampleRate?: number; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters