10
10
JavaScript
11
11
==========
12
12
13
- Raven.js is a tiny standalone JavaScript client for Sentry. It can be
14
- used to report errors from a web browser. The quality of reporting will
15
- heavily depend on the environment the data is submitted from.
13
+ Raven.js is the official browser JavaScript client for Sentry. It automatically reports uncaught JavaScript exceptions
14
+ triggered from a browser environment, and provides a rich API for reporting your own errors.
16
15
17
- **Note **: If you're using Node on the server, you'll need
18
- `raven-node <https://github.com/getsentry/raven- node >`_.
16
+ **Note **: If you're using Node.js on the server, you'll need
17
+ `raven-node <https://docs.sentry.io/clients/ node/ >`_.
19
18
20
19
Installation
21
20
------------
22
21
23
- Raven.js is distributed in a few different methods, and should get
24
- included after any other libraries are included, but before your own
25
- scripts. For all details see :doc: `install `.
22
+ The easiest way to load Raven.js is to load it directly from our CDN. This script tag should
23
+ be included after other libraries are loaded, but before your main application code (e.g. app.js):
26
24
27
25
.. sourcecode :: html
28
26
29
27
<script src="https://cdn.ravenjs.com/3.8.1/raven.min.js"></script>
30
28
29
+ For installation using npm or other package managers, see :doc: `install `.
31
30
32
31
Configuring the Client
33
32
----------------------
34
33
35
- Now you need to set up Raven.js to use your `Sentry DSN
34
+ Next you need to configure Raven.js to use your `Sentry DSN
36
35
<https://docs.sentry.io/hosted/quickstart/#configure-the-dsn> `_:
37
36
38
37
.. code-block :: javascript
@@ -42,10 +41,10 @@ Now you need to set up Raven.js to use your `Sentry DSN
42
41
At this point, Raven is ready to capture any uncaught exception.
43
42
44
43
Once you have Raven up and running, it is highly recommended to check out :doc: `config `
45
- and :doc: `usage ` to improve your results .
44
+ and :doc: `usage `.
46
45
47
- Reporting Errors
48
- ----------------
46
+ Manually Reporting Errors
47
+ -------------------------
49
48
50
49
By default, Raven makes a best effort to capture any uncaught exception.
51
50
0 commit comments