feat(replay): Change the behavior of error-based sampling#7768
Merged
feat(replay): Change the behavior of error-based sampling#7768
Conversation
`stop()` will now flush the eventBuffer before clearing it, as well as removing the session from Session Storage. Due to the flushing, `stop()` is now async. Ref: #7738
billyvg
commented
Apr 5, 2023
Contributor
size-limit report 📦
|
1e7f0eb to
1412dec
Compare
128338f to
e954fe0
Compare
mydea
reviewed
Apr 19, 2023
mydea
reviewed
Apr 19, 2023
mydea
reviewed
Apr 19, 2023
mydea
reviewed
Apr 19, 2023
mydea
reviewed
Apr 19, 2023
mydea
reviewed
Apr 21, 2023
ca4d679 to
de5607d
Compare
…replay-change-sampling-logic
billyvg
commented
Apr 25, 2023
mydea
reviewed
Apr 25, 2023
packages/browser-integration-tests/suites/replay/bufferMode/test.ts
Outdated
Show resolved
Hide resolved
mydea
reviewed
Apr 25, 2023
packages/browser-integration-tests/suites/replay/bufferMode/test.ts
Outdated
Show resolved
Hide resolved
mydea
reviewed
Apr 25, 2023
mydea
reviewed
Apr 25, 2023
| return { type: 'saved', session }; | ||
| } else if (session.sampled === 'error') { | ||
| // Error samples should not be re-created when expired, but instead we stop when the replay is done | ||
| } else if (!session.shouldRefresh) { |
Member
There was a problem hiding this comment.
The only thing, just to make this sure and clear, is that this means that when an error session expires without an error happened, it could be re-started as a session-session, right? So we may sample it and start sending data once the session resumes. IMHO that's OK, just wanting to be explicit in behavior!
mydea
reviewed
Apr 25, 2023
mydea
approved these changes
Apr 25, 2023
Member
mydea
left a comment
There was a problem hiding this comment.
Great change! Left a few comments but all very low importance, just small nitpicks. Looking great 🚀
Base automatically changed from
feat-replay-change-stop-flush-clear-session
to
develop
April 26, 2023 08:54
97cd546 to
d7554b8
Compare
This was referenced May 1, 2023
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.
startBuffering()API to begin replay buffering. This is useful if you turn offreplaysSessionSampleRateandreplaysOnErrorSampleRateand want to manually decide when to start replay buffering. You can then callflush()to save the replay.Closes #7735 #7744 #7193 #6537