faultline exception and error notifier for JavaScript.
Using npm:
npm install faultline-js
or
<script src="path/to/faultline-js/dist/client.min.js"></script>
var faultline = new faultlineJs.Client({
project: 'faultline-js',
apiKey: 'xxxxXXXXXxXxXXxxXXXXXXXxxxxXXXXXX',
endpoint: 'https://xxxxxxxxx.execute-api.ap-northeast-1.amazonaws.com/v0',
notifications: [
{
type: 'slack',
endpoint: 'https://hooks.slack.com/services/XXXXXXXXXX/B2RAD9423/WC2uTs3MyGldZvieAtAA7gQq',
channel: '#random',
username: 'faultline-notify',
notifyInterval: 1,
threshold: 1,
timezone: 'Asia/Tokyo'
}
]
});
Or if you are using browserify/webpack/etc:
var faultlineJs = require('faultline-js');
var faultline = new faultlineJs({
project: 'faultline-js',
apiKey: 'xxxxXXXXXxXxXXxxXXXXXXXxxxxXXXXXX',
endpoint: 'https://xxxxxxxxx.execute-api.ap-northeast-1.amazonaws.com/v0',
notifications: [
{
type: 'slack',
endpoint: 'https://hooks.slack.com/services/XXXXXXXXXX/B2RAD9423/WC2uTs3MyGldZvieAtAA7gQq',
channel: '#random',
username: 'faultline-notify',
notifyInterval: 1,
threshold: 1,
timezone: 'Asia/Tokyo'
}
]
});
faultline-js automatically setups window.onerror
handler when script is loaded, like airbrake-js
- faultline-js is based on airbrake/airbrake-js
- Airbrake Js is licensed under The MIT License (MIT).
MIT © Ken'ichiro Oyama