Skip to content

addBreadcrumb needs a defined depth for serialization #2311

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
5 of 9 tasks
codeocelot opened this issue Nov 13, 2019 · 0 comments · Fixed by #2404
Closed
5 of 9 tasks

addBreadcrumb needs a defined depth for serialization #2311

codeocelot opened this issue Nov 13, 2019 · 0 comments · Fixed by #2404

Comments

@codeocelot
Copy link

codeocelot commented Nov 13, 2019

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other:

Version:

5.8.0

Description

Serializing a large object with addBreadcrumb can immobilize an application very quickly. Demonstration . Here I'm just using React to create me a fairly large component tree and getting Sentry to serialize it via addBreadcrumb. The result is a quasi-infinite loop where the app becomes completely unusable for as long as I've cared to stare at a blank screen.

The fix is pretty straightforward. When addBreadcrumb calls normalize, simply pass in a reasonable depth parameter. The docs do say that the breadcrumb fields should all be strings (data being a map of strings) so I don't feel this should constrain user expectations and the benefits of avoiding locking the application are a noble reason to add this limitation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant