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

Increasing the inactivity threshold in Sentry Replays #7942

Closed
cristianpoleyJS opened this issue Apr 24, 2023 · 6 comments · Fixed by #7955
Closed

Increasing the inactivity threshold in Sentry Replays #7942

cristianpoleyJS opened this issue Apr 24, 2023 · 6 comments · Fixed by #7955
Assignees
Labels
Package: replay Issues related to the Sentry Replay SDK Type: Bug

Comments

@cristianpoleyJS
Copy link

Problem Statement

Our previous provider (Fullstory), the inactivity time was 30 minutes but in Sentry Replays this setting is not configurable and as it is only 5 minutes so we are creating many more Replays than we need, so many Replays are simply "access the application again and close it".

Here is an example: link to Sentry Replay example (I guess you will be able to see it somehow, let me know if you need to).

Solution Brainstorm

To be able to have a new configuration within Sentry to be able to modify the downtime.

@mydea
Copy link
Member

mydea commented Apr 24, 2023

Hi @cristianpoleyJS, thanks for writing in!

I am not quite sure I understand the problem, though. From looking at the replay you linked, I see a replay that has a duration of ~2:40 minutes. Is something missing at the start, or the end of this?

How it should be behaving right now (and I assume we are talking about a session-sampled session via replaysSessionSampleRate, not an error-sampled session via replaysOnErrorSampleRate), is that it just pauses the replay when inactive for 5 minutes, but resumes it when a user comes back later, unless a total duration of 60min is exceeded.

@mydea mydea self-assigned this Apr 24, 2023
@mydea mydea added the Package: replay Issues related to the Sentry Replay SDK label Apr 24, 2023
@cristianpoleyJS
Copy link
Author

cristianpoleyJS commented Apr 24, 2023

Hi @mydea , thanks for the quick reply.

We have just checked if the current behaviour you mentioned works and it seems that it doesn't (maybe some configuration is missing on our side). I'm going to split it in parts:

  • fields config
  replaysSessionSampleRate: 1.0,
  replaysOnErrorSampleRate: 1.0
  • I access the application at 13:19 GMT+0200 (this Replay is created).
  • I check the started field stored in the sessionStorage and it has the date 13:19 GMT+0200
  • I do not access that window again for 50 minutes.
  • I access the window again and change the route at 14:05 GMT+0200 (before the 60 minutes expire).
  • A new session has been generated with the following data (this Replay is created):
{
     "id":"2b401628344747348b111fe5aedf4b72",
     "started":1682337957535,
     "lastActivity":1682337976487,  // is a bit different to `started` because I kept navigating (without reloading) before looking at the sessionStorage
     "segmentId":6,
     "sampled":"session",
     "previousSessionId":"98a91345dc4e4ed1880d2e1532234095"
}

As you can see, the started field now reads Mon Apr 24 2023 14:05:57 GMT+0200.

So basically this is our problem. More sessions are being generated than expected, so if the 60 minutes you are talking about would work, I think it would help us.

@mydea
Copy link
Member

mydea commented Apr 24, 2023

Thank you for the detailed report! We'll have a look at this and make sure that this behaves as expected/as it should!

@mydea
Copy link
Member

mydea commented Apr 25, 2023

Hello,

we will update the inactivity threshold to 15min - see #7955. This should hopefully alleviate this issue!

@mydea
Copy link
Member

mydea commented Apr 27, 2023

Hey @cristianpoleyJS ,

in 7.50.0, the idle timeout has been extended to 15 minutes!

@cristianpoleyJS
Copy link
Author

Thanks @mydea & team! that will help to reduce the number of replays

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: replay Issues related to the Sentry Replay SDK Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants