honeybadger 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/honeybadger/agent.rb +2 -2
- data/lib/honeybadger/config.rb +4 -0
- data/lib/honeybadger/init/rails.rb +8 -6
- data/lib/honeybadger/init/sinatra.rb +2 -2
- data/lib/honeybadger/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2777622bd51f0cf653c5645b57e14934ed27954d
|
4
|
+
data.tar.gz: 1f1a31d68cb68dc2d5737a94136c09fef0c36a25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3d20098ca94158c51238d7984230a5ca9ad0e05389cd7eb774e7ca82260699d1ab553b5c33419b3d3f2970ee96a0f9c987e18c3104be844e9b5ee01c9b3521e
|
7
|
+
data.tar.gz: 0f5435235c2f78ad38cd762ad819f9312e5fb90e95aa0b73927ade9b2d15fdf1d0fcd7a319a99eae4ab4b50c7db33ef01b809d884d93c734b7e939d432d07ab9
|
data/lib/honeybadger/agent.rb
CHANGED
@@ -213,7 +213,7 @@ module Honeybadger
|
|
213
213
|
false
|
214
214
|
else
|
215
215
|
debug { sprintf('notice feature=notices id=%s', notice.id) }
|
216
|
-
|
216
|
+
push(:notices, notice)
|
217
217
|
notice.id
|
218
218
|
end
|
219
219
|
end
|
@@ -269,7 +269,7 @@ module Honeybadger
|
|
269
269
|
attr_reader :config, :mutex
|
270
270
|
|
271
271
|
def push(feature, object)
|
272
|
-
unless config.
|
272
|
+
unless config.feature?(feature)
|
273
273
|
debug { sprintf('agent dropping feature=%s reason=ping', feature) }
|
274
274
|
return false
|
275
275
|
end
|
data/lib/honeybadger/config.rb
CHANGED
@@ -12,13 +12,15 @@ module Honeybadger
|
|
12
12
|
initializer 'honeybadger.install' do
|
13
13
|
config = Config.new(local_config)
|
14
14
|
if Honeybadger.start(config)
|
15
|
-
|
16
|
-
middleware.
|
17
|
-
|
18
|
-
|
15
|
+
if config.feature?(:notices) && config[:'exceptions.enabled']
|
16
|
+
::Rails.application.config.middleware.tap do |middleware|
|
17
|
+
middleware.insert(0, 'Honeybadger::Rack::ErrorNotifier', config)
|
18
|
+
middleware.insert_before('Honeybadger::Rack::ErrorNotifier', 'Honeybadger::Rack::UserFeedback', config)
|
19
|
+
middleware.insert_before('Honeybadger::Rack::UserFeedback', 'Honeybadger::Rack::UserInformer', config)
|
20
|
+
end
|
19
21
|
end
|
20
22
|
|
21
|
-
if config[:'traces.enabled']
|
23
|
+
if config.feature?(:traces) && config[:'traces.enabled']
|
22
24
|
ActiveSupport::Notifications.subscribe('start_processing.action_controller') do |name, started, finished, id, data|
|
23
25
|
Trace.create(id)
|
24
26
|
end
|
@@ -46,7 +48,7 @@ module Honeybadger
|
|
46
48
|
end
|
47
49
|
end
|
48
50
|
|
49
|
-
if config[:'metrics.enabled']
|
51
|
+
if config.feature?(:metrics) && config[:'metrics.enabled']
|
50
52
|
ActiveSupport::Notifications.subscribe('process_action.action_controller') do |*args|
|
51
53
|
event = ActiveSupport::Notifications::Event.new(*args)
|
52
54
|
status = event.payload[:exception] ? 500 : event.payload[:status]
|
@@ -6,8 +6,8 @@ module Honeybadger
|
|
6
6
|
def build_with_honeybadger(*args, &block)
|
7
7
|
config = Honeybadger::Config.new(honeybadger_config(self))
|
8
8
|
if Honeybadger.start(config)
|
9
|
-
use(Honeybadger::Rack::ErrorNotifier, config)
|
10
|
-
use(Honeybadger::Rack::MetricsReporter, config)
|
9
|
+
use(Honeybadger::Rack::ErrorNotifier, config) if config.feature?(:notices) && config[:'exceptions.enabled']
|
10
|
+
use(Honeybadger::Rack::MetricsReporter, config) if config.feature?(:metrics) && config[:'metrics.enabled']
|
11
11
|
end
|
12
12
|
|
13
13
|
build_without_honeybadger(*args, &block)
|
data/lib/honeybadger/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeybadger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Honeybadger Industries LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Make managing application errors a more pleasant experience.
|
14
14
|
email:
|