-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add breadcrumbs to docs #780
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
Conversation
Breadcrumbs are browser and application lifecycle events that are helpful in understanding the state of the application | ||
leading up to a crash. | ||
|
||
By default, Raven.js instruments the DOM to automatically collect a few useful breadcrumbs for you: |
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.
How about:
By default, Raven.js instruments browser built-ins and DOM events to automatically collect a few useful breadcrumbs
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.
Looks good overall, definitely needed.
By default, Raven.js instruments browser built-ins and DOM events to automatically collect a few useful breadcrumbs | ||
for you: | ||
|
||
* XMLHttpRequests |
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.
We list 5 thing here but 4 options on the config page, missing a config option corresponding to previous errors. Is this configurable? Should it be? Do we report prior errors as breadcrumbs when autobreadcrumbs are otherwise disabled?
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.
Yeah, right now you can't disable "error" breadcrumbs.
This is part oversight and part "people wanted to disable automatic breadcrumb collection because they didn't like overriding some built-ins" (particularly console). The error breadcrumbs don't require instrumentation.
I suppose I'll add it at some point. I added an issue: #782
|
||
.. code-block:: javascript | ||
|
||
Raven.config('your-dsn', { |
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.
___PUBLIC_DSN___
instead of your-dsn
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.
Done.
|
||
.. code-block:: javascript | ||
|
||
Raven.captureBreadcrumb({ |
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.
Is there anything other than message and data someone might want to include here? Maybe link to https://docs.sentry.io/clientdev/interfaces/breadcrumbs/ for info about level, category, etc
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.
Added category
, and linked to the spec.
* Add breadcrumbs to docs * Fix section heading, tweak "instrumenting" sentence * Address @LewisJEllis' comments
Should have done this ages ago ...
cc @LewisJEllis @MaxBittker