File tree Expand file tree Collapse file tree 2 files changed +62
-0
lines changed Expand file tree Collapse file tree 2 files changed +62
-0
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,23 @@ Other similar methods are ``Raven.setExtraContext`` and
83
83
``Raven.setTagsContext `` as well as ``Raven.context ``. See
84
84
:ref: `raven-js-additional-context ` for more info.
85
85
86
+ Breadcrumbs
87
+ -----------
88
+
89
+ Breadcrumbs are browser and application lifecycle events that are helpful in understanding the state of the application
90
+ leading up to a crash.
91
+
92
+ By default, Raven.js instruments browser built-ins and DOM events to automatically collect a few useful breadcrumbs
93
+ for you:
94
+
95
+ * XMLHttpRequests
96
+ * URL / address bar changes
97
+ * UI clicks and keypress DOM events
98
+ * console log statements
99
+ * previous errors
100
+
101
+ You can also record your own breadcrumbs. For more information, see :ref: `raven-js-recording-breadcrumbs `.
102
+
86
103
Dealing with Minified Source Code
87
104
---------------------------------
88
105
Original file line number Diff line number Diff line change @@ -161,6 +161,51 @@ functions all allow passing additional data to be tagged onto the error.
161
161
Raven .setExtraContext ({ foo: " bar" })
162
162
163
163
164
+ .. _raven-js-recording-breadcrumbs :
165
+
166
+ Recording Breadcrumbs
167
+ ---------------------
168
+
169
+ Breadcrumbs are browser and application lifecycle events that are helpful in understanding the state of the application
170
+ leading up to a crash.
171
+
172
+ By default, Raven.js instruments browser built-ins and DOM events to automatically collect a few useful breadcrumbs
173
+ for you:
174
+
175
+ * XMLHttpRequests
176
+ * URL / address bar changes
177
+ * UI clicks and keypress DOM events
178
+ * console log statements
179
+ * previous errors
180
+
181
+ You can also record your own breadcrumbs:
182
+
183
+ .. code-block :: javascript
184
+
185
+ Raven .captureBreadcrumb ({
186
+ message: ' Item added to shopping cart' ,
187
+ category: ' action' ,
188
+ data: {
189
+ isbn: ' 978-1617290541' ,
190
+ cartSize: ' 3'
191
+ }
192
+ });
193
+
194
+ To learn more about what types of data can be collected via breadcrumbs, see the `breadcrumbs client API specification
195
+ <https://docs.sentry.io/learn/breadcrumbs/> `_.
196
+
197
+ Note that you can also disable automatic breadcrumb collection entirely or disable specific collectors:
198
+
199
+ .. code-block :: javascript
200
+
201
+ Raven .config (' ___PUBLIC_DSN___' , {
202
+ autoBreadcrumbs: {
203
+ xhr: false
204
+ }
205
+ });
206
+
207
+ For more on configuring breadcrumbs, see :doc: `config `.
208
+
164
209
Getting Back an Event ID
165
210
------------------------
166
211
You can’t perform that action at this time.
0 commit comments