{"id":13879293,"url":"https://github.com/rails-engine/exception-track","last_synced_at":"2025-04-05T21:08:56.098Z","repository":{"id":39228967,"uuid":"82247875","full_name":"rails-engine/exception-track","owner":"rails-engine","description":"Tracking ⚠️ exceptions for Rails application and store them in database.","archived":false,"fork":false,"pushed_at":"2021-12-28T04:00:34.000Z","size":128,"stargazers_count":117,"open_issues_count":6,"forks_count":34,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T20:06:28.001Z","etag":null,"topics":["error-log","errors","exception","exception-notification","exceptions","rails-engine"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rails-engine.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-17T02:22:59.000Z","updated_at":"2024-12-17T07:50:58.000Z","dependencies_parsed_at":"2022-09-17T11:20:46.001Z","dependency_job_id":null,"html_url":"https://github.com/rails-engine/exception-track","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rails-engine%2Fexception-track","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rails-engine%2Fexception-track/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rails-engine%2Fexception-track/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rails-engine%2Fexception-track/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rails-engine","download_url":"https://codeload.github.com/rails-engine/exception-track/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399877,"owners_count":20932876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["error-log","errors","exception","exception-notification","exceptions","rails-engine"],"created_at":"2024-08-06T08:02:16.430Z","updated_at":"2025-04-05T21:08:56.072Z","avatar_url":"https://github.com/rails-engine.png","language":"Ruby","readme":"## ExceptionTrack\n\nTracking exceptions for Rails application store them in database.\n\nThis gem is base on [exception_notification](https://github.com/smartinez87/exception_notification/).\n\n[中文介绍和使用说明](https://ruby-china.org/topics/32325)\n\n[![Gem Version](https://badge.fury.io/rb/exception-track.svg)](https://badge.fury.io/rb/exception-track) [![build](https://github.com/rails-engine/exception-track/workflows/build/badge.svg)](https://github.com/rails-engine/exception-track/actions?query=workflow%3Abuild) [![codecov.io](https://codecov.io/github/rails-engine/exception-track/coverage.svg?branch=master)](https://codecov.io/github/rails-engine/exception-track?branch=master)\n\n![2017-02-17 12 35 18](https://cloud.githubusercontent.com/assets/5518/23052599/8e267c02-f50d-11e6-8d6e-cef0cc1991b7.png)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'exception-track'\n```\n\nAnd then execute:\n\n```bash\n$ bundle\n```\n\nGenerate migration and config files\n\n```bash\n$ rails g exception_track:install\n```\n\nAnd mount routers:\n\nconfig/router.rb\n\n```rb\nRails.application.routes.draw do\n  mount ExceptionTrack::Engine =\u003e \"/exception-track\"\nend\n```\n\nMigrate database:\n\n```shell\nbundle exec rails db:migrate\n```\n\nNow you can open: http://localhost:3000/exception-track\n\n## Configuration\n\nAdd config/initializers/exception-track.rb\n\n```rb\nExceptionTrack.configure do\n  # environments for store Exception log in to database.\n  # default: [:development, :production]\n  # self.environments = %i(production)\nend\n```\n\n## exception_notification Configuration\n\nYou can config [exception_notification](https://github.com/smartinez87/exception_notification/) by itself's way, more documentations please visit:\n\nhttps://github.com/smartinez87/exception_notification/\n\n## Router admin authenticate\n\n```rb\n# lib/admin_constraint.rb\nclass AdminConstraint\n  def matches?(request)\n    return false if !request.session[:user_id]\n    user = User.find(request.session[:user_id])\n    user \u0026\u0026 user.admin?\n  end\nend\n\n# config/router.rb\nrequire 'admin_constraint'\nmount ExceptionTrack::Engine =\u003e \"/exception-track\", constraints: AdminConstraint.new\n```\n\n**With Devise**\n\n```rb\n# config/routes.rb\nauthenticate :user, -\u003e(u) { u.admin? } do\n  mount ExceptionTrack::Engine =\u003e \"/exception-track\"\nend\n```\n\nMore examples: [Sidekiq Web Document](https://github.com/mperham/sidekiq/wiki/Monitoring#authentication)\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frails-engine%2Fexception-track","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frails-engine%2Fexception-track","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frails-engine%2Fexception-track/lists"}