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

ref: Export Session class from core/browser/node #4508

Merged
merged 1 commit into from Feb 7, 2022
Merged

Conversation

kamilogorek
Copy link
Contributor

@kamilogorek kamilogorek commented Feb 7, 2022

This makes it possible to write hub-less code like:

const release = `${inputs.repo}@${inputs.version}`;
const client = new Sentry.NodeClient({
  dsn: process.env.SENTRY_DSN,
  release
});
const session = new Sentry.Session({
  status: 'crashed',
  release
});

client.captureMessage(`Release failed: ${inputs.repo}`);
client.captureSession(session);

instead of going through const session = Sentry.getCurrentHub().startSession({ ... })

@kamilogorek kamilogorek requested review from a team, lobsterkatie and AbhiPrasad and removed request for a team February 7, 2022 11:05
@kamilogorek kamilogorek enabled auto-merge (squash) February 7, 2022 11:13
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2022

size-limit report

Path Base Size (d898730) Current Size Change
@sentry/browser - CDN Bundle (gzipped) 19.68 KB 19.69 KB +0.04% 🔺
@sentry/browser - CDN Bundle (minified) 62.89 KB 62.91 KB +0.03% 🔺
@sentry/browser - Webpack 22.21 KB 22.21 KB 0%
@sentry/browser - Webpack - gzip = false 76.02 KB 76.02 KB 0%
@sentry/react - Webpack 22.24 KB 22.24 KB 0%
@sentry/nextjs Client - Webpack 46.24 KB 46.31 KB +0.17% 🔺
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 28.22 KB 28.23 KB +0.02% 🔺

@kamilogorek kamilogorek merged commit 6fbec97 into master Feb 7, 2022
@kamilogorek kamilogorek deleted the export-session branch February 7, 2022 11:21
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