errbase-0.2.2/0000755000004100000410000000000014201712735013170 5ustar www-datawww-dataerrbase-0.2.2/README.md0000644000004100000410000000275314201712735014456 0ustar www-datawww-data# Errbase Common exception reporting for a variety of services Libraries are automatically detected. Supports: - [Airbrake](https://airbrake.io/) - [Appsignal](https://appsignal.com/) - [Bugsnag](https://bugsnag.com/) - [Exception Notification](https://github.com/smartinez87/exception_notification) - [Google Stackdriver](https://cloud.google.com/stackdriver/) - [Honeybadger](https://www.honeybadger.io/) - [New Relic](https://newrelic.com/) - [Raygun](https://raygun.io/) - [Rollbar](https://rollbar.com/) - [Scout APM](https://scoutapm.com/) - [Sentry](https://getsentry.com/) ```ruby begin # code rescue => e Errbase.report(e) end ``` You can add extra context with: ```ruby Errbase.report(e, {username: "hello"}) ``` > Context is not supported for Google Stackdriver [![Build Status](https://github.com/ankane/errbase/workflows/build/badge.svg?branch=master)](https://github.com/ankane/errbase/actions) ## Installation Errbase is designed to be used as a dependency. Add this line to your gemspec: ```ruby spec.add_dependency "errbase" ``` ## Contributing Everyone is encouraged to help improve this project. Here are a few ways you can help: - [Report bugs](https://github.com/ankane/errbase/issues) - Fix bugs and [submit pull requests](https://github.com/ankane/errbase/pulls) - Write, clarify, or fix documentation - Suggest or add new features To get started with development: ```sh git clone https://github.com/ankane/errbase.git cd errbase bundle install bundle exec rake test ``` errbase-0.2.2/CHANGELOG.md0000644000004100000410000000070014201712735014776 0ustar www-datawww-data## 0.2.2 (2022-02-03) - Added support for Scout APM - Fixed warning with Appsignal ## 0.2.1 (2021-01-03) - Added support for `sentry-ruby` gem ## 0.2.0 (2019-10-28) - Added context to New Relic - Removed support for Exceptional and Opbeat ## 0.1.1 (2018-09-19) - Added support for passing extra context - Added New Relic ## 0.1.0 (2018-02-27) - Rescue exceptions during reporting - Added support for Exception Notification and Stackdriver errbase-0.2.2/errbase.gemspec0000644000004100000410000000171114201712735016160 0ustar www-datawww-data######################################################### # This file has been automatically generated by gem2tgz # ######################################################### # -*- encoding: utf-8 -*- # stub: errbase 0.2.2 ruby lib Gem::Specification.new do |s| s.name = "errbase".freeze s.version = "0.2.2" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Andrew Kane".freeze] s.date = "2022-02-03" s.email = "andrew@ankane.org".freeze s.files = ["CHANGELOG.md".freeze, "LICENSE.txt".freeze, "README.md".freeze, "lib/errbase.rb".freeze, "lib/errbase/version.rb".freeze] s.homepage = "https://github.com/ankane/errbase".freeze s.licenses = ["MIT".freeze] s.required_ruby_version = Gem::Requirement.new(">= 2.4".freeze) s.rubygems_version = "3.2.5".freeze s.summary = "Common exception reporting for a variety of services".freeze end errbase-0.2.2/lib/0000755000004100000410000000000014201712735013736 5ustar www-datawww-dataerrbase-0.2.2/lib/errbase/0000755000004100000410000000000014201712735015361 5ustar www-datawww-dataerrbase-0.2.2/lib/errbase/version.rb0000644000004100000410000000004714201712735017374 0ustar www-datawww-datamodule Errbase VERSION = "0.2.2" end errbase-0.2.2/lib/errbase.rb0000644000004100000410000000254614201712735015715 0ustar www-datawww-datarequire "errbase/version" module Errbase class << self def report(e, info = {}) Airbrake.notify(e, info) if defined?(Airbrake) if defined?(Appsignal) if Appsignal::VERSION.to_i >= 3 Appsignal.send_error(e) do |transaction| transaction.set_tags(info) end else Appsignal.send_error(e, info) end end if defined?(Bugsnag) Bugsnag.notify(e) do |report| report.add_tab(:info, info) if info.any? end end ExceptionNotifier.notify_exception(e, data: info) if defined?(ExceptionNotifier) # TODO add info Google::Cloud::ErrorReporting.report(e) if defined?(Google::Cloud::ErrorReporting) Honeybadger.notify(e, context: info) if defined?(Honeybadger) NewRelic::Agent.notice_error(e, custom_params: info) if defined?(NewRelic::Agent) Raven.capture_exception(e, extra: info) if defined?(Raven) Raygun.track_exception(e, custom_data: info) if defined?(Raygun) Rollbar.error(e, info) if defined?(Rollbar) if defined?(ScoutApm::Error) ScoutApm::Context.add(info) ScoutApm::Error.capture(e) end Sentry.capture_exception(e, extra: info) if defined?(Sentry) rescue => e $stderr.puts "[errbase] Error reporting exception: #{e.class.name}: #{e.message}" end end end errbase-0.2.2/LICENSE.txt0000644000004100000410000000206114201712735015012 0ustar www-datawww-dataCopyright (c) 2014-2022 Andrew Kane MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.