diff --git a/Gemfile b/Gemfile index 5bd6a3a90..aa822d2d3 100644 --- a/Gemfile +++ b/Gemfile @@ -5,6 +5,7 @@ gem "rails", "5.1.7" gem "acts-as-taggable-on", "~> 6.5.0" gem "acts_as_votable", "~> 0.11.1" gem "ahoy_matey", "~> 1.6.0" +gem "airbrake", "~> 5.0" gem "ancestry", "~> 3.0.7" gem "audited", "~> 4.9.0" gem "autoprefixer-rails", "~> 8.2.0" diff --git a/Gemfile.lock b/Gemfile.lock index 3119a74bc..5e7df6b2e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -63,6 +63,9 @@ GEM safely_block (>= 0.1.1) user_agent_parser uuidtools + airbrake (5.8.1) + airbrake-ruby (~> 1.8) + airbrake-ruby (1.8.0) airbrussh (1.4.0) sshkit (>= 1.6.1, != 1.7.0) akami (1.3.1) @@ -622,6 +625,7 @@ DEPENDENCIES acts-as-taggable-on (~> 6.5.0) acts_as_votable (~> 0.11.1) ahoy_matey (~> 1.6.0) + airbrake (~> 5.0) ancestry (~> 3.0.7) audited (~> 4.9.0) autoprefixer-rails (~> 8.2.0) diff --git a/config/initializers/errbit.rb b/config/initializers/errbit.rb new file mode 100644 index 000000000..9e1ba059c --- /dev/null +++ b/config/initializers/errbit.rb @@ -0,0 +1,9 @@ +Airbrake.configure do |config| + config.host = Rails.application.secrets.errbit_host + config.project_id = Rails.application.secrets.errbit_project_id + config.project_key = Rails.application.secrets.errbit_project_key + + config.environment = Rails.env + config.ignore_environments = %w[development test] + config.ignore_environments += [Rails.env] if Rails.application.secrets.errbit_project_id.blank? +end diff --git a/config/secrets.yml.example b/config/secrets.yml.example index 6b81a6400..da94d81d7 100644 --- a/config/secrets.yml.example +++ b/config/secrets.yml.example @@ -43,6 +43,10 @@ staging: # :enable_starttls_auto: true force_ssl: true delay_jobs: true + errbit_host: "" + errbit_project_key: "" + errbit_project_id: 1 + errbit_self_hosted_ssl: false rollbar_server_token: "" http_basic_username: "" http_basic_password: "" @@ -66,6 +70,10 @@ preproduction: # :enable_starttls_auto: true force_ssl: true delay_jobs: true + errbit_host: "" + errbit_project_key: "" + errbit_project_id: 1 + errbit_self_hosted_ssl: false rollbar_server_token: "" http_basic_username: "" http_basic_password: "" @@ -94,6 +102,10 @@ production: # :enable_starttls_auto: true force_ssl: true delay_jobs: true + errbit_host: "" + errbit_project_key: "" + errbit_project_id: 1 + errbit_self_hosted_ssl: false rollbar_server_token: "" http_basic_username: "" http_basic_password: ""