-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Breadcrumbs stringify object #623
Comments
Rendering objects as expandable tree structures would be nice too! |
Breadcrumbs are intentionally designed to be lightweight "hints" ... we want to avoid just straight-up rendering big trees of embedded data. There is a payload data limit. |
Sounds super risky. We've found other 3rd party scripts wrapping console.log and trying to stringify DOM elements or other large/cyclical structures; leading to performance degradation or errors. You are free to record more complex info in your own app then append it to the reported messages via the |
Disagree. Chrome is doing it in improved console.log since 60/61, it can be "safe". |
+1 |
We can utilize my node serializer here maybe. We'll see. |
Wait, what?! I'm confused as Sentry is logging my console logs automatically. But then it logs everything as useless But for everybody else who ends up in this thread wondering how to fix this, there's a simple solution: Set the |
There's nothing stopping you from doing a correct However, right now we have a breadcrumb hints that allows users to change this behavior with ease: #1401 (comment) |
I got various function calls wrapped with Sentry.wrap() and all I got in the event is: console | XYZfunction,[object Object],[object Object] breadcrumb. Could someone please provide an example of how to extend useless [object Object] info? |
Sentry.init({
dsn: '__PUBLIC_DSN__',
normalizeDepth: 5 // or whatever depths suits your needs
}) |
Thx @kamilogorek, what is the default? Zero? |
It's |
@kamilogorek Hi there! Would be awesome to have object representation of a sort in the breadcrumbs on the UI. A blob of text is not really perceivable... Also, LogRocket doesn't impose any restriction on the payload size for example, which is sweet, I could log all my redux actions we ease) Not complaining, but they somehow managed the payload size problem, some binary voodoo we diffs |
There's a Sentry.addBreadcrumb({
category: "xhr",
data: {
key1: {
data: "fields",
answer: 42,
},
key2: {
ok: "yes",
question: 2020,
},
key3: {
other: "field",
answer: 1337,
},
},
});
Agree, however it requires way more work than just the SDK changes. Hopefully one day :) |
It might make sense to improve the rendering of objects passed as breadcrumbs. Currently they become
[object Object]
which is not very helpful.The text was updated successfully, but these errors were encountered: