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: Optionally send sessions when they're created #715

Merged
merged 4 commits into from
Aug 8, 2023

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Aug 3, 2023

Closes #713

This PR adds an option to the MainProcessSession integration that forces sessions to be send immediately on creation. Apart from a few lines to add this option and call hub.captureSession() when enabled, the rest of the changes are to add all the additional session envelopes to the session e2e tests.

In the Electron main process:

import { init, Integrations } from '@sentry/electron';

init({
  dsn: '__DSN__',
  integrations: [new Integrations.MainProcessSession({ sendOnCreate: true })]
});

@timfish timfish marked this pull request as ready for review August 5, 2023 16:01
@timfish timfish requested a review from AbhiPrasad August 5, 2023 16:01
src/main/integrations/main-process-session.ts Outdated Show resolved Hide resolved
@timfish timfish merged commit 4072bd7 into getsentry:master Aug 8, 2023
40 checks passed
@timfish timfish deleted the feat/send-sessions-on-create branch August 8, 2023 10:45
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.

Sending initial session when created
2 participants