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

fix(node/browser): Set SDK info in client constructor #3279

Merged
merged 1 commit into from Mar 1, 2021

Conversation

lobsterkatie
Copy link
Member

Since #3177, SDK metadata (version, package name, etc) is set in Sentry.init(). This works great, except when you instantiate a client directly, as we tell people to do here. In that case, the data never gets set.

This moves that data-setting into the constructors of BrowserClient and NodeClient. That way, if anyone creates a client themselves, they get the data. To protect the data that's set in wrapper classes like @sentry/react and @sentry/serverless (data which continues to be set in .init()), the client constructors only set their data if there isn't already data there.

@github-actions
Copy link
Contributor

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 20.28 KB (+0.03% 🔺)
@sentry/browser - Webpack 21.18 KB (+0.02% 🔺)
@sentry/react - Webpack 21.22 KB (+0.07% 🔺)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 27.36 KB (-0.03% 🔽)

@ahmedetefy ahmedetefy self-requested a review March 1, 2021 14:09
@ahmedetefy ahmedetefy merged commit 79d0efc into master Mar 1, 2021
@ahmedetefy ahmedetefy deleted the kmclb-set-sdk-version-on-client branch March 1, 2021 14:11
This was referenced Mar 15, 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