Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Self-hosted/on-premise
Which SDK are you using?
@sentry/nextjs
SDK Version
9.34.0
Framework Version
react: 18.2.0, next: 14.2.20
Link to Sentry event
No response
Reproduction Example/SDK Setup
Sentry.init({
replaysSessionSampleRate: 0,
replaysOnErrorSampleRate: 1.0,
integrations: [
Sentry.replayIntegration({
flushMinDelay: 1000, // 1s
flushMaxDelay: 1000 * 5, // 5s
maskAllText: true,
maskAllInputs: true,
blockAllMedia: true,
useCompression: true,
maxReplayDuration: 1000 * 60 * 2, // 2 minutes
}),
],
}); Steps to Reproduce
- Configure Sentry with error-based replay only:
replaysSessionSampleRate: 0replaysOnErrorSampleRate: 1.0maxReplayDuration: 120000(2 minutes)
- User opens browser tab
- Error occurs → replay starts
- User keeps tab open for extended period
- Another error occurs hours later
Expected Result
Replay should stop after maxReplayDuration (2 minutes)
Actual Result
Replay recorded for 639 minutes (10+ hours), far exceeding maxReplayDuration
Additional Context
Related Issues
- Lots of way too long (tens of hours) replays #13778 - Similar symptom (very long replays)
- DSC can cause replay durations to be inaccurate and exceed the replay limit #13872 - Previous fix for DSC replay_id issue (already included in 9.34.0)
Additional Context
- replaysSessionSampleRate: 0 - Only error-based replay is enabled
- maxReplayDuration is set to 2 minutes but completely ignored
- The replay spans two errors that occurred ~10 hours apart
- It seems like maxReplayDuration is not being enforced when in buffer mode that transitions to session mode after an error
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsWaiting for: Community
Activity
linear commentedon Jan 13, 2026
JS-1447
andreiborza commentedon Jan 13, 2026
Hi @newminkyung, thanks for writing in.
We'll take a look.
andreiborza commentedon Jan 13, 2026
Just one follow-up question: Are the replays that long or is this maybe just an UI issue inside Sentry?
newminkyung commentedon Jan 13, 2026
@andreiborza
TL;DR
This is NOT a UI display issue. The replay session:
maxReplayDuration: 120000(2 min) was completely ignoredThe bug appears to be:
maxReplayDurationis not enforced when the session is idle after transitioning from buffer mode to session mode on error.Here's the details:
1. Timeline Analysis
2. Activity Pattern
3. What the data shows
andreiborza commentedon Jan 14, 2026
Okay, thanks for the extra context.
Could you also try upgrading Sentry to latest 10.33.0?
The migration from v9 to v10 should be pretty low-effort: https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md but it comes with a bunch of replay fixes that accumulated over the time. In most cases this is just bumping your package to v10.
25 remaining items
newminkyung commentedon Jan 20, 2026
@andreiborza
I'm also experiencing this issue on @sentry/nextjs v10.23.0.
Configuration
I found a replay that recorded for 2 hours 20 minutes (02:20:39) despite maxReplayDuration being configured
andreiborza commentedon Jan 20, 2026
@newminkyung can you upgrade that one to the latest v10?
getsantry commentedon Feb 12, 2026
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you remove the label
Waiting for: Community, I will leave it alone ... forever!"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀