appsignal 2.11.0.beta.1 → 2.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semaphore/semaphore.yml +57 -1
- data/CHANGELOG.md +25 -0
- data/README.md +4 -4
- data/Rakefile +16 -4
- data/appsignal.gemspec +1 -1
- data/build_matrix.yml +2 -2
- data/ext/Rakefile +2 -0
- data/ext/agent.yml +19 -19
- data/ext/base.rb +7 -0
- data/ext/extconf.rb +2 -0
- data/lib/appsignal.rb +1 -0
- data/lib/appsignal/auth_check.rb +4 -2
- data/lib/appsignal/cli/diagnose.rb +1 -1
- data/lib/appsignal/config.rb +82 -17
- data/lib/appsignal/extension.rb +6 -5
- data/lib/appsignal/extension/jruby.rb +6 -5
- data/lib/appsignal/hooks.rb +23 -0
- data/lib/appsignal/hooks/active_job.rb +53 -5
- data/lib/appsignal/hooks/puma.rb +0 -1
- data/lib/appsignal/hooks/sidekiq.rb +1 -2
- data/lib/appsignal/integrations/delayed_job_plugin.rb +1 -1
- data/lib/appsignal/probes.rb +7 -0
- data/lib/appsignal/probes/puma.rb +1 -1
- data/lib/appsignal/probes/sidekiq.rb +3 -1
- data/lib/appsignal/utils/deprecation_message.rb +1 -1
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/auth_check_spec.rb +23 -0
- data/spec/lib/appsignal/capistrano2_spec.rb +1 -1
- data/spec/lib/appsignal/capistrano3_spec.rb +1 -1
- data/spec/lib/appsignal/cli/diagnose_spec.rb +42 -0
- data/spec/lib/appsignal/config_spec.rb +39 -1
- data/spec/lib/appsignal/extension/jruby_spec.rb +31 -28
- data/spec/lib/appsignal/extension_install_failure_spec.rb +23 -0
- data/spec/lib/appsignal/hooks/activejob_spec.rb +143 -10
- data/spec/lib/appsignal/hooks/delayed_job_spec.rb +3 -14
- data/spec/lib/appsignal/hooks/sidekiq_spec.rb +7 -5
- data/spec/lib/appsignal/hooks_spec.rb +57 -0
- data/spec/lib/appsignal/marker_spec.rb +1 -1
- data/spec/spec_helper.rb +5 -0
- data/spec/support/helpers/config_helpers.rb +3 -2
- data/spec/support/helpers/transaction_helpers.rb +1 -1
- data/spec/support/testing.rb +19 -19
- metadata +8 -5
data/spec/support/testing.rb
CHANGED
@@ -38,25 +38,9 @@ module Appsignal
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
class Transaction
|
42
|
-
class << self
|
43
|
-
alias original_new new
|
44
|
-
|
45
|
-
# Override the {Appsignal::Transaction.new} method so we can track which
|
46
|
-
# transactions are created on the {Appsignal::Testing.transactions} list.
|
47
|
-
#
|
48
|
-
# @see TransactionHelpers#last_transaction
|
49
|
-
def new(*args)
|
50
|
-
transaction = original_new(*args)
|
51
|
-
Appsignal::Testing.transactions << transaction
|
52
|
-
transaction
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
41
|
class Extension
|
58
42
|
class Transaction
|
59
|
-
alias original_finish finish
|
43
|
+
alias original_finish finish if method_defined? :finish
|
60
44
|
|
61
45
|
# Override default {Extension::Transaction#finish} behavior to always
|
62
46
|
# return true, which tells the transaction to add its sample data (unless
|
@@ -72,7 +56,7 @@ module Appsignal
|
|
72
56
|
return_value
|
73
57
|
end
|
74
58
|
|
75
|
-
alias original_complete complete
|
59
|
+
alias original_complete complete if method_defined? :complete
|
76
60
|
|
77
61
|
# Override default {Extension::Transaction#complete} behavior to
|
78
62
|
# store the transaction JSON before the transaction is completed
|
@@ -94,7 +78,7 @@ module Appsignal
|
|
94
78
|
@completed || false
|
95
79
|
end
|
96
80
|
|
97
|
-
alias original_to_json to_json
|
81
|
+
alias original_to_json to_json if method_defined? :to_json
|
98
82
|
|
99
83
|
# Override default {Extension::Transaction#to_json} behavior to
|
100
84
|
# return the stored the transaction JSON when the transaction was
|
@@ -111,3 +95,19 @@ module Appsignal
|
|
111
95
|
end
|
112
96
|
end
|
113
97
|
end
|
98
|
+
|
99
|
+
module AppsignalTest
|
100
|
+
module Transaction
|
101
|
+
# Override the {Appsignal::Transaction.new} method so we can track which
|
102
|
+
# transactions are created on the {Appsignal::Testing.transactions} list.
|
103
|
+
#
|
104
|
+
# @see TransactionHelpers#last_transaction
|
105
|
+
def new(*_args)
|
106
|
+
transaction = super
|
107
|
+
Appsignal::Testing.transactions << transaction
|
108
|
+
transaction
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
Appsignal::Transaction.extend(AppsignalTest::Transaction)
|
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: 2.11.0
|
4
|
+
version: 2.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-08-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|
@@ -244,6 +244,7 @@ files:
|
|
244
244
|
- lib/appsignal/logger.rb
|
245
245
|
- lib/appsignal/marker.rb
|
246
246
|
- lib/appsignal/minutely.rb
|
247
|
+
- lib/appsignal/probes.rb
|
247
248
|
- lib/appsignal/probes/puma.rb
|
248
249
|
- lib/appsignal/probes/sidekiq.rb
|
249
250
|
- lib/appsignal/rack/generic_instrumentation.rb
|
@@ -290,6 +291,7 @@ files:
|
|
290
291
|
- spec/lib/appsignal/event_formatter/moped/query_formatter_spec.rb
|
291
292
|
- spec/lib/appsignal/event_formatter_spec.rb
|
292
293
|
- spec/lib/appsignal/extension/jruby_spec.rb
|
294
|
+
- spec/lib/appsignal/extension_install_failure_spec.rb
|
293
295
|
- spec/lib/appsignal/extension_spec.rb
|
294
296
|
- spec/lib/appsignal/garbage_collection_profiler_spec.rb
|
295
297
|
- spec/lib/appsignal/hooks/action_cable_spec.rb
|
@@ -388,7 +390,7 @@ licenses:
|
|
388
390
|
- MIT
|
389
391
|
metadata:
|
390
392
|
bug_tracker_uri: https://github.com/appsignal/appsignal-ruby/issues
|
391
|
-
changelog_uri: https://github.com/appsignal/appsignal-ruby/blob/
|
393
|
+
changelog_uri: https://github.com/appsignal/appsignal-ruby/blob/main/CHANGELOG.md
|
392
394
|
documentation_uri: https://docs.appsignal.com/ruby/
|
393
395
|
homepage_uri: https://docs.appsignal.com/ruby/
|
394
396
|
source_code_uri: https://github.com/appsignal/appsignal-ruby
|
@@ -404,9 +406,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
404
406
|
version: '1.9'
|
405
407
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
406
408
|
requirements:
|
407
|
-
- - "
|
409
|
+
- - ">="
|
408
410
|
- !ruby/object:Gem::Version
|
409
|
-
version:
|
411
|
+
version: '0'
|
410
412
|
requirements: []
|
411
413
|
rubygems_version: 3.1.4
|
412
414
|
signing_key:
|
@@ -437,6 +439,7 @@ test_files:
|
|
437
439
|
- spec/lib/appsignal/event_formatter/moped/query_formatter_spec.rb
|
438
440
|
- spec/lib/appsignal/event_formatter_spec.rb
|
439
441
|
- spec/lib/appsignal/extension/jruby_spec.rb
|
442
|
+
- spec/lib/appsignal/extension_install_failure_spec.rb
|
440
443
|
- spec/lib/appsignal/extension_spec.rb
|
441
444
|
- spec/lib/appsignal/garbage_collection_profiler_spec.rb
|
442
445
|
- spec/lib/appsignal/hooks/action_cable_spec.rb
|