https://github.com/charlypoly/ruby-slack-error-notifier
Smart Ruby exceptions notifier for Slack
https://github.com/charlypoly/ruby-slack-error-notifier
Last synced: 5 months ago
JSON representation
Smart Ruby exceptions notifier for Slack
- Host: GitHub
- URL: https://github.com/charlypoly/ruby-slack-error-notifier
- Owner: charlypoly
- License: mit
- Created: 2016-05-24T11:29:09.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-24T11:38:58.000Z (about 10 years ago)
- Last Synced: 2025-04-07T11:34:04.059Z (about 1 year ago)
- Size: 1000 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
```ruby
SlackErrorNotifier.configure do |config|
config.webhook_url = '...'
config.storage = :redis # default ':redis'
config.storage.redis.namespace = 'slack_notifications.' # default 'slack_error_notifier.'
config.catch_all = false # default false
end
SlackErrorNotifier.new('MyCustomNS', throttle: 1.hours, count_duration: :day) do |error, count|
if count
"Custom error triggered ! (#{count} today) : #{error.message}"
else
"Custom error triggered ! (first today) : #{error.message}"
end
end
error = Exception.new('my error message!')
SlackErrorNotifier::MyCustomNS.call(error) # will send slack notification "Custom error triggered ! (first today) : my error message!"
SlackErrorNotifier::MyCustomNS.call(error) # will not send slack notification but incr error counter
```
## TODO
- Integrations :
- Bugsnag integration
- Sentry integration
- Storages :
- Redis
- SQL ?
- Custom ?