appsignal 0.12.beta.38 → 0.12.beta.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/agent.yml +5 -5
- data/ext/appsignal_extension.c +19 -10
- data/lib/appsignal.rb +18 -1
- data/lib/appsignal/config.rb +8 -4
- data/lib/appsignal/integrations/celluloid.rb +1 -0
- data/lib/appsignal/integrations/delayed_job.rb +4 -0
- data/lib/appsignal/integrations/passenger.rb +7 -0
- data/lib/appsignal/integrations/puma.rb +9 -0
- data/lib/appsignal/integrations/rake.rb +1 -1
- data/lib/appsignal/integrations/resque.rb +1 -1
- data/lib/appsignal/integrations/unicorn.rb +18 -0
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/config_spec.rb +3 -2
- data/spec/lib/appsignal/integrations/passenger_spec.rb +21 -0
- data/spec/lib/appsignal/integrations/puma_spec.rb +36 -0
- data/spec/lib/appsignal/integrations/rake_spec.rb +18 -2
- data/spec/lib/appsignal/integrations/resque_spec.rb +1 -1
- data/spec/lib/appsignal/integrations/unicorn_spec.rb +33 -0
- data/spec/lib/appsignal_spec.rb +53 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a7a0812a006296451ced17e5caf4ed0dcc24b66
|
4
|
+
data.tar.gz: 9cf99ae0382bcb236f48b10c0b3c087ee31951b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1b9f2b1ecfbd223672bac629303d12e3248d26d208e6155e2b9a59e64520c2a7a2f0a7e44ef2e614b305fbb35c3b86eccdc2c7004b7c2e98fdb95b2efc372c9
|
7
|
+
data.tar.gz: bf59b508199dd15fc8eb38d96d4e095e1abca9801bdba559f94c2f9d231a3807820215c8de408360f18e2197c246fe1fb6d0ae561bd63562fc35800e810fecae
|
data/ext/agent.yml
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
---
|
2
|
-
:version:
|
2
|
+
:version: d6c8254
|
3
3
|
:triples:
|
4
4
|
x86_64-linux:
|
5
|
-
:checksum:
|
6
|
-
:download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
5
|
+
:checksum: 046c8564ec74e511706623ce90295f7639bd2a4f23818e3b0f245f4348300ecd
|
6
|
+
:download_url: https://appsignal-agent-releases.global.ssl.fastly.net/d6c8254/appsignal-agent-x86_64-linux-static.tar.gz
|
7
7
|
:lib_filename: libappsignal.a
|
8
8
|
x86_64-darwin:
|
9
|
-
:checksum:
|
10
|
-
:download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
9
|
+
:checksum: 73f4da97749df2b9161020e910fbfaba4c530838698009762ac453026ade67a7
|
10
|
+
:download_url: https://appsignal-agent-releases.global.ssl.fastly.net/d6c8254/appsignal-agent-x86_64-darwin-static.tar.gz
|
11
11
|
:lib_filename: libappsignal.a
|
data/ext/appsignal_extension.c
CHANGED
@@ -176,8 +176,8 @@ static void track_gc_end(rb_event_flag_t flag, VALUE arg1, VALUE arg2, ID arg3,
|
|
176
176
|
appsignal_track_gc_end();
|
177
177
|
}
|
178
178
|
|
179
|
-
static
|
180
|
-
//
|
179
|
+
static VALUE install_allocation_event_hook() {
|
180
|
+
// This event hook is only available on Ruby 2.1 and 2.2
|
181
181
|
#if defined(RUBY_INTERNAL_EVENT_NEWOBJ)
|
182
182
|
rb_add_event_hook(
|
183
183
|
track_allocation,
|
@@ -185,6 +185,12 @@ static void install_event_hooks() {
|
|
185
185
|
Qnil
|
186
186
|
);
|
187
187
|
#endif
|
188
|
+
|
189
|
+
return Qnil;
|
190
|
+
}
|
191
|
+
|
192
|
+
static VALUE install_gc_event_hooks() {
|
193
|
+
// These event hooks are only available on Ruby 2.1 and 2.2
|
188
194
|
#if defined(RUBY_INTERNAL_EVENT_GC_START)
|
189
195
|
rb_add_event_hook(
|
190
196
|
track_gc_start,
|
@@ -208,6 +214,8 @@ static void install_event_hooks() {
|
|
208
214
|
Qnil
|
209
215
|
);
|
210
216
|
#endif
|
217
|
+
|
218
|
+
return Qnil;
|
211
219
|
}
|
212
220
|
|
213
221
|
void Init_appsignal_extension(void) {
|
@@ -227,13 +235,14 @@ void Init_appsignal_extension(void) {
|
|
227
235
|
rb_define_singleton_method(Extension, "set_transaction_metadata", set_transaction_metadata, 3);
|
228
236
|
rb_define_singleton_method(Extension, "finish_transaction", finish_transaction, 1);
|
229
237
|
|
238
|
+
// Event hook installation
|
239
|
+
rb_define_singleton_method(Extension, "install_allocation_event_hook", install_allocation_event_hook, 0);
|
240
|
+
rb_define_singleton_method(Extension, "install_gc_event_hooks", install_gc_event_hooks, 0);
|
241
|
+
|
230
242
|
// Metrics
|
231
|
-
rb_define_singleton_method(Extension, "set_gauge",
|
232
|
-
rb_define_singleton_method(Extension, "set_host_gauge",
|
233
|
-
rb_define_singleton_method(Extension, "set_process_gauge",
|
234
|
-
rb_define_singleton_method(Extension, "increment_counter",
|
235
|
-
rb_define_singleton_method(Extension, "add_distribution_value",
|
236
|
-
|
237
|
-
// Event hooks
|
238
|
-
install_event_hooks();
|
243
|
+
rb_define_singleton_method(Extension, "set_gauge", set_gauge, 2);
|
244
|
+
rb_define_singleton_method(Extension, "set_host_gauge", set_host_gauge, 2);
|
245
|
+
rb_define_singleton_method(Extension, "set_process_gauge", set_process_gauge, 2);
|
246
|
+
rb_define_singleton_method(Extension, "increment_counter", increment_counter, 2);
|
247
|
+
rb_define_singleton_method(Extension, "add_distribution_value", add_distribution_value, 2);
|
239
248
|
}
|
data/lib/appsignal.rb
CHANGED
@@ -15,9 +15,12 @@ module Appsignal
|
|
15
15
|
def load_integrations
|
16
16
|
require 'appsignal/integrations/celluloid'
|
17
17
|
require 'appsignal/integrations/delayed_job'
|
18
|
+
require 'appsignal/integrations/passenger'
|
19
|
+
require 'appsignal/integrations/puma'
|
18
20
|
require 'appsignal/integrations/sidekiq'
|
19
21
|
require 'appsignal/integrations/resque'
|
20
22
|
require 'appsignal/integrations/sequel'
|
23
|
+
require 'appsignal/integrations/unicorn'
|
21
24
|
end
|
22
25
|
|
23
26
|
def load_instrumentations
|
@@ -60,6 +63,8 @@ module Appsignal
|
|
60
63
|
load_instrumentations
|
61
64
|
Appsignal::EventFormatter.initialize_formatters
|
62
65
|
initialize_extensions
|
66
|
+
Appsignal::Extension.install_allocation_event_hook if config[:enable_allocation_tracking]
|
67
|
+
Appsignal::Extension.install_gc_event_hooks if config[:enable_gc_instrumentation]
|
63
68
|
@subscriber = Appsignal::Subscriber.new
|
64
69
|
else
|
65
70
|
logger.info("Not starting, not active for #{config.env}")
|
@@ -73,13 +78,14 @@ module Appsignal
|
|
73
78
|
Appsignal::Extension.stop
|
74
79
|
end
|
75
80
|
|
81
|
+
# Wrap a transaction with appsignal monitoring.
|
76
82
|
def monitor_transaction(name, env={})
|
77
83
|
unless active?
|
78
84
|
yield
|
79
85
|
return
|
80
86
|
end
|
81
87
|
|
82
|
-
|
88
|
+
if name.start_with?('perform_job'.freeze)
|
83
89
|
namespace = Appsignal::Transaction::BACKGROUND_JOB
|
84
90
|
request = Appsignal::Transaction::GenericRequest.new(env)
|
85
91
|
elsif name.start_with?('process_action'.freeze)
|
@@ -107,6 +113,17 @@ module Appsignal
|
|
107
113
|
end
|
108
114
|
end
|
109
115
|
|
116
|
+
# Monitor a transaction, stop Appsignal and wait for this single transaction to be
|
117
|
+
# flushed.
|
118
|
+
#
|
119
|
+
# Useful for cases such as Rake tasks and Resque-like systems where a process is
|
120
|
+
# forked and immediately exits after the transaction finishes.
|
121
|
+
def monitor_single_transaction(name, env={}, &block)
|
122
|
+
monitor_transaction(name, env, &block)
|
123
|
+
ensure
|
124
|
+
stop
|
125
|
+
end
|
126
|
+
|
110
127
|
def listen_for_error(&block)
|
111
128
|
yield
|
112
129
|
rescue => error
|
data/lib/appsignal/config.rb
CHANGED
@@ -15,7 +15,9 @@ module Appsignal
|
|
15
15
|
:instrument_net_http => true,
|
16
16
|
:skip_session_data => false,
|
17
17
|
:enable_frontend_error_catching => false,
|
18
|
-
:frontend_error_catching_path => '/appsignal_error_catcher'
|
18
|
+
:frontend_error_catching_path => '/appsignal_error_catcher',
|
19
|
+
:enable_allocation_tracking => true,
|
20
|
+
:enable_gc_instrumentation => true
|
19
21
|
}.freeze
|
20
22
|
|
21
23
|
ENV_TO_KEY_MAPPING = {
|
@@ -30,7 +32,9 @@ module Appsignal
|
|
30
32
|
'APPSIGNAL_ENABLE_FRONTEND_ERROR_CATCHING' => :enable_frontend_error_catching,
|
31
33
|
'APPSIGNAL_IGNORE_ERRORS' => :ignore_errors,
|
32
34
|
'APPSIGNAL_IGNORE_ACTIONS' => :ignore_actions,
|
33
|
-
'APPSIGNAL_HTTP_PROXY' => :http_proxy
|
35
|
+
'APPSIGNAL_HTTP_PROXY' => :http_proxy,
|
36
|
+
'APPSIGNAL_ENABLE_ALLOCATION_TRACKING' => :enable_allocation_tracking,
|
37
|
+
'APPSIGNAL_ENABLE_GC_INSTRUMENTATION' => :enable_gc_instrumentation
|
34
38
|
}.freeze
|
35
39
|
|
36
40
|
attr_reader :root_path, :env, :initial_config, :config_hash
|
@@ -73,7 +77,6 @@ module Appsignal
|
|
73
77
|
ENV['APPSIGNAL_ACTIVE'] = active?.to_s
|
74
78
|
ENV['APPSIGNAL_APP_PATH'] = root_path.to_s
|
75
79
|
ENV['APPSIGNAL_AGENT_PATH'] = File.expand_path('../../../ext', __FILE__).to_s
|
76
|
-
ENV['APPSIGNAL_LOG_PATH'] = File.join(root_path, 'log')
|
77
80
|
ENV['APPSIGNAL_ENVIRONMENT'] = env
|
78
81
|
ENV['APPSIGNAL_AGENT_VERSION'] = Appsignal::Extension.agent_version
|
79
82
|
ENV['APPSIGNAL_DEBUG_LOGGING'] = config_hash[:debug].to_s
|
@@ -131,7 +134,8 @@ module Appsignal
|
|
131
134
|
|
132
135
|
# Configuration with boolean type
|
133
136
|
%w(APPSIGNAL_ACTIVE APPSIGNAL_DEBUG APPSIGNAL_INSTRUMENT_NET_HTTP
|
134
|
-
APPSIGNAL_SKIP_SESSION_DATA APPSIGNAL_ENABLE_FRONTEND_ERROR_CATCHING
|
137
|
+
APPSIGNAL_SKIP_SESSION_DATA APPSIGNAL_ENABLE_FRONTEND_ERROR_CATCHING
|
138
|
+
APPSIGNAL_ENABLE_ALLOCATION_TRACKING APPSIGNAL_ENABLE_GC_INSTRUMENTATION).each do |var|
|
135
139
|
if env_var = ENV[var]
|
136
140
|
config[ENV_TO_KEY_MAPPING[var]] = env_var == 'true'
|
137
141
|
end
|
@@ -4,6 +4,7 @@ if defined?(::Celluloid)
|
|
4
4
|
# Some versions of Celluloid have race conditions while exiting
|
5
5
|
# that can result in a dead lock. We stop appsignal before shutting
|
6
6
|
# down Celluloid so we're sure our thread does not aggravate this situation.
|
7
|
+
# This way we also make sure any outstanding transactions get flushed.
|
7
8
|
|
8
9
|
::Celluloid.class_eval do
|
9
10
|
class << self
|
@@ -0,0 +1,18 @@
|
|
1
|
+
if defined?(::Unicorn)
|
2
|
+
Appsignal.logger.info('Loading Unicorn integration')
|
3
|
+
|
4
|
+
# Make sure the last transaction in a worker gets flushed.
|
5
|
+
#
|
6
|
+
# We'd love to be able to hook this into Unicorn in a less
|
7
|
+
# intrusive way, but this is the best we can do given the
|
8
|
+
# options we have.
|
9
|
+
|
10
|
+
class Unicorn::Worker
|
11
|
+
alias_method :original_close, :close
|
12
|
+
|
13
|
+
def close
|
14
|
+
Appsignal.stop
|
15
|
+
original_close
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/appsignal/version.rb
CHANGED
@@ -27,7 +27,9 @@ describe Appsignal::Config do
|
|
27
27
|
:name => 'TestApp',
|
28
28
|
:active => true,
|
29
29
|
:enable_frontend_error_catching => false,
|
30
|
-
:frontend_error_catching_path => '/appsignal_error_catcher'
|
30
|
+
:frontend_error_catching_path => '/appsignal_error_catcher',
|
31
|
+
:enable_allocation_tracking => true,
|
32
|
+
:enable_gc_instrumentation => true
|
31
33
|
}
|
32
34
|
end
|
33
35
|
|
@@ -52,7 +54,6 @@ describe Appsignal::Config do
|
|
52
54
|
ENV['APPSIGNAL_ACTIVE'].should == 'true'
|
53
55
|
ENV['APPSIGNAL_APP_PATH'].should end_with('spec/support/project_fixture')
|
54
56
|
ENV['APPSIGNAL_AGENT_PATH'].should end_with('/ext')
|
55
|
-
ENV['APPSIGNAL_LOG_PATH'].should end_with('/log')
|
56
57
|
ENV['APPSIGNAL_DEBUG_LOGGING'].should == 'false'
|
57
58
|
ENV['APPSIGNAL_PUSH_API_ENDPOINT'].should == 'https://push.appsignal.com'
|
58
59
|
ENV['APPSIGNAL_PUSH_API_KEY'].should == 'abc'
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Passenger integration" do
|
4
|
+
let(:file) { File.expand_path('lib/appsignal/integrations/passenger.rb') }
|
5
|
+
before(:all) do
|
6
|
+
module PhusionPassenger
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
it "adds behavior to stopping_worker_process" do
|
11
|
+
PhusionPassenger.should_receive(:on_event).with(:stopping_worker_process)
|
12
|
+
load file
|
13
|
+
end
|
14
|
+
|
15
|
+
context "without passenger" do
|
16
|
+
before(:all) { Object.send(:remove_const, :PhusionPassenger) }
|
17
|
+
|
18
|
+
specify { expect { PhusionPassenger }.to raise_error(NameError) }
|
19
|
+
specify { expect { load file }.to_not raise_error }
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Puma integration" do
|
4
|
+
let(:file) { File.expand_path('lib/appsignal/integrations/puma.rb') }
|
5
|
+
before(:all) do
|
6
|
+
class Puma
|
7
|
+
def self.cli_config
|
8
|
+
@cli_config ||= CliConfig.new
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class CliConfig
|
13
|
+
attr_accessor :options
|
14
|
+
|
15
|
+
def initialize
|
16
|
+
@options = {}
|
17
|
+
@options[:before_worker_shutdown] = []
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
before do
|
22
|
+
load file
|
23
|
+
start_agent
|
24
|
+
end
|
25
|
+
|
26
|
+
it "should add a before shutdown worker callback" do
|
27
|
+
Puma.cli_config.options[:before_worker_shutdown].first.should be_a(Proc)
|
28
|
+
end
|
29
|
+
|
30
|
+
context "without Puma" do
|
31
|
+
before(:all) { Object.send(:remove_const, :Puma) }
|
32
|
+
|
33
|
+
specify { expect { Puma }.to raise_error(NameError) }
|
34
|
+
specify { expect { load file }.to_not raise_error }
|
35
|
+
end
|
36
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'rake'
|
3
|
-
|
3
|
+
|
4
|
+
describe "Rake integration" do
|
4
5
|
let(:file) { File.expand_path('lib/appsignal/integrations/rake.rb') }
|
5
6
|
let(:app) { double(:current_scope => nil) }
|
6
7
|
let(:task) { Rake::Task.new('task', app) }
|
@@ -39,15 +40,22 @@ describe "Rack integration" do
|
|
39
40
|
let!(:transaction) { regular_transaction }
|
40
41
|
let!(:agent) { double('Agent', :send_queue => true) }
|
41
42
|
before do
|
43
|
+
transaction.stub(:set_action)
|
44
|
+
transaction.stub(:set_error)
|
45
|
+
transaction.stub(:complete!)
|
42
46
|
SecureRandom.stub(:uuid => '123')
|
43
47
|
Appsignal::Transaction.stub(:create => transaction)
|
44
|
-
Appsignal.stub(:
|
48
|
+
Appsignal.stub(:active? => true)
|
45
49
|
end
|
46
50
|
|
47
51
|
it "should call the original task" do
|
48
52
|
expect( task ).to receive(:invoke_without_appsignal).with('foo')
|
49
53
|
end
|
50
54
|
|
55
|
+
it "should not create a transaction" do
|
56
|
+
expect( Appsignal::Transaction ).not_to receive(:create)
|
57
|
+
end
|
58
|
+
|
51
59
|
context "with an exception" do
|
52
60
|
let(:exception) { VerySpecificError.new }
|
53
61
|
|
@@ -70,6 +78,14 @@ describe "Rack integration" do
|
|
70
78
|
it "should add the exception to the transaction" do
|
71
79
|
expect( transaction ).to receive(:set_error).with(exception)
|
72
80
|
end
|
81
|
+
|
82
|
+
it "should call complete! on the transaction" do
|
83
|
+
expect( transaction ).to receive(:complete!)
|
84
|
+
end
|
85
|
+
|
86
|
+
it "should stop appsignal" do
|
87
|
+
expect( Appsignal ).to receive(:stop)
|
88
|
+
end
|
73
89
|
end
|
74
90
|
end
|
75
91
|
|
@@ -39,7 +39,7 @@ describe "Resque integration" do
|
|
39
39
|
end
|
40
40
|
|
41
41
|
it "should wrap in a transaction with the correct params" do
|
42
|
-
Appsignal.should_receive(:
|
42
|
+
Appsignal.should_receive(:monitor_single_transaction).with(
|
43
43
|
'perform_job.resque',
|
44
44
|
:class => 'Resque::Job',
|
45
45
|
:method => 'perform'
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Unicorn integration" do
|
4
|
+
let(:file) { File.expand_path('lib/appsignal/integrations/unicorn.rb') }
|
5
|
+
before(:all) do
|
6
|
+
module Unicorn
|
7
|
+
class Worker
|
8
|
+
def close
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
before do
|
14
|
+
load file
|
15
|
+
start_agent
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should add behavior to Unicorn::Worker#close" do
|
19
|
+
worker = Unicorn::Worker.new
|
20
|
+
|
21
|
+
Appsignal.should_receive(:stop)
|
22
|
+
worker.should_receive(:original_close)
|
23
|
+
|
24
|
+
worker.close
|
25
|
+
end
|
26
|
+
|
27
|
+
context "without unicorn" do
|
28
|
+
before(:all) { Object.send(:remove_const, :Unicorn) }
|
29
|
+
|
30
|
+
specify { expect { Unicorn }.to raise_error(NameError) }
|
31
|
+
specify { expect { load file }.to_not raise_error }
|
32
|
+
end
|
33
|
+
end
|
data/spec/lib/appsignal_spec.rb
CHANGED
@@ -84,6 +84,12 @@ describe Appsignal do
|
|
84
84
|
Appsignal.subscriber.should be_a(Appsignal::Subscriber)
|
85
85
|
end
|
86
86
|
|
87
|
+
it "should install event hooks" do
|
88
|
+
Appsignal::Extension.should_receive(:install_allocation_event_hook)
|
89
|
+
Appsignal::Extension.should_receive(:install_gc_event_hooks)
|
90
|
+
Appsignal.start
|
91
|
+
end
|
92
|
+
|
87
93
|
context "when not active for this environment" do
|
88
94
|
before { Appsignal.config = project_fixture_config('staging') }
|
89
95
|
|
@@ -101,6 +107,19 @@ describe Appsignal do
|
|
101
107
|
Appsignal.start
|
102
108
|
end
|
103
109
|
end
|
110
|
+
|
111
|
+
context "when allocation tracking and gc instrumentation has been disabled" do
|
112
|
+
before do
|
113
|
+
Appsignal.config.config_hash[:enable_allocation_tracking] = false
|
114
|
+
Appsignal.config.config_hash[:enable_gc_instrumentation] = false
|
115
|
+
end
|
116
|
+
|
117
|
+
it "should not install event hooks" do
|
118
|
+
Appsignal::Extension.should_not_receive(:install_allocation_event_hook)
|
119
|
+
Appsignal::Extension.should_not_receive(:install_gc_event_hooks)
|
120
|
+
Appsignal.start
|
121
|
+
end
|
122
|
+
end
|
104
123
|
end
|
105
124
|
|
106
125
|
describe ".load_integrations" do
|
@@ -300,6 +319,40 @@ describe Appsignal do
|
|
300
319
|
end
|
301
320
|
end
|
302
321
|
|
322
|
+
describe ".monitor_single_transaction" do
|
323
|
+
context "with a successful call" do
|
324
|
+
it "should call monitor_transaction and stop" do
|
325
|
+
Appsignal.should_receive(:monitor_transaction).with(
|
326
|
+
'perform_job.something',
|
327
|
+
:key => :value
|
328
|
+
).and_yield
|
329
|
+
Appsignal.should_receive(:stop)
|
330
|
+
|
331
|
+
Appsignal.monitor_single_transaction('perform_job.something', :key => :value) do
|
332
|
+
# nothing
|
333
|
+
end
|
334
|
+
end
|
335
|
+
end
|
336
|
+
|
337
|
+
context "with an erroring call" do
|
338
|
+
let(:error) { VerySpecificError.new('the roof') }
|
339
|
+
|
340
|
+
it "should call monitor_transaction and stop and then raise the error" do
|
341
|
+
Appsignal.should_receive(:monitor_transaction).with(
|
342
|
+
'perform_job.something',
|
343
|
+
:key => :value
|
344
|
+
).and_yield
|
345
|
+
Appsignal.should_receive(:stop)
|
346
|
+
|
347
|
+
lambda {
|
348
|
+
Appsignal.monitor_single_transaction('perform_job.something', :key => :value) do
|
349
|
+
raise error
|
350
|
+
end
|
351
|
+
}.should raise_error(error)
|
352
|
+
end
|
353
|
+
end
|
354
|
+
end
|
355
|
+
|
303
356
|
describe ".tag_request" do
|
304
357
|
before { Appsignal::Transaction.stub(:current => transaction) }
|
305
358
|
|
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.12.beta.
|
4
|
+
version: 0.12.beta.39
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-10-
|
12
|
+
date: 2015-10-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
@@ -162,12 +162,15 @@ files:
|
|
162
162
|
- lib/appsignal/integrations/celluloid.rb
|
163
163
|
- lib/appsignal/integrations/delayed_job.rb
|
164
164
|
- lib/appsignal/integrations/padrino.rb
|
165
|
+
- lib/appsignal/integrations/passenger.rb
|
166
|
+
- lib/appsignal/integrations/puma.rb
|
165
167
|
- lib/appsignal/integrations/rails.rb
|
166
168
|
- lib/appsignal/integrations/rake.rb
|
167
169
|
- lib/appsignal/integrations/resque.rb
|
168
170
|
- lib/appsignal/integrations/sequel.rb
|
169
171
|
- lib/appsignal/integrations/sidekiq.rb
|
170
172
|
- lib/appsignal/integrations/sinatra.rb
|
173
|
+
- lib/appsignal/integrations/unicorn.rb
|
171
174
|
- lib/appsignal/js_exception_transaction.rb
|
172
175
|
- lib/appsignal/marker.rb
|
173
176
|
- lib/appsignal/params_sanitizer.rb
|
@@ -202,12 +205,15 @@ files:
|
|
202
205
|
- spec/lib/appsignal/integrations/celluloid_spec.rb
|
203
206
|
- spec/lib/appsignal/integrations/delayed_job_spec.rb
|
204
207
|
- spec/lib/appsignal/integrations/padrino_spec.rb
|
208
|
+
- spec/lib/appsignal/integrations/passenger_spec.rb
|
209
|
+
- spec/lib/appsignal/integrations/puma_spec.rb
|
205
210
|
- spec/lib/appsignal/integrations/rails_spec.rb
|
206
211
|
- spec/lib/appsignal/integrations/rake_spec.rb
|
207
212
|
- spec/lib/appsignal/integrations/resque_spec.rb
|
208
213
|
- spec/lib/appsignal/integrations/sequel_spec.rb
|
209
214
|
- spec/lib/appsignal/integrations/sidekiq_spec.rb
|
210
215
|
- spec/lib/appsignal/integrations/sinatra_spec.rb
|
216
|
+
- spec/lib/appsignal/integrations/unicorn_spec.rb
|
211
217
|
- spec/lib/appsignal/js_exception_transaction_spec.rb
|
212
218
|
- spec/lib/appsignal/marker_spec.rb
|
213
219
|
- spec/lib/appsignal/params_sanitizer_spec.rb
|
@@ -274,12 +280,15 @@ test_files:
|
|
274
280
|
- spec/lib/appsignal/integrations/celluloid_spec.rb
|
275
281
|
- spec/lib/appsignal/integrations/delayed_job_spec.rb
|
276
282
|
- spec/lib/appsignal/integrations/padrino_spec.rb
|
283
|
+
- spec/lib/appsignal/integrations/passenger_spec.rb
|
284
|
+
- spec/lib/appsignal/integrations/puma_spec.rb
|
277
285
|
- spec/lib/appsignal/integrations/rails_spec.rb
|
278
286
|
- spec/lib/appsignal/integrations/rake_spec.rb
|
279
287
|
- spec/lib/appsignal/integrations/resque_spec.rb
|
280
288
|
- spec/lib/appsignal/integrations/sequel_spec.rb
|
281
289
|
- spec/lib/appsignal/integrations/sidekiq_spec.rb
|
282
290
|
- spec/lib/appsignal/integrations/sinatra_spec.rb
|
291
|
+
- spec/lib/appsignal/integrations/unicorn_spec.rb
|
283
292
|
- spec/lib/appsignal/js_exception_transaction_spec.rb
|
284
293
|
- spec/lib/appsignal/marker_spec.rb
|
285
294
|
- spec/lib/appsignal/params_sanitizer_spec.rb
|