Skip to content

Conversation

mydea
Copy link
Member

@mydea mydea commented Apr 20, 2023

This uses the new fixJson util to also truncate console log breadcrumbs for replay.

It adds a data._meta.warnings = ['CONSOLE_ARG_TRUNCATED'] to the breadcrumb if it has truncated at least one arg.

I also added a test that fails before this PR - it logs a massive object to the console, which leads to the test timing out previously, but works with this change.

Closes #7677
ref https://github.com/getsentry/team-replay/issues/67

@mydea mydea added Type: Bug Package: replay Issues related to the Sentry Replay SDK labels Apr 20, 2023
@mydea mydea requested review from AbhiPrasad, Lms24 and billyvg April 20, 2023 10:11
@mydea mydea self-assigned this Apr 20, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 20, 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.66 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.56 KB (-0.01% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 58.12 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 21.17 KB (0%)
@sentry/browser - Webpack (minified) 69.07 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.19 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 49.03 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 28.59 KB (+0.01% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.82 KB (+0.01% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 46.21 KB (+0.36% 🔺)
@sentry/replay - Webpack (gzipped + minified) 40.09 KB (+0.41% 🔺)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 65.07 KB (+0.25% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 58.05 KB (+0.27% 🔺)

@mydea mydea force-pushed the fn/truncate-console-breadcrumbs branch from ad13981 to 8295ecb Compare April 21, 2023 08:27
@mydea mydea force-pushed the fn/truncate-console-breadcrumbs branch 2 times, most recently from 1a8f4a9 to d2a86c5 Compare April 21, 2023 11:39
@mydea mydea force-pushed the fn/truncate-console-breadcrumbs branch from 8c578be to 6548ac9 Compare April 24, 2023 06:38
@mydea mydea merged commit 24a235d into develop Apr 24, 2023
@mydea mydea deleted the fn/truncate-console-breadcrumbs branch April 24, 2023 07:07
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.

Add truncation to console logs messages

3 participants