Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

fix: Treat sessions with segmentId:0 as new session#271

Merged
billyvg merged 4 commits intomainfrom
fix/always-include-earliest-event-when-segment-0
Nov 4, 2022
Merged

fix: Treat sessions with segmentId:0 as new session#271
billyvg merged 4 commits intomainfrom
fix/always-include-earliest-event-when-segment-0

Conversation

@billyvg
Copy link
Copy Markdown
Member

@billyvg billyvg commented Nov 2, 2022

We have lots of replays that are missing replay_start_timestamp on segment 0. For some reason, some sessions with segmentId:0 are not being considered a "new" session. Ideally we would fix this but for now, add some debug logging and forcefully treat session as "new" if after loading a session, it still has segmentId:0.

I've gone ahead and removed the new session flag, as it's not needed, instead we can assume that segment 0 requires the start timestamp.

Fixes getsentry/sentry#40984

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 2, 2022

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
dist/index.js 33.63 KB (-0.08% 🔽) 673 ms (-0.08% 🔽) 30 ms (+259.01% 🔺) 703 ms

We have lots of replays that are missing `replay_start_timestamp` on segment 0. For some reason, some sessions with `segmentId:0` are not being considered a "new" session. Ideally we would fix this but for now, add some debug logging and forcefully treat session as "new" if after loading a session, it still has `segmentId:0`.
@billyvg billyvg force-pushed the fix/always-include-earliest-event-when-segment-0 branch from f8bbe46 to 570dd73 Compare November 2, 2022 22:18
@billyvg billyvg marked this pull request as ready for review November 2, 2022 22:39
@billyvg billyvg requested a review from a team November 2, 2022 22:39
@billyvg billyvg merged commit 3b36ffe into main Nov 4, 2022
@billyvg billyvg deleted the fix/always-include-earliest-event-when-segment-0 branch November 4, 2022 16:26
mydea pushed a commit to getsentry/sentry-javascript that referenced this pull request Nov 23, 2022
…ry-replay#271)

We have lots of replays that are missing `replay_start_timestamp` on
segment 0. For some reason, some sessions with `segmentId:0` are not
being considered a "new" session. ~Ideally we would fix this but for
now~, add some debug logging and forcefully treat session as "new" if
after loading a session, it still has `segmentId:0`.

I've gone ahead and removed the new session flag, as it's not needed,
instead we can assume that segment 0 requires the start timestamp.

Fixes getsentry/sentry#40984
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: missing replay from manually triggered error

2 participants