-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(replay): Migrate sentry-replay
into monorepo
#6270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 🚀 🚀
So we are going to rebase and merge onto the repo right? |
} | ||
|
||
set previousSessionId(id: string | undefined) { | ||
this._previousSessionId = id; |
Check failure
Code scanning / CodeQL
Insecure randomness
} | ||
|
||
if (session.id !== this.session?.id) { | ||
session.previousSessionId = this.session?.id; |
Check failure
Code scanning / CodeQL
Insecure randomness
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
size-limit report 📦
|
This PR migrates the whole code from https://github.com/getsentry/sentry-replay into the monorepo.
Note:
Closes #6257