Skip to content

fix(utils): Make empty traceparent string count as invalid #5731

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

Closed
wants to merge 1 commit into from

Conversation

lforst
Copy link
Contributor

@lforst lforst commented Sep 13, 2022

So far, an empty sentry-trace header counted as valid in the SDK, in a sense that the extractTraceparentData function still returned an object instead of undefined.

This PR changes the behavior so that an empty string is not counted as valid.

Unblocks #5710

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.53 KB (+0.01% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 60.3 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.12 KB (+0.01% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 53.22 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 19.91 KB (0%)
@sentry/browser - Webpack (minified) 64.61 KB (0%)
@sentry/react - Webpack (gzipped + minified) 19.93 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 44.98 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.1 KB (+0.02% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.48 KB (+0.02% 🔺)

@lforst
Copy link
Contributor Author

lforst commented Sep 14, 2022

This was too messy to do separately

@lforst lforst closed this Sep 14, 2022
@lforst lforst deleted the lforst-handle-empty-traceparentdata branch September 29, 2022 13:43
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.

1 participant