Skip to content
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

fix(browser): Minimum time for initial flush breaks replays for non-SPA #9301 #12293

Closed

Conversation

chetan-187
Copy link

fix(browser): Minimum time for initial flush breaks replays for non-SPA #9301

This implementation is completely dependent on browser functionality. At least this will save some replay events which were getting lost.

@mydea
Copy link
Member

mydea commented May 31, 2024

Sadly we cannot do this, because adding such a handler disables back-forward cache, which we don't want to do for all users by default.

We are currently looking into improving the replay experience for MPAs generally, which will include some way to set replay up easily that works well for MPAs.

You can add this handler yourself, or you could try to initialize replay like this:

replayIntegration({
  minReplayDuration: 0,
  flushMinDelay: 200,
  flushMaxDelay: 250,
})

Which should also work much better for a MPA. I've experimented a bit with this and this seemed to work reasonably well for me, even without the unload handler!

@chetan-187
Copy link
Author

chetan-187 commented May 31, 2024

No problem @mydea. Handling MPAs is always a tough one.
I have been looking into the sentry's code for the past weeks, there is always a learning curve to understand a new code base 🙌.

@mydea
Copy link
Member

mydea commented Jun 3, 2024

You can follow progress on this issue here: #9490 - it is on our radar to improve this! I'll close this in the meanwhile, we'll work on providing a better way to configure this in the near future!

@mydea mydea closed this Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants