faultline-js

0.2.0 • Public • Published

faultline-js Build Status

faultline exception and error notifier for JavaScript.

Installation

Using npm:

npm install faultline-js

or

<script src="path/to/faultline-js/dist/client.min.js"></script>

Usage

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'
                    }
                  ]
                });

Integration

window.onerror

faultline-js automatically setups window.onerror handler when script is loaded, like airbrake-js

References

License

MIT © Ken'ichiro Oyama

Dependencies (0)

    Dev Dependencies (26)

    Package Sidebar

    Install

    npm i faultline-js

    Weekly Downloads

    9

    Version

    0.2.0

    License

    MIT

    Last publish

    Collaborators

    • k1low