You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require'faultline'# Every Faultline notifier must configure# 3 options: `project`, `api_key` and `endpoint`.# And `notifications` for notificatins (Slack, GitHub Issue)Faultline.configuredo |c|
c.project='faultline-ruby'c.api_key='xxxxXXXXXxXxXXxxXXXXXXXxxxxXXXXXX'c.endpoint='https://xxxxxxxxx.execute-api.ap-northeast-1.amazonaws.com/v0'c.notifications=[{type: 'slack',endpoint: 'https://hooks.slack.com/services/XXXXXXXXXX/B2RAD9423/WC2uTs3MyGldZvieAtAA7gQq',channel: '#random',username: 'faultline-notify',notifyInterval: 1,threshold: 1,timezone: 'Asia/Tokyo'},{type: 'github',userToken: 'XXXXXXXxxxxXXXXXXxxxxxXXXXXXXXXX',owner: 'k1LoW',repo: 'faultline',labels: ['faultline','bug'],if_exist: 'reopen-and-comment',notifyInterval: 1,threshold: 1,timezone: 'Asia/Tokyo'}]end# Asynchronous error delivery.begin1/0rescueZeroDivisionError=>ex# Return value is always `nil`.Faultline.notify(ex)endputs'A ZeroDivisionError was sent to Faultline asynchronously!'# Synchronous error delivery.begin1/0rescueZeroDivisionError=>ex# Return value is a Hash.response=Faultline.notify_sync(ex)endputs"\nAnother ZeroDivisionError was sent to Faultline, but this time synchronously."