Skip to content

feat: Rework how we track sessions - #3224

Merged
HazAT merged 7 commits into
masterfrom
feat/rework-sessions
Feb 4, 2021
Merged

feat: Rework how we track sessions#3224
HazAT merged 7 commits into
masterfrom
feat/rework-sessions

Conversation

@HazAT

@HazATHazAT commented Feb 1, 2021

Copy link
Copy Markdown
Member

How we track session now:

  • We create a session on page load
  • We send the session with init: true and status: ok -> After sending the session switches to init: false in the scope
  • If there is a handled error, we increment error: +1 and send the update
  • If there is an unhandled error, we increment error: +1, set status: crashed and send the update
  • On navigation changes, we end the previous session
    -- If the Session was status: crashed it stays status: crashed
    -- If the Session was status: ok it will be changed to status: exited

@github-actions

github-actionsBot commented Feb 1, 2021

Copy link
Copy Markdown
Contributor

size-limit report

PathSize
@sentry/browser - CDN Bundle (gzipped)20.23 KB (-0.55% 🔽)
@sentry/browser - Webpack21.14 KB (-0.4% 🔽)
@sentry/react - Webpack21.16 KB (-0.41% 🔽)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped)27.26 KB (-0.08% 🔽)

@lobsterkatielobsterkatie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some naming questions (you know me!). Also, do we have any tests covering this?

Otherwise, looks good. 🙂

Comment threadpackages/hub/src/hub.ts Outdated
Comment threadpackages/hub/src/hub.ts Outdated
Comment threadpackages/browser/src/sdk.ts Outdated
Comment threadpackages/browser/src/sdk.ts Outdated
@HazAT

HazAT commented Feb 2, 2021

Copy link
Copy Markdown
MemberAuthor

I will prepare a beta release from this branch so we can test it on sentry.io

@lobsterkatielobsterkatie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@HazAT

HazAT commented Feb 2, 2021

Copy link
Copy Markdown
MemberAuthor

sentry.io PR
getsentry/sentry#23538

This was referenced Mar 14, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@HazAT@lobsterkatie