appsignal 0.11.15 → 0.11.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e46c381bcac122c334dd4add206d31c1d0055e9e
4
- data.tar.gz: d0fed9e09daaeef79be49f0f7239beef0140c15c
3
+ metadata.gz: 3e8df99b6b521fdda3a9e54873ea46bad0e1667f
4
+ data.tar.gz: 32711b82d0e91a9cc08bde77ec0bc62bcc858129
5
5
  SHA512:
6
- metadata.gz: 3441a4fa9552f743e0b3c4e34295b0e1a70cff16b42f7192e85cded61e199e1bfb8f2cd2910cc3ce2aefe6e1f225819a45022e68ddbf8d629e0fa65b06e580e5
7
- data.tar.gz: ab491b0cb3fae719b4d3e57a94cf4a6f8bf128f5d58bda193c1e8a1906196b4284fb43ea430e916087660bbcb01470c16b480dd996d181945f17f5824b902dcf
6
+ metadata.gz: a7b0a13d1709bc11fd09857b56a2090a28dfdf872484bdc8f6c107ebb94935dc6b12bf1928359cee8816bebda5cc25ed41d277c43faace2876dc94bb25600d34
7
+ data.tar.gz: 052a53b0fe02ff563b6a54aa8e8066e169c5661568cb75d4c27e3ef894ae17f51c4bd35ab25c0dc08d5f20a4738fc522f4fb1ef94bc7f6d002ee8deabab72354
@@ -1,3 +1,7 @@
1
+ # 0.11.16
2
+ * Send tags passed to the frontend error catcher
3
+ * Fix issue with ActiveAdmin sending incompatible instrumentation events
4
+
1
5
  # 0.11.15
2
6
  * Improve Sinatra support
3
7
 
@@ -1,5 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'capistrano', '< 3.0'
4
+ gem 'net-ssh', '2.9.2' # 3.x doesn't compile on < Ruby 2.0
4
5
 
5
6
  gemspec :path => '../'
@@ -1,5 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'capistrano', '>= 3.0'
4
+ gem 'net-ssh', '2.9.2' # 3.x doesn't compile on < Ruby 2.0
4
5
 
5
6
  gemspec :path => '../'
@@ -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
- if Appsignal::Transaction.current
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)
@@ -27,6 +27,7 @@ module Appsignal
27
27
  :kind => 'frontend',
28
28
  :time => @time,
29
29
  :environment => @data['environment'],
30
+ :tags => @data['tags'],
30
31
  :revision => Appsignal.agent.revision
31
32
  },
32
33
  :exception => {
@@ -42,7 +42,7 @@ module Appsignal
42
42
  @env = env
43
43
  @params = defaults[:params] || {}
44
44
  @tags = defaults[:tags] || {}
45
- @kind = defaults[:kind] || 'web'
45
+ @kind = defaults[:kind] || 'http_request'
46
46
  @action = defaults[:action]
47
47
  @paused = false
48
48
  end
@@ -1,3 +1,3 @@
1
1
  module Appsignal
2
- VERSION = '0.11.15'
2
+ VERSION = '0.11.16'
3
3
  end
@@ -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' => 'development',
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 => 'development',
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).and_return(payload)
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.15
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-09-04 00:00:00.000000000 Z
15
+ date: 2015-10-19 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rack