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(replay): Send SDK version in Replay events #6814

Merged
merged 4 commits into from Jan 18, 2023
Merged

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jan 17, 2023

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 17, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.82 KB (0%)
@sentry/browser - ES5 CDN Bundle (minified) 61.47 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.5 KB (+0.01% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 54.77 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.21 KB (-0.05% 🔽)
@sentry/browser - Webpack (minified) 66.17 KB (+0.01% 🔺)
@sentry/react - Webpack (gzipped + minified) 20.24 KB (-0.01% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.48 KB (-0.07% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.74 KB (+0.03% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.03 KB (+0.04% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 43.12 KB (-0.82% 🔽)
@sentry/replay - Webpack (gzipped + minified) 37.83 KB (-2.6% 🔽)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 60.37 KB (-0.58% 🔽)

@Lms24 Lms24 requested review from mydea and billyvg January 17, 2023 10:32
@Lms24 Lms24 marked this pull request as ready for review January 17, 2023 10:32
version: __SENTRY_REPLAY_VERSION__,
name,
name: name || 'sentry.javascript.unknown',
version: version || '0.0.0',
Copy link
Member

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?

Copy link
Member Author

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:

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.

@Lms24 Lms24 enabled auto-merge (squash) January 18, 2023 12:43
@Lms24 Lms24 merged commit 1249496 into master Jan 18, 2023
@Lms24 Lms24 deleted the lms-replay-sdk-version branch January 18, 2023 13:04
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.

[Replay] Align Replay event metadata
2 participants