No release in over 3 years
Low commit activity in last 3 years
Tracks errors using middleware and provides an interface in order to view and track the errors.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

>= 5.0.0
 Project Readme

SnitchReporting

Snitch Reporting adds middleware to your Rails app to automatically track errors. This is a self-hosted gem that plugs directly into your app.

Installation

Add this line to your application's Gemfile:

gem 'snitch_reporting'

And then execute:

$ bundle

Or install it yourself as:

$ gem install snitch_reporting

Include assets:

application.js

//= require snitch_reporting/snitch_report

application.css

/*
*= require snitch_reporting/snitch_report
/*

Add the migrations to your app with

rails g snitch_reporting:install
rails db:migrate

Add the middleware to your app by including the following in your application.rb

Rails.application.config.middleware.use SnitchReporting::Rack, ->(occurrence) {
  # Use the `occurrence` and `occurrence.report` to retrieve the info and notify to your reception box of choice, whether it be Email, SMS, Slack, or some other API.
}

Finally, mount the routes within your route file to give you access to the report pages.

mount SnitchReporting::Engine, at: "/snitches"

Contributing

Lots of things to do, and would love some PRs! Feel free to pull the code down and submit a PR with some changes. A few things I'd like to do:

  • [] Track/display how many unique users are affected by the error
  • [] Visually graph history of the error
  • [] Add commenting capabilities
  • [] Track history of changes, whether they be marking as resolved, commenting, etc.

License

The gem is available as open source under the terms of the MIT License.