Raven Wrapper for AngularJS
This is a very simple wrapper for Sentry Client Raven.
-
Set up sentry so that it accepts connections from your domain.
-
Import necessary scripts
<!--Vendor Scripts-->
<script type="text/javascript" src="../vendor/angular.min.js"></script>
<script type="text/javascript" src="../vendor/raven.min.js"></script>
<!--Raven Script-->
<script type="text/javascript" src="../angular-raven.js"></script>
- Configure your Raven Url.
angular.module("yourModule", ["angular-raven"])
.value("RavenConfig", {
ravenUrl: "http://yourravenhash@yourdomain.com/1" // this should be your raven endpoint URL
});
-
Deploy to your server, and play with it.
-
See testclient/index.html for a working one.
GetSentry provides the possibility to add additional options to your Raven
config, such as whitelistUrls. These options can be submitted using the
options key in the config object.
angular.module("yourModule", ["angular-raven"])
.value("RavenConfig", {
ravenUrl: "http://yourravenhash@yourdomain.com/1", // this should be your raven endpoint URL
options: {
whitelistUrls: ['example.com/scripts/']
}
});