Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amkisko/action_reporter.rb
ActionReporter as a ruby wrapper for multiple reporting services for exceptions, notifications and context reporting
https://github.com/amkisko/action_reporter.rb
audited error-reporting honeybadger monitoring ruby ruby-on-rails scoutapm sentry
Last synced: 16 days ago
JSON representation
ActionReporter as a ruby wrapper for multiple reporting services for exceptions, notifications and context reporting
- Host: GitHub
- URL: https://github.com/amkisko/action_reporter.rb
- Owner: amkisko
- License: mit
- Created: 2023-04-18T06:18:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-19T07:03:31.000Z (about 2 months ago)
- Last Synced: 2024-10-10T08:31:05.989Z (27 days ago)
- Topics: audited, error-reporting, honeybadger, monitoring, ruby, ruby-on-rails, scoutapm, sentry
- Language: Ruby
- Homepage: https://rubygems.org/gems/action_reporter
- Size: 74.2 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# action_reporter
[![Gem Version](https://badge.fury.io/rb/action_reporter.svg)](https://badge.fury.io/rb/action_reporter) [![Test Status](https://github.com/amkisko/action_reporter.rb/actions/workflows/test.yml/badge.svg)](https://github.com/amkisko/action_reporter.rb/actions/workflows/test.yml) [![codecov](https://codecov.io/gh/amkisko/action_reporter.rb/graph/badge.svg?token=JCV2A7NWTE)](https://codecov.io/gh/amkisko/action_reporter.rb)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/f4bef9a52eac43a5a0f6d8c1b58cc6af)](https://app.codacy.com/gh/amkisko/action_reporter.rb/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [![Codacy Badge](https://app.codacy.com/project/badge/Coverage/f4bef9a52eac43a5a0f6d8c1b58cc6af)](https://app.codacy.com/gh/amkisko/action_reporter.rb/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)
Ruby wrapper for multiple reporting services.
Supported services:
- Rails logger
- Audited
- PaperTrail
- Sentry
- Honeybadger
- scoutapmSponsored by [Kisko Labs](https://www.kiskolabs.com).
## Install
Using Bundler:
```sh
bundle add action_reporter
```Using RubyGems:
```sh
gem install action_reporter
```## Gemfile
```ruby
gem 'action_reporter'
```## Usage
Put this in your `config/initializers/action_reporter.rb` file:
```ruby
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:
```ruby
ActionReporter.audited_user = current_user
ActionReporter.context(entry_id: entry.id)
ActionReporter.notify('Something went wrong', context: { record: record })
```## Hook debugger to notify method
Apply patch on initializer level or before running the main code:
```ruby
module ActionReporter
class RailsReporter < Base
def notify(error, context: {})
super
binding.pry
end
end
end
```## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/amkisko/action_reporter.rb
Contribution policy:
- It might take up to 2 calendar weeks to review and merge critical fixes
- It might take up to 6 calendar months to review and merge pull request
- It might take up to 1 calendar year to review an issue
- New integrations and third-party features are not nessessarily added to the gem
- Pull request should have test coverage for affected parts
- Pull request should have changelog entry## Publishing
```sh
rm action_reporter-*.gem
gem build action_reporter.gemspec
gem push action_reporter-*.gem
```## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).