appsignal 2.10.4-java → 2.10.8-java
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/.semaphore/semaphore.yml +154 -2
- data/CHANGELOG.md +19 -0
- data/Rakefile +7 -1
- data/appsignal.gemspec +5 -2
- data/build_matrix.yml +17 -2
- data/ext/agent.yml +19 -19
- data/ext/base.rb +4 -2
- data/lib/appsignal.rb +6 -3
- data/lib/appsignal/cli/diagnose.rb +1 -1
- data/lib/appsignal/cli/notify_of_deploy.rb +1 -1
- data/lib/appsignal/event_formatter.rb +1 -2
- data/lib/appsignal/integrations/delayed_job_plugin.rb +16 -3
- data/lib/appsignal/integrations/grape.rb +2 -1
- data/lib/appsignal/minutely.rb +1 -2
- data/lib/appsignal/rack/js_exception_catcher.rb +3 -4
- data/lib/appsignal/transaction.rb +6 -1
- data/lib/appsignal/utils/deprecation_message.rb +2 -2
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/auth_check_spec.rb +1 -1
- data/spec/lib/appsignal/cli/diagnose_spec.rb +1 -1
- data/spec/lib/appsignal/cli/notify_of_deploy_spec.rb +4 -2
- data/spec/lib/appsignal/config_spec.rb +7 -7
- data/spec/lib/appsignal/event_formatter_spec.rb +5 -4
- data/spec/lib/appsignal/hooks/delayed_job_spec.rb +198 -166
- data/spec/lib/appsignal/integrations/grape_spec.rb +10 -0
- data/spec/lib/appsignal/minutely_spec.rb +4 -4
- data/spec/lib/appsignal/rack/js_exception_catcher_spec.rb +9 -5
- data/spec/lib/appsignal/transaction_spec.rb +14 -1
- data/spec/lib/appsignal/transmitter_spec.rb +3 -1
- data/spec/lib/appsignal_spec.rb +2 -2
- data/spec/spec_helper.rb +15 -1
- data/support/install_deps +4 -1
- metadata +21 -21
@@ -93,6 +93,16 @@ if DependencyHelper.grape_present?
|
|
93
93
|
expect(transaction).to receive(:set_error).with(kind_of(ExampleException))
|
94
94
|
end
|
95
95
|
|
96
|
+
context "with env['grape.skip_appsignal_error'] = true" do
|
97
|
+
before do
|
98
|
+
env["grape.skip_appsignal_error"] = true
|
99
|
+
end
|
100
|
+
|
101
|
+
it "does not add the error" do
|
102
|
+
expect(transaction).to_not receive(:set_error)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
96
106
|
after do
|
97
107
|
expect { middleware.call(env) }.to raise_error ExampleException
|
98
108
|
end
|
@@ -285,19 +285,19 @@ describe Appsignal::Minutely do
|
|
285
285
|
end
|
286
286
|
|
287
287
|
describe "#<<" do
|
288
|
-
let(:
|
289
|
-
let(:
|
288
|
+
let(:err_stream) { std_stream }
|
289
|
+
let(:stderr) { err_stream.read }
|
290
290
|
let(:log_stream) { std_stream }
|
291
291
|
let(:log) { log_contents(log_stream) }
|
292
292
|
before { Appsignal.logger = test_logger(log_stream) }
|
293
293
|
|
294
294
|
it "adds the probe, but prints a deprecation warning" do
|
295
295
|
probe = lambda {}
|
296
|
-
|
296
|
+
capture_std_streams(std_stream, err_stream) { collection << probe }
|
297
297
|
deprecation_message = "Deprecated " \
|
298
298
|
"`Appsignal::Minute.probes <<` call. Please use " \
|
299
299
|
"`Appsignal::Minutely.probes.register` instead."
|
300
|
-
expect(
|
300
|
+
expect(stderr).to include "appsignal WARNING: #{deprecation_message}"
|
301
301
|
expect(log).to contains_log :warn, deprecation_message
|
302
302
|
expect(collection[probe.object_id]).to eql(probe)
|
303
303
|
end
|
@@ -11,18 +11,22 @@ describe Appsignal::Rack::JSExceptionCatcher do
|
|
11
11
|
before { Appsignal.config = config }
|
12
12
|
|
13
13
|
describe "#initialize" do
|
14
|
+
let(:out_stream) { std_stream }
|
15
|
+
let(:err_stream) { std_stream }
|
16
|
+
let(:output) { out_stream.read }
|
17
|
+
let(:stderr) { err_stream.read }
|
18
|
+
|
14
19
|
it "logs to the logger" do
|
15
|
-
stdout = std_stream
|
16
|
-
stderr = std_stream
|
17
20
|
log = capture_logs do
|
18
|
-
capture_std_streams(
|
21
|
+
capture_std_streams(out_stream, err_stream) do
|
19
22
|
Appsignal::Rack::JSExceptionCatcher.new(app, options)
|
20
23
|
end
|
21
24
|
end
|
22
25
|
expect(log).to contains_log(:warn, deprecation_message)
|
23
26
|
expect(log).to contains_log(:debug, "Initializing Appsignal::Rack::JSExceptionCatcher")
|
24
|
-
expect(
|
25
|
-
expect(stderr
|
27
|
+
expect(stderr).to include "appsignal WARNING: #{deprecation_message}"
|
28
|
+
expect(stderr).to_not include("appsignal:")
|
29
|
+
expect(output).to be_empty
|
26
30
|
end
|
27
31
|
end
|
28
32
|
|
@@ -574,7 +574,7 @@ describe Appsignal::Transaction do
|
|
574
574
|
end
|
575
575
|
|
576
576
|
context "when the data cannot be converted to JSON" do
|
577
|
-
it "does not update the sample data on the transaction" do
|
577
|
+
it "does not update the sample data on the transaction", :not_ruby19 do
|
578
578
|
klass = Class.new do
|
579
579
|
def to_s
|
580
580
|
raise "foo" # Cause a deliberate error
|
@@ -586,6 +586,19 @@ describe Appsignal::Transaction do
|
|
586
586
|
expect(log_contents(log)).to contains_log :error,
|
587
587
|
"Error generating data (RuntimeError: foo) for"
|
588
588
|
end
|
589
|
+
|
590
|
+
it "does not update the sample data on the transaction", :only_ruby19 do
|
591
|
+
klass = Class.new do
|
592
|
+
def to_s
|
593
|
+
raise "foo" # Cause a deliberate error
|
594
|
+
end
|
595
|
+
end
|
596
|
+
transaction.set_sample_data("params", klass.new => 1)
|
597
|
+
|
598
|
+
expect(transaction.to_h["sample_data"]).to eq({})
|
599
|
+
expect(log_contents(log)).to contains_log :error,
|
600
|
+
"Error generating data (RuntimeError: foo). Can't inspect data."
|
601
|
+
end
|
589
602
|
end
|
590
603
|
end
|
591
604
|
|
@@ -143,7 +143,9 @@ describe Appsignal::Transmitter do
|
|
143
143
|
context "with a proxy" do
|
144
144
|
let(:config) { project_fixture_config("production", :http_proxy => "http://localhost:8080") }
|
145
145
|
|
146
|
-
it
|
146
|
+
it "is of Net::HTTP class", :not_ruby19 do
|
147
|
+
expect(subject).to be_instance_of(Net::HTTP)
|
148
|
+
end
|
147
149
|
it { expect(subject.proxy?).to be_truthy }
|
148
150
|
it { expect(subject.proxy_address).to eq "localhost" }
|
149
151
|
it { expect(subject.proxy_port).to eq 8080 }
|
data/spec/lib/appsignal_spec.rb
CHANGED
@@ -949,7 +949,7 @@ describe Appsignal do
|
|
949
949
|
|
950
950
|
it "outputs deprecated warning" do
|
951
951
|
subject
|
952
|
-
expect(stderr).to include("Appsignal.is_ignored_error? is deprecated with no replacement
|
952
|
+
expect(stderr).to include("Appsignal.is_ignored_error? is deprecated with no replacement")
|
953
953
|
end
|
954
954
|
|
955
955
|
context "when error is not in the ignored list" do
|
@@ -981,7 +981,7 @@ describe Appsignal do
|
|
981
981
|
|
982
982
|
it "outputs deprecated warning" do
|
983
983
|
subject
|
984
|
-
expect(stderr).to include("Appsignal.is_ignored_action? is deprecated with no replacement
|
984
|
+
expect(stderr).to include("Appsignal.is_ignored_action? is deprecated with no replacement")
|
985
985
|
end
|
986
986
|
|
987
987
|
context "when action is not in the ingore list" do
|
data/spec/spec_helper.rb
CHANGED
@@ -9,7 +9,6 @@ Bundler.require :default
|
|
9
9
|
require "cgi"
|
10
10
|
require "rack"
|
11
11
|
require "rspec"
|
12
|
-
require "pry"
|
13
12
|
require "timecop"
|
14
13
|
require "webmock/rspec"
|
15
14
|
|
@@ -30,6 +29,7 @@ if DependencyHelper.rails_present?
|
|
30
29
|
require f
|
31
30
|
end
|
32
31
|
end
|
32
|
+
require "pry" if DependencyHelper.dependency_present?("pry")
|
33
33
|
require "appsignal"
|
34
34
|
# Include patches of AppSignal modules and classes to make test helpers
|
35
35
|
# available.
|
@@ -81,6 +81,20 @@ RSpec.configure do |config|
|
|
81
81
|
FileUtils.mkdir_p(spec_system_tmp_dir)
|
82
82
|
end
|
83
83
|
|
84
|
+
config.before :each, :only_ruby19 => true do
|
85
|
+
is_ruby19 = Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.0.0")
|
86
|
+
next if is_ruby19
|
87
|
+
|
88
|
+
skip "Skipping spec. Only for Ruby 1.9"
|
89
|
+
end
|
90
|
+
|
91
|
+
config.before :each, :not_ruby19 => true do
|
92
|
+
is_ruby19 = Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.0.0")
|
93
|
+
next unless is_ruby19
|
94
|
+
|
95
|
+
skip "Skipping spec for Ruby 1.9"
|
96
|
+
end
|
97
|
+
|
84
98
|
config.before do
|
85
99
|
stop_minutely_probes
|
86
100
|
ENV["RAILS_ENV"] ||= "test"
|
data/support/install_deps
CHANGED
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.10.
|
4
|
+
version: 2.10.8
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
8
8
|
- Thijs Cadier
|
9
9
|
- Tom de Bruijn
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-06-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|
@@ -55,7 +55,7 @@ dependencies:
|
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: '3.8'
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
|
-
name:
|
58
|
+
name: timecop
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - ">="
|
@@ -69,7 +69,7 @@ dependencies:
|
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
|
-
name:
|
72
|
+
name: webmock
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
75
|
- - ">="
|
@@ -83,47 +83,47 @@ dependencies:
|
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '0'
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
|
-
name:
|
86
|
+
name: yard
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
89
|
- - ">="
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version:
|
91
|
+
version: 0.9.20
|
92
92
|
type: :development
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - ">="
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version:
|
98
|
+
version: 0.9.20
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
|
-
name:
|
100
|
+
name: pry
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
|
-
- -
|
103
|
+
- - ">="
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0
|
105
|
+
version: '0'
|
106
106
|
type: :development
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
|
-
- -
|
110
|
+
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: 0
|
112
|
+
version: '0'
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
|
-
name:
|
114
|
+
name: rubocop
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- -
|
117
|
+
- - '='
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: 0.
|
119
|
+
version: 0.50.0
|
120
120
|
type: :development
|
121
121
|
prerelease: false
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
|
-
- -
|
124
|
+
- - '='
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version: 0.
|
126
|
+
version: 0.50.0
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: ffi
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
@@ -393,7 +393,7 @@ metadata:
|
|
393
393
|
documentation_uri: https://docs.appsignal.com/ruby/
|
394
394
|
homepage_uri: https://docs.appsignal.com/ruby/
|
395
395
|
source_code_uri: https://github.com/appsignal/appsignal-ruby
|
396
|
-
post_install_message:
|
396
|
+
post_install_message:
|
397
397
|
rdoc_options: []
|
398
398
|
require_paths:
|
399
399
|
- lib
|
@@ -409,8 +409,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
409
409
|
- !ruby/object:Gem::Version
|
410
410
|
version: '0'
|
411
411
|
requirements: []
|
412
|
-
rubygems_version: 3.1.
|
413
|
-
signing_key:
|
412
|
+
rubygems_version: 3.1.4
|
413
|
+
signing_key:
|
414
414
|
specification_version: 4
|
415
415
|
summary: Logs performance and exception data from your app to appsignal.com
|
416
416
|
test_files:
|