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(core): Move getSdkMetadataForEnvelopeHeader to utils #6527

Merged
merged 1 commit into from
Dec 14, 2022

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Dec 14, 2022

We want to use getSdkMetadataForEnvelopeHeader in Replay to not have duplicated minimal SDKInfo extraction logic. I checked that envelope helper functions are usually publicly exposed from the utils package only (which makes sense to me). So, this PR moves the function from core to utils and calls it in the replay envelope creation function.

Note that I changed the input type to accept both, an Event as well as SdkMetadata, as both have the sdk: SdkInfo property.

Since getSdkMetadataForEnvelopeHeader wasn't exported before, I think we don't have to worry about a breaking change here.

ref: #6366

@Lms24 Lms24 requested a review from mydea December 14, 2022 10:28
@Lms24 Lms24 added the Package: replay Issues related to the Sentry Replay SDK label Dec 14, 2022
Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one!

@Lms24 Lms24 enabled auto-merge (squash) December 14, 2022 10:35
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.72 KB (0%)
@sentry/browser - ES5 CDN Bundle (minified) 61.13 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.51 KB (-0.01% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 54.66 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.28 KB (0%)
@sentry/browser - Webpack (minified) 66.33 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.3 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.51 KB (+0.03% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.69 KB (+0.03% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.13 KB (-0.02% 🔽)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 41.87 KB (+0.1% 🔺)
@sentry/replay - Webpack (gzipped + minified) 38.1 KB (+0.05% 🔺)

@Lms24 Lms24 merged commit 402ccd7 into master Dec 14, 2022
@Lms24 Lms24 deleted the lms-envelopeHeadersSdkInfo branch December 14, 2022 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: replay Issues related to the Sentry Replay SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants