Skip to content

Fix "empty" replays due to idle sessions + non-user initiated events #7352

Closed
@billyvg

Description

@billyvg

Problem

Currently for sentry.io, we're seeing lots of "empty" replays (no data in breadcrumbs/console/network). One such case where this happens is when users leave a tab open and go idle on a page that uses our relative timing component (i.e. "5 minutes ago"). This component is on a timed interval that updates the DOM and thus causes a mutation that causes Replay SDK to record an event and flush.

Solution

Lower idle timeout

In getsentry/sentry-replay#261, we implemented a timeout to pause recording until a click or navigation happens. This was set at MAX_SESSION_LIFE (30 minutes at the time, currently 60 minutes). We could use SESSION_IDLE_DURATION (currently: 5 minutes), (which actually just makes more sense now that I write this out). If we've already ended the session due to the 5 minute timeout, then we should wait for an un-idle™™ event to start a new session.

Metadata

Metadata

Assignees

Labels

Package: replayIssues related to the Sentry Replay SDK

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions