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

feat: Rework how we track sessions #3224

Merged
merged 7 commits into from Feb 4, 2021
Merged

feat: Rework how we track sessions #3224

merged 7 commits into from Feb 4, 2021

Conversation

HazAT
Copy link
Member

@HazAT HazAT commented Feb 1, 2021

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
Copy link
Contributor

github-actions bot commented Feb 1, 2021

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 20.23 KB (-0.55% 🔽)
@sentry/browser - Webpack 21.14 KB (-0.4% 🔽)
@sentry/react - Webpack 21.16 KB (-0.41% 🔽)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 27.26 KB (-0.08% 🔽)

Copy link
Member

@lobsterkatie lobsterkatie left a comment

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. 🙂

packages/hub/src/hub.ts Outdated Show resolved Hide resolved
packages/hub/src/hub.ts Outdated Show resolved Hide resolved
packages/browser/src/sdk.ts Outdated Show resolved Hide resolved
packages/browser/src/sdk.ts Outdated Show resolved Hide resolved
@HazAT
Copy link
Member Author

HazAT commented Feb 2, 2021

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

Copy link
Member

@lobsterkatie lobsterkatie left a comment

Choose a reason for hiding this comment

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

👍🏻

@HazAT
Copy link
Member Author

HazAT commented Feb 2, 2021

sentry.io PR
getsentry/sentry#23538

This was referenced Mar 14, 2021
Sign up for free to 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.

None yet

2 participants