Skip to content

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

Merged
merged 3 commits into from
Nov 24, 2016
Merged

Add breadcrumbs to docs #780

merged 3 commits into from
Nov 24, 2016

Conversation

benvinegar
Copy link
Contributor

@benvinegar benvinegar commented Nov 23, 2016

Should have done this ages ago ...

cc @LewisJEllis @MaxBittker

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:
Copy link
Contributor Author

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

Copy link
Contributor

@LewisJEllis LewisJEllis left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

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', {
Copy link
Contributor

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

Copy link
Contributor Author

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({
Copy link
Contributor

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

Copy link
Contributor Author

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.

@LewisJEllis LewisJEllis merged commit 3d6e248 into master Nov 24, 2016
@LewisJEllis LewisJEllis deleted the add-breadcrumbs-docs branch November 24, 2016 22:11
denstepa pushed a commit to denstepa/raven-js that referenced this pull request Jan 5, 2017
* Add breadcrumbs to docs

* Fix section heading, tweak "instrumenting" sentence

* Address @LewisJEllis' comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants