This repository was archived by the owner on Aug 30, 2023. It is now read-only.
feat: Only capture replays when errors happen#101
Merged
Conversation
028e1fd to
d4f5145
Compare
Member
Author
|
Closes #56 |
Member
Author
|
|
billyvg
added a commit
that referenced
this pull request
Jul 15, 2022
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 #101.
d4f5145 to
dbce118
Compare
This restores a previous functionality where we capture replays only when errors happen.
dbce118 to
87f6ef0
Compare
ryan953
approved these changes
Jul 20, 2022
Member
ryan953
left a comment
There was a problem hiding this comment.
The behavior to replace the other rrweb sdk!
Comment on lines
+84
to
+86
| document.dispatchEvent(new Event('visibilitychange')); | ||
|
|
||
| expect(replay).not.toHaveSentReplay(); |
Member
There was a problem hiding this comment.
should we call await new Promise(process.nextTick); to really match how it works in prod?
| afterAll(() => { | ||
| replay && replay.destroy(); | ||
| }); | ||
|
|
Member
There was a problem hiding this comment.
Another test case could be it('Does a full snapshot and clears the event buffer after a minute', () => ...
Member
Author
There was a problem hiding this comment.
It's tested here:
sentry-replay/src/eventBuffer.test.ts
Lines 109 to 110 in 848f9a2
Co-authored-by: Ryan Albrecht <ryan@ryanalbrecht.ca>
ryan953
approved these changes
Jul 21, 2022
mydea
pushed a commit
to getsentry/sentry-javascript
that referenced
this pull request
Nov 23, 2022
…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.
mydea
pushed a commit
to getsentry/sentry-javascript
that referenced
this pull request
Nov 23, 2022
…y#101) This restores a previous functionality where we capture replays only when errors happen.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 restores a previous functionality where we capture replays only when errors happen.