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

feat(replay): Capture fetch body size for replay events #7524

Merged
merged 4 commits into from Mar 22, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Mar 20, 2023

This adjusts the replay request body capturing to capture the fetch body size if no Content-Length header is present.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.44 KB (+0.01% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 63.52 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.13 KB (+0.01% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 56.57 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 21.59 KB (0%)
@sentry/browser - Webpack (minified) 71.65 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.61 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 51.85 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 27.77 KB (0%)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.08 KB (0%)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 44.3 KB (+0.2% 🔺)
@sentry/replay - Webpack (gzipped + minified) 38.36 KB (+0.21% 🔺)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 62.49 KB (+0.15% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 56.03 KB (+0.16% 🔺)

@billyvg
Copy link
Member

billyvg commented Mar 20, 2023

Tested this on my local Sentry and it works - though I do want to note that the sizes are slightly off from the browser which shows the size over the network (which I assume is smaller due to compression). Thoughts on the best way to inform users on the UI here since we display the "resource size" that is on the tooltip vs "transferred over the network".

image

@mydea
Copy link
Member Author

mydea commented Mar 21, 2023

Tested this on my local Sentry and it works - though I do want to note that the sizes are slightly off from the browser which shows the size over the network (which I assume is smaller due to compression). Thoughts on the best way to inform users on the UI here since we display the "resource size" that is on the tooltip vs "transferred over the network".

image

It may also differ because I guess the network tab includes header etc. data into the size, maybe? But even if not it could def. be slightly different, hard to say how exactly that is calculated..!

@mydea mydea force-pushed the fn/replay-bundle-size branch 3 times, most recently from 9bcd880 to 45b1660 Compare March 22, 2023 11:33
@mydea mydea merged commit 21dd20d into develop Mar 22, 2023
48 of 49 checks passed
@mydea mydea deleted the fn/replay-bundle-size branch March 22, 2023 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants