errbase 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +5 -0
- data/README.md +7 -6
- data/errbase.gemspec +1 -0
- data/lib/errbase/version.rb +1 -1
- data/lib/errbase.rb +30 -10
- data/test/test_helper.rb +1 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1dd63e31c3c64193f2b961f6ca6632bb1e36e3792e360fc83514755023ef4988
|
4
|
+
data.tar.gz: 139defc7735d3ed5d9f5902cb862b237981c5a061dc0b100ce9b8ad63bc3e1cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90468a7788d05ac1320c819ed70cb09b67d3b27efdfadeb846bf7292348e317f23778e8e1665f4b06b14fccabdb0a462648248e3579db40dbbca8890f5ece256
|
7
|
+
data.tar.gz: 388bd6e297e9704d71f8ec0b7ecff86a5c10f89c60458f5c4c3217a7117ad04bcf4aaeda2284f0594d50a360b90e18ce4c4697c8bcb3036600dd5602c1e58d81
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -7,7 +7,6 @@ Libraries are automatically detected. Supports:
|
|
7
7
|
- [Airbrake](https://airbrake.io/)
|
8
8
|
- [Appsignal](https://appsignal.com/)
|
9
9
|
- [Bugsnag](https://bugsnag.com/)
|
10
|
-
- [Exceptional](http://www.exceptional.io/)
|
11
10
|
- [Exception Notification](https://github.com/smartinez87/exception_notification)
|
12
11
|
- [Google Stackdriver](https://cloud.google.com/stackdriver/)
|
13
12
|
- [Honeybadger](https://www.honeybadger.io/)
|
@@ -15,6 +14,7 @@ Libraries are automatically detected. Supports:
|
|
15
14
|
- [Raygun](https://raygun.io/)
|
16
15
|
- [Rollbar](https://rollbar.com/)
|
17
16
|
- [Sentry](https://getsentry.com/)
|
17
|
+
- [New Relic](https://newrelic.com/)
|
18
18
|
|
19
19
|
```ruby
|
20
20
|
begin
|
@@ -24,6 +24,12 @@ rescue => e
|
|
24
24
|
end
|
25
25
|
```
|
26
26
|
|
27
|
+
You can add extra context with:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
Errbase.report(e, {username: "hello"})
|
31
|
+
```
|
32
|
+
|
27
33
|
## Installation
|
28
34
|
|
29
35
|
Errbase is designed to be used as a dependency.
|
@@ -34,11 +40,6 @@ Add this line to your gemspec:
|
|
34
40
|
spec.add_dependency "errbase"
|
35
41
|
```
|
36
42
|
|
37
|
-
## TODO
|
38
|
-
|
39
|
-
- Ability to specify services
|
40
|
-
- Support for more services
|
41
|
-
|
42
43
|
## Contributing
|
43
44
|
|
44
45
|
Everyone is encouraged to help improve this project. Here are a few ways you can help:
|
data/errbase.gemspec
CHANGED
data/lib/errbase/version.rb
CHANGED
data/lib/errbase.rb
CHANGED
@@ -2,15 +2,31 @@ require "errbase/version"
|
|
2
2
|
|
3
3
|
module Errbase
|
4
4
|
class << self
|
5
|
-
def report(e)
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
def report(e, info = {})
|
6
|
+
Airbrake.notify(e, info) if defined?(Airbrake)
|
7
|
+
|
8
|
+
Appsignal.send_error(e, info) if defined?(Appsignal)
|
9
|
+
|
10
|
+
if defined?(Bugsnag)
|
11
|
+
Bugsnag.notify(e) do |report|
|
12
|
+
report.add_tab(:info, info) if info.any?
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
ExceptionNotifier.notify_exception(e, data: info) if defined?(ExceptionNotifier)
|
17
|
+
|
18
|
+
# TODO remove in next version
|
19
|
+
# don't worry about adding info
|
9
20
|
Exceptional.handle(e) if defined?(Exceptional)
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
21
|
+
|
22
|
+
NewRelic::Agent.notice_error(e) if defined?(NewRelic::Agent)
|
23
|
+
|
24
|
+
Honeybadger.notify(e, context: info) if defined?(Honeybadger)
|
25
|
+
|
26
|
+
# TODO add info
|
27
|
+
Google::Cloud::ErrorReporting.report(e) if defined?(Google::Cloud::ErrorReporting)
|
28
|
+
|
29
|
+
# TODO add info
|
14
30
|
if defined?(Opbeat)
|
15
31
|
if Opbeat.respond_to?(:report)
|
16
32
|
Opbeat.report(e)
|
@@ -18,8 +34,12 @@ module Errbase
|
|
18
34
|
Opbeat.capture_exception(e)
|
19
35
|
end
|
20
36
|
end
|
21
|
-
|
22
|
-
|
37
|
+
|
38
|
+
Raven.capture_exception(e, extra: info) if defined?(Raven)
|
39
|
+
|
40
|
+
Raygun.track_exception(e, custom_data: info) if defined?(Raygun)
|
41
|
+
|
42
|
+
Rollbar.error(e, info) if defined?(Rollbar)
|
23
43
|
rescue => e
|
24
44
|
$stderr.puts "[errbase] Error reporting exception: #{e.class.name}: #{e.message}"
|
25
45
|
end
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: errbase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -206,6 +206,20 @@ dependencies:
|
|
206
206
|
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: newrelic_rpm
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
209
223
|
description: Common exception reporting for a variety of services
|
210
224
|
email:
|
211
225
|
- andrew@chartkick.com
|
@@ -244,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
244
258
|
version: '0'
|
245
259
|
requirements: []
|
246
260
|
rubyforge_project:
|
247
|
-
rubygems_version: 2.
|
261
|
+
rubygems_version: 2.7.7
|
248
262
|
signing_key:
|
249
263
|
specification_version: 4
|
250
264
|
summary: Common exception reporting for a variety of services
|