-
Notifications
You must be signed in to change notification settings - Fork 251
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 #149
Breadcrumbs #149
Conversation
return; | ||
} | ||
|
||
window.addEventListener("click", function(event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we need to do feature detection here to prevent this from throwing an error in older IE versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the polyfill further down for addEventListener
allow this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we only polyfill some minor behavior differences on different versions of addEventListener
, so if it's not already there in a browser I don't know that we'd want to rely on bugsnag-js to polyfill it. As a third party it seems nicer/safer for us to not add new things to window if they're not there already, so I'd vote for us just skipping any automatic breadcrumbs that rely on events in browsers without addEventListener. (We could consider adding attachEvent
support if a lot of people request it, I guess?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
What effect does this have on the compressed and minified js size? |
Before:
After:
|
Looks useful, but I use bugsnag explicitly because it works on embedded browsers (Opera TV). Please make sure this does the appropriate checks to prevent problems on non-mainstream browsers. |
@apsoto Our plan is to do browser feature detection around the new features in order to degrade gracefully. The We are also planning on releasing this as a new major version (3.0), so you will be able to test it before deciding to upgrade. Any bug reports about Opera TV specific issues will be greatly appreciated. |
@@ -252,6 +503,66 @@ | |||
} | |||
} | |||
|
|||
// Compare if two objects are equal. | |||
// TODO check if this would fail if the properties are traveresed in different orders |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Answer: Yes, it does fail 😛
@@ -504,7 +504,6 @@ | |||
} | |||
|
|||
// Compare if two objects are equal. | |||
// TODO check if this would fail if the properties are traveresed in different orders | |||
function isEqual(obj1, obj2) { | |||
serialize(obj1) === serialize(obj2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me thinks there also might be a return
missing? Unless you're using it for testing right now, in which case I'll get lost and quit bugging you :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doh! good catch
By default, we automatically create breadcrumbs for the following types of events: | ||
|
||
- **Clicks** | ||
- **Errors** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's worth saying "Uncaught errors" for clarity?
🎉 |
...That is a mesmerizing GIF. |
@wordofchristian Great feature, just implemented rc1 and it works well. Some thoughts:
|
@sandstrom Yes we are planning on documenting those types at some point. We didn't initially so as to keep the API and documentation simpler. You should be able to continue using it the way you have been, and it will continue to work. Bugsnag.leaveBreadcrumb({
type: "error|navigation|user|log|manual",
name: "Anything",
metaData: {
anyKey: "any value",
foo: "bar",
biz: "baz",
}
}); |
The UI isn't yet ready on Bugsnag.com but here is a screenshot:
Bugsnag.leaveBreadcrumb(value, [metaData])
Add a breadcrumb to the array of breadcrumbs to be sent to Bugsnag when the next exception occurs
Each breadcrumb can also have additional diagnostic metadata added.
The last 25 breadcrumbs get stored and sent along with all payloads to bugsnag.
Automatic breadcrumbs
Includes automatic creation of breadcrumbs for certain events.
New configuration options
To disable all automatic breadcrumbs.
You can also disable any individual automatic breadcrumb groups:
If you only want to enable a single type of automatic breadcrumb you can disable all of them and then
enable the individual group you want:
TODO