11# Raven.js
22
3- This is an experimental JavaScript client for the [ Sentry] [ 1 ] realtime event
4- logging and aggregation platform.
3+ ![ Build Status] ( https://secure.travis-ci.org/lincolnloop/raven-js.png?branch=develop )
4+
5+ This is a JavaScript client for the [ Sentry] [ 1 ] realtime event logging and
6+ aggregation platform.
7+
8+ Raven.js v0.4 requires Sentry v4.1 or later. If
9+ you are running an earlier version of Sentry, you should use Raven.js v0.3.
510
611The stacktrace generation was inspired by the [ javascript-stacktrace] [ 4 ]
712project, and includes heavily modified portions of that project's code. The
@@ -11,8 +16,6 @@ full and minified distribution files include [parseUri][5].
1116[ 4 ] : https://github.com/eriwen/javascript-stacktrace
1217[ 5 ] : http://blog.stevenlevithan.com/archives/parseuri
1318
14- ![ Build Status] ( https://secure.travis-ci.org/lincolnloop/raven-js.png?branch=develop )
15-
1619## Install
1720
1821Download the latest version [ here] [ 5 ] .
@@ -23,30 +26,36 @@ First include jQuery or Zepto in your document's head. Then include the
2326minified distribution file from the 'dist' directory:
2427
2528 <script type="text/javascript" src="js/jquery.js"></script>
26- <script type="text/javascript" src="js/raven-0.3 .min.js"></script>
29+ <script type="text/javascript" src="js/raven-0.4 .min.js"></script>
2730
28- [ 5 ] : https://github.com/downloads/lincolnloop/raven-js/raven-js-0.3 .tar.gz
31+ [ 5 ] : https://github.com/downloads/lincolnloop/raven-js/raven-js-0.4 .tar.gz
2932[ 6 ] : http://jquery.com/
3033[ 7 ] : http://zeptojs.com/
3134
3235
3336## Configuration
3437
35- Configure the client by passing the DSN as the first argument:
38+ First, you will need to configure Sentry to allow requests from the domain name
39+ that is hosting your JavaScript. Go to * Account &rarr ; Projects* and select
40+ the project you want to configure. Under "Client Security", list the domains
41+ you want to access Sentry from.
42+
43+ ![ Client Security] ( http://f.cl.ly/items/1t2A33243O2V1U160C39/client-security.png )
44+
45+ Next, configure the client by passing the DSN as the first argument:
3646
3747 Raven.config('http://secret:public@example.com/project-id');
3848
3949Or if you need to specify additional options:
4050
4151 Raven.config({
4252 "publicKey": "e89652ec30b94d9db6ea6f28580ab499",
43- "servers": ["http://your.sentryserver.com/api/store/"],
53+ "servers": ["http://your.sentryserver.com/api/1/ store/"],
4454 "projectId": "project-id",
4555 "logger": "yoursite.errors.javascript"
4656 });
4757
48- ** publicKey** - This is only needed if you're using project auth, and it should
49- be the desired user's public key.
58+ ** publicKey** - The desired user's public key.
5059
5160** servers** - (* required* ) An array of servers to send exception info to.
5261
@@ -86,11 +95,13 @@ those cases it will simply do nothing.
8695
8796## Security
8897
89- Raven requires you to set up the CORS headers within Sentry. These headers should include
90- the base URI of which you plan to send events from.
98+ Raven requires you to set up the CORS headers within Sentry. These headers
99+ should include the base URI of which you plan to send events from.
91100
92- For example, if you are using raven-js on http://example.com , you should list <code >http://example.com </code >
93- in your origins configuration. If you only wanted to allow events from /foo, set the value to <code >http://example.com/foo </code >.
101+ For example, if you are using raven-js on http://example.com , you should list
102+ <code >http://example.com </code > in your origins configuration. If you only
103+ wanted to allow events from /foo, set the value to
104+ <code >http://example.com/foo </code >.
94105
95106## Support
96107
0 commit comments