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

Expired sessions are not being recreated correctly leading to very long session durations #8400

Closed
billyvg opened this issue Jun 23, 2023 · 8 comments · Fixed by #8713
Closed
Assignees

Comments

@billyvg
Copy link
Member

billyvg commented Jun 23, 2023

Expired sessions are not correctly creating a new session, likely a regression due to #8258 (though this affects both buffered and session replays).

Take a look at Sentry's replays for an example (sort by duration desc).

@bruno-garcia
Copy link
Member

relates to: #8257

@billyvg billyvg changed the title Expired sessions are not being recreated correctly Expired sessions are not being recreated correctly leading to sessions over multiple days Jul 14, 2023
@billyvg billyvg changed the title Expired sessions are not being recreated correctly leading to sessions over multiple days Expired sessions are not being recreated correctly leading to very long session durations Jul 14, 2023
@billyvg
Copy link
Member Author

billyvg commented Jul 14, 2023

@mydea Still happening with 7.59 beta

@mydea
Copy link
Member

mydea commented Jul 17, 2023

@bruno-garcia
Copy link
Member

This is hopefully addressed with: #8596, right?
Have we validated it in SaaS?

@billyvg
Copy link
Member Author

billyvg commented Jul 24, 2023

@bruno-garcia It's still happening, we have a follow-up PR here #8617

@bruno-garcia
Copy link
Member

#8617 released on 7.61.0
Please reopen if this comes up again

@mydea mydea reopened this Aug 1, 2023
@mydea
Copy link
Member

mydea commented Aug 1, 2023

@markfrit
Copy link

markfrit commented Aug 1, 2023

Issue is still apparent

mydea added a commit that referenced this issue Aug 3, 2023
This streamlines & improves logging for replay status, adding more logs
for certain things to be better able to see what's going on, and
adapting the `traceInternals` setting to result in console breadcrumbs
being added (which should show up both in replay and for e.g. sentry
errors etc).

While at it I also fixed some `any` eslint warnings in replay.

ref: #8400
mydea added a commit that referenced this issue Aug 3, 2023
We haven't been persisting the `shouldRefresh` property of the session.
This combined with the fact that we do not update the `sampled` field on
the session to `session` when an error occurs, but keep it at `buffer`,
means that if a user reloads the page or the session is otherwise
re-fetched from sessionStorage, if previously an error occurs, we'll
keep buffering forever again (like for a "fresh" buffer session), and if
an error happens we convert it again to a `session` session, but since
the session ID was never updated this will be "added" to the previous
session instead.

I made a reproduction test that failed before and works after this fix.

Fixes #8400
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
5 participants