feat(replay): Migrate sentry-replay into monorepo#6270
Merged
Conversation
…sentry/sentry-replay#75) * Remove `@sentry/tracing` * Clean up peer deps * Upgrade `rollup-plugin-resolve-node` (deprecated) to `@rollup/plugin-resolve-node`
We were still looking for transactions for the root event, but they are normal events now.
…sentry-replay#82) This moves the core SDK instrumentation handlers into the main plugin class as the typings are more accurate and allows better testing of the handler data transforms as well.
Refactor this handler so that we can re-use `addReplayEvent`. This will help us apply the same logic for our core SDK instrumentation handlers.
…ntry-replay#83) Previously we did not create replay events after receiving new updates from core SDK (e.g. breadcrumbs) -- they only get flushed after an rrweb event. This causes breadcrumbs to be attached to a new session instead of the previous session. e.g. old session -> breadcrumbs -> <idle> (no upload happens) --> new session -> rrweb checkout -> upload (with old breadcrumbs) Fixes getsentry/sentry-replay#79
Adds an explicit breadcrumb for when a page is unloaded
Add an EventBuffer that compresses events in a webworker.
This would provide a better interface for the session. This fixes/simplifies updating the session directly where previously it would not save to storage, only the session "instance" (object).
This is useful/needed for M1 arch.
…ION` (getsentry/sentry-replay#98) We are noticing a lot of short sessions that I suspect is related to the visibility change timeout. Keeping the code around and changing the constants in case we decide to tweak this later.
…y#94) Adds breadcrumbs when user blurs/focuses the page. 
…ry-replay#102) We're going to axe the "visible" breadcrumb, as it is a point of confusion for users (i.e. what is the difference between blur/focus and visibility?) We will be able to get the information we need with focus/blur alone.
…y-replay#108) * Move `@sentry/browser` to devDeps as it is only used in tests. * Import from `@sentry/core` instead of `@sentry/browser` * Clean up type imports from `@sentry/hub`
…ay#106) I suspect we have a lot of "empty" replays due to this issue where we are immediately creating the root replay event. This had the possibility of having a replay w/ no recording events. Unfortunately, after some testing, a lot of short replays still get through because we immediately flush updates after a full DOM checkout. However, this is still needed in order to implement getsentry/sentry-replay#101.
…rong (getsentry/sentry-replay#110) * `captureReplay` needs to happen before `sendReplay` * `captureEvent` should only happen after a *successful* `sendReplay` * fix `sendReplay` promises where it now awaits the retries before resolving
Change the logic for when to flush after a full snapshot checkout. Add option `initialFlushDelay` to control when to flush. Do NOT flush on checkout after a session has expired. It will need to wait for additional user actions before recording the new sessions replay.
Contributor
|
So we are going to rebase and merge onto the repo right? |
Member
Author
|
To log this here, we explored the different options, and basically merging via merge commit is the only really feasible one. Squashing would lose all git history of replay. So we will merge in from an orphaned branch. This is what this will look like: |
4f4daa0 to
59e433a
Compare
2c7735b to
7983964
Compare
(not perfect, declaration files are stil not in the right spot)
7983964 to
a005fbf
Compare
Contributor
size-limit report 📦
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR migrates the whole code from https://github.com/getsentry/sentry-replay into the monorepo.
Note:
Closes #6257