appsignal 1.1.6 → 1.1.7.beta.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/CHANGELOG.md +4 -0
- data/ext/agent.yml +9 -9
- data/gemfiles/resque.gemfile +2 -0
- data/lib/appsignal.rb +1 -0
- data/lib/appsignal/integrations/resque_active_job.rb +29 -0
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/cli/install_spec.rb +1 -1
- data/spec/lib/appsignal/integrations/resque_active_job_spec.rb +40 -0
- data/spec/lib/appsignal/integrations/resque_spec.rb +2 -2
- data/spec/spec_helper.rb +9 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 087f237fab88ce1726739ad3f08b7497e2e3f934
|
4
|
+
data.tar.gz: 3af658ab3c053d97e8913089069516304827d546
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c04140d7906580a8f06b8f2bbe9208264430b7c56ec283788ca8a27f6022a5be6cd8c2d386f0c6435f01d7cba68befc3ffc4ec422d5eb1184c552e0665b94804
|
7
|
+
data.tar.gz: 50b2e595b29ebc9014601a04073f082ff312412886335cc185919ea3b2ad1ca4714ca903feb98002e1360233c07957c5fbf50f7fa4f974756edbd71a9e462ea5
|
data/CHANGELOG.md
CHANGED
data/ext/agent.yml
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
---
|
2
|
-
version:
|
2
|
+
version: f5c90a8
|
3
3
|
triples:
|
4
4
|
x86_64-linux:
|
5
|
-
checksum:
|
6
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
5
|
+
checksum: c89f8fc1f321a50cadc6c47f404cc0995108ef31c02f7252328ab2c1e4ef23f4
|
6
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/f5c90a8/appsignal-agent-x86_64-linux-static.tar.gz
|
7
7
|
lib_filename: libappsignal.a
|
8
8
|
i686-linux:
|
9
|
-
checksum:
|
10
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
9
|
+
checksum: b9ea385e0c5ab6a7578fb9db9d31239aa9d153c1cf56024f68deb43ea5fa00a0
|
10
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/f5c90a8/appsignal-agent-i686-linux-static.tar.gz
|
11
11
|
lib_filename: libappsignal.a
|
12
12
|
x86-linux:
|
13
|
-
checksum:
|
14
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
13
|
+
checksum: b9ea385e0c5ab6a7578fb9db9d31239aa9d153c1cf56024f68deb43ea5fa00a0
|
14
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/f5c90a8/appsignal-agent-i686-linux-static.tar.gz
|
15
15
|
lib_filename: libappsignal.a
|
16
16
|
x86_64-darwin:
|
17
|
-
checksum:
|
18
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
17
|
+
checksum: 7fe3fba0bd65e1f3f95b0e5a3e8c08f5b79352aee84268eb9053da30c87d68d6
|
18
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/f5c90a8/appsignal-agent-x86_64-darwin-static.tar.gz
|
19
19
|
lib_filename: libappsignal.a
|
data/gemfiles/resque.gemfile
CHANGED
data/lib/appsignal.rb
CHANGED
@@ -264,6 +264,7 @@ require 'appsignal/marker'
|
|
264
264
|
require 'appsignal/params_sanitizer'
|
265
265
|
require 'appsignal/integrations/railtie' if defined?(::Rails)
|
266
266
|
require 'appsignal/integrations/resque'
|
267
|
+
require 'appsignal/integrations/resque_active_job'
|
267
268
|
require 'appsignal/subscriber'
|
268
269
|
require 'appsignal/transaction'
|
269
270
|
require 'appsignal/version'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Appsignal
|
2
|
+
module Integrations
|
3
|
+
module ResqueActiveJobPlugin
|
4
|
+
include Appsignal::Hooks::Helpers
|
5
|
+
|
6
|
+
def self.included(base)
|
7
|
+
base.class_eval do
|
8
|
+
|
9
|
+
around_perform do |job, block|
|
10
|
+
Appsignal.monitor_single_transaction(
|
11
|
+
'perform_job.resque',
|
12
|
+
:class => job.class.to_s,
|
13
|
+
:method => 'perform',
|
14
|
+
:params => job.format_args(job.arguments),
|
15
|
+
:metadata => {
|
16
|
+
:id => job.job_id,
|
17
|
+
:queue => job.queue_name
|
18
|
+
},
|
19
|
+
) do
|
20
|
+
block.call
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/appsignal/version.rb
CHANGED
@@ -130,7 +130,7 @@ describe Appsignal::CLI::Install do
|
|
130
130
|
end
|
131
131
|
|
132
132
|
context "with sinatra" do
|
133
|
-
if sinatra_present? && !padrino_present?
|
133
|
+
if sinatra_present? && !padrino_present? && !rails_present?
|
134
134
|
describe ".install" do
|
135
135
|
it "should install with environment variables" do
|
136
136
|
cli.should_receive(:gets).once.and_return('Appname')
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
if resque_present? && active_job_present?
|
4
|
+
describe "Resque ActiveJob integration" do
|
5
|
+
let(:file) { File.expand_path('lib/appsignal/integrations/resque_active_job.rb') }
|
6
|
+
|
7
|
+
context "with Resque and ActiveJob" do
|
8
|
+
before do
|
9
|
+
load file
|
10
|
+
start_agent
|
11
|
+
|
12
|
+
class TestActiveJob < ActiveJob::Base
|
13
|
+
include Appsignal::Integrations::ResqueActiveJobPlugin
|
14
|
+
|
15
|
+
def perform(param)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe :around_perform_plugin do
|
21
|
+
before { SecureRandom.stub(:uuid => 123) }
|
22
|
+
let(:job) { TestActiveJob.new('moo') }
|
23
|
+
|
24
|
+
it "should wrap in a transaction with the correct params" do
|
25
|
+
Appsignal.should_receive(:monitor_single_transaction).with(
|
26
|
+
'perform_job.resque',
|
27
|
+
:class => 'TestActiveJob',
|
28
|
+
:method => 'perform',
|
29
|
+
:params => ['moo'],
|
30
|
+
:metadata => {
|
31
|
+
:id => 123,
|
32
|
+
:queue => 'default'
|
33
|
+
}
|
34
|
+
)
|
35
|
+
end
|
36
|
+
after { job.perform_now }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -27,7 +27,7 @@ if resque_present?
|
|
27
27
|
|
28
28
|
describe :around_perform_resque_plugin do
|
29
29
|
let(:transaction) { Appsignal::Transaction.new('1', 'background', {}, {}) }
|
30
|
-
let(:job) { Resque::Job.new('default', {'class' => 'TestJob'}) }
|
30
|
+
let(:job) { ::Resque::Job.new('default', {'class' => 'TestJob'}) }
|
31
31
|
before do
|
32
32
|
transaction.stub(:complete => true)
|
33
33
|
Appsignal::Transaction.stub(:current => transaction)
|
@@ -55,7 +55,7 @@ if resque_present?
|
|
55
55
|
end
|
56
56
|
|
57
57
|
context "with exception" do
|
58
|
-
let(:job) { Resque::Job.new('default', {'class' => 'BrokenTestJob'}) }
|
58
|
+
let(:job) { ::Resque::Job.new('default', {'class' => 'BrokenTestJob'}) }
|
59
59
|
|
60
60
|
it "should set the exception" do
|
61
61
|
Appsignal::Transaction.any_instance.should_receive(:set_error)
|
data/spec/spec_helper.rb
CHANGED
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: 1.1.
|
4
|
+
version: 1.1.7.beta.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -186,6 +186,7 @@ files:
|
|
186
186
|
- lib/appsignal/integrations/railtie.rb
|
187
187
|
- lib/appsignal/integrations/rake.rb
|
188
188
|
- lib/appsignal/integrations/resque.rb
|
189
|
+
- lib/appsignal/integrations/resque_active_job.rb
|
189
190
|
- lib/appsignal/integrations/sinatra.rb
|
190
191
|
- lib/appsignal/js_exception_transaction.rb
|
191
192
|
- lib/appsignal/marker.rb
|
@@ -244,6 +245,7 @@ files:
|
|
244
245
|
- spec/lib/appsignal/integrations/mongo_ruby_driver_spec.rb
|
245
246
|
- spec/lib/appsignal/integrations/padrino_spec.rb
|
246
247
|
- spec/lib/appsignal/integrations/railtie_spec.rb
|
248
|
+
- spec/lib/appsignal/integrations/resque_active_job_spec.rb
|
247
249
|
- spec/lib/appsignal/integrations/resque_spec.rb
|
248
250
|
- spec/lib/appsignal/integrations/sinatra_spec.rb
|
249
251
|
- spec/lib/appsignal/js_exception_transaction_spec.rb
|
@@ -295,9 +297,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
295
297
|
version: '1.9'
|
296
298
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
297
299
|
requirements:
|
298
|
-
- - "
|
300
|
+
- - ">"
|
299
301
|
- !ruby/object:Gem::Version
|
300
|
-
version:
|
302
|
+
version: 1.3.1
|
301
303
|
requirements: []
|
302
304
|
rubyforge_project:
|
303
305
|
rubygems_version: 2.4.5
|
@@ -340,6 +342,7 @@ test_files:
|
|
340
342
|
- spec/lib/appsignal/integrations/mongo_ruby_driver_spec.rb
|
341
343
|
- spec/lib/appsignal/integrations/padrino_spec.rb
|
342
344
|
- spec/lib/appsignal/integrations/railtie_spec.rb
|
345
|
+
- spec/lib/appsignal/integrations/resque_active_job_spec.rb
|
343
346
|
- spec/lib/appsignal/integrations/resque_spec.rb
|
344
347
|
- spec/lib/appsignal/integrations/sinatra_spec.rb
|
345
348
|
- spec/lib/appsignal/js_exception_transaction_spec.rb
|