-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(replay): Send SDK version in Replay events #6814
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
Conversation
size-limit report 📦
|
5f4da9e
to
a8a1cea
Compare
version: __SENTRY_REPLAY_VERSION__, | ||
name, | ||
name: name || 'sentry.javascript.unknown', | ||
version: version || '0.0.0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be sure, version
will already have been replaced somewhere else here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, version
is set automatically during SDK initialization:
sentry-javascript/packages/react/src/sdk.ts
Lines 9 to 16 in 6557844
options._metadata.sdk = options._metadata.sdk || { | |
name: 'sentry.javascript.react', | |
packages: [ | |
{ | |
name: 'npm:@sentry/react', | |
version: SDK_VERSION, | |
}, | |
], |
The reason for providing the fallback here is that users can potentially delete it or use a custom or an old client that doesn't yet have getSdkMetadata
.
a8a1cea
to
18146a7
Compare
Since we now export Replay via the Browser SDK we can now send the SDK version instead of the Replay package.json version, allowing us to get rid of the custom rollup config to inject said version.
closes #6366