Lots of way too long (tens of hours) replays
Is there an existing issue for this?
- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- [x] I have reviewed the documentation https://docs.sentry.io/
- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
8.25.0
Framework Version
Next 14.2.12
Link to Sentry event
[redacted]
Reproduction Example/SDK Setup
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
release: process.env.NEXT_PUBLIC_SENTRY_RELEASE,
environment: djangoEnv,
tracesSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
replaysSessionSampleRate: 1.0,
tracePropagationTargets: djangoBackendUrls,
integrations: [
Sentry.browserTracingIntegration(),
Sentry.replayIntegration({
maskAllText: false,
blockAllMedia: false,
maskAllInputs: false,
networkDetailAllowUrls: djangoBackendUrls,
}),
],
beforeSend: (event, hint) => {
console.error(hint.originalException ?? hint.syntheticException);
if (process.env.NEXT_PUBLIC_SENTRY_DSN) {
return event;
} else {
// drop the event
return null;
}
},
beforeBreadcrumb: (breadcrumb, hint) => excludeGraphQLFetch(breadcrumb, hint),
});
Steps to Reproduce
We just see these come in all the time. This is a list of replays logged in the last seven days, ordered by duration. As you can see, some are almost 100 hours long:
Also, the replays themselves just show our loading screen for the entire replay.
Expected Result
All replays should be under an hour, and show normal activity.
Actual Result
See above.
Hi, thanks for reporting! we'll take a look
Just noting here that I'm upgrading to 8.33.x today and will report back whether https://github.com/getsentry/sentry-javascript/pull/13815 seems to fix the issue or not.
@alimony It's unlikely to fix your issue, i believe the actual problem is https://github.com/getsentry/sentry-javascript/issues/13872
@alimony Can you upgrade to 8.34.0 and see if this fixes your issue?
@billyvg I upgraded to 8.34.0 right at release, and I'm still seeing a few of these (three times in the past few days, one 1+ hour replay, one 2+ hours, and one 4+ hours). My sense is that it's fewer of them, and not the extremely long ones, but seems to be not 100% solved yet. I will monitor more.
@alimony thanks for the update! I just checked on your replay list and it seems there are only 4 replays left that exceed one hour in the last week – and it always seems to follow the same pattern that the replayId seems to be connected to a backend error that happened much later. We'll see if there is anything else we can find, please let us know if the issue persists in the upcoming days.
@chargome Looks like this is still happening because https://github.com/getsentry/sentry-javascript/pull/13893 only removed from DSC when replay is stopped by calling replay.stop(). There is still the case where replay should be expired, but an event hasn't happened to trigger it's expiry, and when it does happen, we simply return the event instead of resetting replay_id on DSC.
@alimony Can you update the SDK to the latest and see if this improves?
This should be fixed now, please open a new issue if you're still having problems!