Skip to content

feat(replay): Add event to capture options on checkouts #8011

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

Merged
merged 11 commits into from
May 5, 2023

Conversation

billyvg
Copy link
Member

@billyvg billyvg commented May 2, 2023

Add a custom event that captures configuration options on checkout + segment 0.

Closes #7140
Closes #8004

@billyvg
Copy link
Member Author

billyvg commented May 2, 2023

@mydea Thoughts on this approach? Not sure if it's better here or when we flush

Comment on lines 123 to 124
networkRequestHeaders: options.networkRequestHeaders.length > 0,
networkResponseHeaders: options.networkResponseHeaders.length > 0,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
networkRequestHeaders: options.networkRequestHeaders.length > 0,
networkResponseHeaders: options.networkResponseHeaders.length > 0,
networkRequestHasHeaders: options.networkRequestHeaders.length > 0,
networkResponseHasHeaders: options.networkResponseHeaders.length > 0,

? for symmetry, maybe?

Copy link
Member

@ryan953 ryan953 May 2, 2023

Choose a reason for hiding this comment

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

I was looking at the config but maybe this changed...

It looks like req & resp either both have headers, bo both do not. But these two fields networkRequestHasHeaders and networkResponseHasHeaders makes it seem like there could be an XOR kind of case, where one has headers and the other doesn't?

Copy link
Member Author

Choose a reason for hiding this comment

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

@ryan953 yeah it's possible we have an XOR case

Copy link
Member

Choose a reason for hiding this comment

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

these fields tell us if users have configured additional headers for request/response.

@billyvg
Copy link
Member Author

billyvg commented May 2, 2023

Tests still need some work, it's going to be a bit annoying because it's testing against the stringified payload and ordering needs to be exact :(

@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 21.02 KB (+0.01% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 65.62 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.55 KB (-0.01% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 58.08 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 21.16 KB (0%)
@sentry/browser - Webpack (minified) 69.03 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.18 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 49.09 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 28.64 KB (+0.01% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.87 KB (0%)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 47.14 KB (+0.51% 🔺)
@sentry/replay - Webpack (gzipped + minified) 40.92 KB (+0.51% 🔺)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 66.03 KB (+0.36% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 58.92 KB (+0.4% 🔺)

billyvg added 4 commits May 4, 2023 20:23
Add a custom event that captures configuration options on checkout + segment 0.
@billyvg billyvg force-pushed the feat-replay-capture-sdk-settings-in-event branch from 7020963 to 16e575a Compare May 5, 2023 00:24
@billyvg billyvg requested a review from mydea May 5, 2023 00:28
@billyvg billyvg merged commit d400d69 into develop May 5, 2023
@billyvg billyvg deleted the feat-replay-capture-sdk-settings-in-event branch May 5, 2023 21:42
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.

Include network req/resp configuration in the rrweb payload + implement BODY_SKIPPED warning Add compression mode to replay event
3 participants