appsignal 0.11.15 → 0.11.16
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/CHANGELOG.md +4 -0
- data/gemfiles/capistrano2.gemfile +1 -0
- data/gemfiles/capistrano3.gemfile +1 -0
- data/lib/appsignal/agent.rb +3 -1
- data/lib/appsignal/js_exception_transaction.rb +1 -0
- data/lib/appsignal/transaction.rb +1 -1
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/agent_spec.rb +6 -0
- data/spec/lib/appsignal/config_spec.rb +2 -0
- data/spec/lib/appsignal/js_exception_transaction_spec.rb +4 -2
- data/spec/lib/appsignal/transmitter_spec.rb +3 -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: 3e8df99b6b521fdda3a9e54873ea46bad0e1667f
|
4
|
+
data.tar.gz: 32711b82d0e91a9cc08bde77ec0bc62bcc858129
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7b0a13d1709bc11fd09857b56a2090a28dfdf872484bdc8f6c107ebb94935dc6b12bf1928359cee8816bebda5cc25ed41d277c43faace2876dc94bb25600d34
|
7
|
+
data.tar.gz: 052a53b0fe02ff563b6a54aa8e8066e169c5661568cb75d4c27e3ef894ae17f51c4bd35ab25c0dc08d5f20a4738fc522f4fb1ef94bc7f6d002ee8deabab72354
|
data/CHANGELOG.md
CHANGED
data/lib/appsignal/agent.rb
CHANGED
@@ -68,7 +68,9 @@ module Appsignal
|
|
68
68
|
Appsignal.logger.debug('Subscribing to notifications')
|
69
69
|
# Subscribe to notifications that don't start with a !
|
70
70
|
@subscriber = ActiveSupport::Notifications.subscribe(/^[^!]/) do |*args|
|
71
|
-
|
71
|
+
# Some people abuse the notification system and send their own data over it
|
72
|
+
# (looking at you, active_admin), make sure we only process valid events.
|
73
|
+
if Appsignal::Transaction.current && args.length == 5
|
72
74
|
event = Appsignal::Event.event_for_instrumentation(*args)
|
73
75
|
if event.name.start_with?('process_action')
|
74
76
|
Appsignal::Transaction.current.set_process_action_event(event)
|
data/lib/appsignal/version.rb
CHANGED
@@ -180,6 +180,12 @@ describe Appsignal::Agent do
|
|
180
180
|
ActiveSupport::Notifications.instrument '!render_template'
|
181
181
|
end
|
182
182
|
|
183
|
+
it "should ignore events that do not confirm to the event spec" do
|
184
|
+
Appsignal::Transaction.current.should_not_receive(:add_event)
|
185
|
+
|
186
|
+
ActiveSupport::Notifications.publish 'borked', 'foo'
|
187
|
+
end
|
188
|
+
|
183
189
|
it "should add a normal event" do
|
184
190
|
Appsignal::Transaction.current.should_not_receive(:set_process_action_event)
|
185
191
|
Appsignal::Transaction.current.should_receive(:add_event).with(
|
@@ -63,6 +63,7 @@ describe Appsignal::Config do
|
|
63
63
|
it "should merge with the config" do
|
64
64
|
subject[:name].should == 'TestApp'
|
65
65
|
subject[:initial_key].should == 'value'
|
66
|
+
subject[:ignore_exceptions].should == []
|
66
67
|
end
|
67
68
|
end
|
68
69
|
|
@@ -149,6 +150,7 @@ describe Appsignal::Config do
|
|
149
150
|
it "should merge with the config" do
|
150
151
|
Appsignal.logger.should_not_receive(:debug)
|
151
152
|
subject[:name].should == 'Initial Name'
|
153
|
+
subject[:ignore_exceptions].should == []
|
152
154
|
end
|
153
155
|
end
|
154
156
|
|
@@ -8,7 +8,8 @@ describe Appsignal::JSExceptionTransaction do
|
|
8
8
|
'message' => 'foo is not a valid method',
|
9
9
|
'action' => 'ExceptionIncidentComponent',
|
10
10
|
'path' => 'foo.bar/moo',
|
11
|
-
'environment' =>
|
11
|
+
'environment' => {"user_agent" => "Mozilla/5.0"},
|
12
|
+
'tags' => {"intercom_user_id" => "abc123"},
|
12
13
|
'backtrace' => [
|
13
14
|
'foo.bar/js:11:1',
|
14
15
|
'foo.bar/js:22:2',
|
@@ -64,7 +65,8 @@ describe Appsignal::JSExceptionTransaction do
|
|
64
65
|
:path => 'foo.bar/moo',
|
65
66
|
:kind => 'frontend',
|
66
67
|
:time => 123,
|
67
|
-
:environment =>
|
68
|
+
:environment => {"user_agent" => "Mozilla/5.0"},
|
69
|
+
:tags => {"intercom_user_id" => "abc123"},
|
68
70
|
:revision => 'abcdef'
|
69
71
|
},
|
70
72
|
:exception => {
|
@@ -50,7 +50,9 @@ describe Appsignal::Transmitter do
|
|
50
50
|
end
|
51
51
|
|
52
52
|
it "should instantiate a new ZippedPayload" do
|
53
|
-
expect( Appsignal::ZippedPayload ).to receive(:new).
|
53
|
+
expect( Appsignal::ZippedPayload ).to receive(:new).with({'the' => 'payload'})
|
54
|
+
.and_return(payload)
|
55
|
+
.at_least(:once)
|
54
56
|
instance.transmit({'the' => 'payload'})
|
55
57
|
end
|
56
58
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2015-
|
15
|
+
date: 2015-10-19 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rack
|