ActionReporter as a ruby wrapper for multiple reporting services for exceptions, notifications and context reporting
MIT License
Ruby wrapper for multiple reporting services.
Supported services:
Sponsored by Kisko Labs.
Using Bundler:
bundle add action_reporter
Using RubyGems:
gem install action_reporter
gem 'action_reporter'
Put this in your config/initializers/action_reporter.rb
file:
ActionReporter.enabled_reporters = [
ActionReporter::RailsReporter.new,
# ActionReporter::AuditedReporter.new,
# ActionReporter::PaperTrailReporter.new,
# ActionReporter::SentryReporter.new,
# ActionReporter::HoneybadgerReporter.new,
# ActionReporter::ScoutApmReporter.new
]
Then you can use it in your code:
ActionReporter.audited_user = current_user
ActionReporter.context(entry_id: entry.id)
ActionReporter.notify('Something went wrong', context: { record: record })
Apply patch on initializer level or before running the main code:
module ActionReporter
class RailsReporter < Base
def notify(error, context: {})
super
binding.pry
end
end
end
Bug reports and pull requests are welcome on GitHub at https://github.com/amkisko/action_reporter.rb
Contribution policy:
rm action_reporter-*.gem
gem build action_reporter.gemspec
gem push action_reporter-*.gem
The gem is available as open source under the terms of the MIT License.