https://github.com/faultline/faultline-js
faultline exception and error notifier for JavaScript.
https://github.com/faultline/faultline-js
error-notifier faultline notifications
Last synced: 6 months ago
JSON representation
faultline exception and error notifier for JavaScript.
- Host: GitHub
- URL: https://github.com/faultline/faultline-js
- Owner: faultline
- License: mit
- Created: 2017-05-06T11:58:03.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-05-14T01:23:03.000Z (about 8 years ago)
- Last Synced: 2025-10-22T02:22:44.074Z (9 months ago)
- Topics: error-notifier, faultline, notifications
- Language: TypeScript
- Size: 93.8 KB
- Stars: 6
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# faultline-js [](https://travis-ci.org/faultline/faultline-js)
> [faultline](https://github.com/faultline/faultline) exception and error notifier for JavaScript.
## Installation
Using npm:
```sh
npm install faultline-js
```
or
```html
```
## Usage
```js
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:
```js
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'
}
]
});
```
## Integration
### window.onerror
faultline-js automatically setups `window.onerror` handler when script is loaded, like [airbrake-js](https://github.com/airbrake/airbrake-js)
## References
- faultline-js is based on [airbrake/airbrake-js](https://github.com/airbrake/airbrake-js)
- Airbrake Js is licensed under [The MIT License (MIT)](https://github.com/airbrake/airbrake-js/LICENSE.md).
## License
MIT © Ken'ichiro Oyama