Skip to content

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

3 participants