cph / errbit

The open source error catcher that's Airbrake API compliant
MIT License
13 stars 2 forks source link

Errbit TravisCI Code Climate Coveralls Dependency Status

The open source, self-hosted error catcher

This is a fork of Errbit that runs on Postgres rather than MongoDB. For the official Errbit, go to errbit/errbit.

Errbit is a tool for collecting and managing errors from other applications. It is Airbrake (formerly known as Hoptoad) API compliant, so if you are already using Airbrake, you can just point the airbrake gem to your Errbit server.

Apps
Apps
Errors
Errors
Error Summary
Error Summary
Error Backtraces
Error Backtraces

Errbit may be a good fit for you if:

If this doesn't sound like you, you should probably stick with a hosted service such as Airbrake.

Mailing List

Join the Google Group at https://groups.google.com/group/errbit to receive updates and notifications.

Demo

There is a demo available at http://errbit-demo.herokuapp.com/

Email: demo@errbit-demo.herokuapp.com
Password: password

Requirement

The list of requirement to install Errbit is :

By default it's the Ruby 2.0.0 to use. But you can define your own ruby version with RUBY_VERSION variable between :

Installation

Note: This app is intended for people with experience deploying and maintaining Rails applications. If you're uncomfortable with any step below then Errbit is not for you.

Set up your local box or server(Ubuntu):

apt-get update
apt-get install postgresql-9.3
apt-get install libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev
gem install bundler

Running Locally:

bundle install
rake errbit:copy_configs
script/rails server

Deploying:

cap deploy:setup deploy

(Note: The capistrano deploy script will automatically generate a unique secret token.)

Deploying to Heroku:

git clone http://github.com/concordia-publishing-house/errbit.git
gem install heroku
heroku create example-errbit
# If you really want, you can define your stack and your buildpack. the default is good to us :
# heroku create example-errbit --stack cedar --buildpack https://github.com/heroku/heroku-buildpack-ruby.git
heroku addons:add heroku-postgresql:dev
heroku addons:add sendgrid:starter
heroku config:add HEROKU=true
heroku config:add SECRET_TOKEN="$(bundle exec rake secret)"
heroku config:add ERRBIT_HOST=some-hostname.example.com
heroku config:add ERRBIT_EMAIL_FROM=example@example.com
# This next line is required to access env variables during asset compilation.
# For more info, go to this link: https://devcenter.heroku.com/articles/labs-user-env-compile
heroku labs:enable user-env-compile
git push heroku master
heroku run rake db:seed
heroku addons:add deployhooks:http --url="http://YOUR_ERRBIT_HOST/deploys.txt?api_key=YOUR_API_KEY"
heroku config:add SECRET_TOKEN=some-secret-token

Authentication

Configuring GitHub authentication:

If you hosted Errbit at errbit.example.com, you would fill in:

URL:http://errbit.example.com/
Callback URL:http://errbit.example.com/users/auth/github

After you have followed these instructions, you will be able to Sign in with GitHub on the Login page.

You will also be able to link your GitHub profile to your user account on your Edit profile page.

If you have signed in with GitHub, or linked your GitHub profile, and the App has a GitHub repo configured, then you will be able to create issues on GitHub. You will still be able to create an issue on the App's configured issue tracker.

You can change the requested account permissions by setting github_access_scope to:

['repo'] Allow creating issues for public and private repos.
['public_repo'] Only allow creating issues for public repos.
[] No permission to create issues on any repos.

GitHub authentication when served on Heroku

You will need to set up Heroku variables accordingly as described in Configuring GitHub authentication:

heroku config:add GITHUB_AUTHENTICATION=true
heroku config:add GITHUB_CLIENT_ID=the_client_id_provided_by_GitHub
heroku config:add GITHUB_SECRET=the_secret_provided_by_GitHub
heroku config:add GITHUB_ACCESS_SCOPE=repo,public_repo
heroku config:add GITHUB_ORG_ID=1234567

Note: To avoid restarting your Heroku app 4 times you can set Heroku variables in a single command, i.e:

heroku config:add GITHUB_AUTHENTICATION=true \
GITHUB_CLIENT_ID=the_client_id_provided_by_GitHub \
GITHUB_SECRET=the_secret_provided_by_GitHub \
GITHUB_ACCESS_SCOPE=repo,public_repo

Configuring LDAP authentication:

  def ldap_before_save
    name = Devise::LDAP::Adapter.get_ldap_param(self.username, "givenName")
    surname = Devise::LDAP::Adapter.get_ldap_param(self.username, "sn")
    mail = Devise::LDAP::Adapter.get_ldap_param(self.username, "mail")

    self.name = (name + surname).join ' '
    self.email = mail.first
  end
user = User.first
user.admin = true
user.save!

Upgrading

When upgrading Errbit, please run:

git pull origin master # assuming origin is the github.com/concordia-publishing-house/errbit repo
bundle install
rake db:migrate
rake assets:precompile

If we change the way that data is stored, this will run any migrations to bring your database up to date.

Upgrade from errbit 0.2 to 0.3

The file of MongoDB connection config/mongoid.yml change between 0.2 to 0.3. So Check the new config/mongoid.yml.example file and update it in good way.

This change is not need to be done if you use only ENV variable to define you access to MongoDB database.

User information in error reports

Errbit can now display information about the user who experienced an error. This gives you the ability to ask the user for more information, and let them know when you've fixed the bug.

If you would like to include information about the current user in your error reports, you can replace the airbrake gem in your Gemfile with airbrake_user_attributes, which wraps the airbrake gem and injects user information. It will inject information about the current user into the error report if your Rails app's controller responds to a #current_user method. The user's attributes are filtered to remove authentication fields.

If user information is received with an error report, it will be displayed under the User Details tab:

User details tab

(This tab will be hidden if no user information is available.)

Adding javascript errors notifications

Errbit easily supports javascript errors notifications. You just need to add config.js_notifier = true to the errbit initializer in the rails app.

Errbit.configure do |config|
  config.host    = 'YOUR-ERRBIT-HOST'
  config.api_key = 'YOUR-PROJECT-API-KEY'
  config.js_notifier = true
end

Then get the notifier.js from errbit/public/javascript/notifier.js and add to application.js on your rails app or include http://YOUR-ERRBIT-HOST/javascripts/notifier.js on your application.html.erb.

Issue Trackers

Pivotal Tracker Integration

Thoughtworks Mingle Integration

card_type = Defect, status = Open, priority = Essential

GitHub Issues Integration

Bitbucket Issues Integration

Gitlab Issues Integration

Unfuddle Issues Integration

Jira Issue Integration

Notification Service

Flowdock Notification

Allow notification to Flowdock. See complete documentation

What if Errbit has an error?

Errbit will log it's own errors to an internal app named Self.Errbit. The Self.Errbit app will be automatically created whenever the first error happens.

If your Errbit instance has logged an error, we would appreciate a bug report on GitHub Issues. You can post this manually at https://github.com/concordia-publishing-house/errbit/issues, or you can set up the GitHub Issues tracker for your Self.Errbit app:

Use Errbit with applications written in other languages

In theory, any Airbrake-compatible error catcher for other languages should work with Errbit. Solutions known to work are listed below:

PHP (>= 5.3) https://github.com/flippa/errbit-php
OOP PHP (>= 5.3) https://github.com/emgiezet/errbitPHP
Python https://github.com/mkorenkov/errbit.py , https://github.com/pulseenergy/airbrakepy

Develop on Errbit

A guide can help on this way on Errbit Advanced Developer Guide

Other documentation

TODO

People using Errbit

See our wiki page for a list of people and companies around the world who use Errbit. Feel free to edit this page, and add your name and country to the list if you are using Errbit.

Special Thanks

See the contributors graph for further details. You can see another list of Contributors by release version on [CONTRIBUTORS.md]

Contributing

We welcome any contributions. If you need to tweak Errbit for your organization's needs, there are probably other users who will appreciate your work. Please try to determine whether or not your feature should be global or optional, and make optional features configurable via config/config.yml.

Examples of optional features:

How to contribute:

Copyright

Copyright (c) 2010-2013 Errbit Team. See LICENSE for details.