appsignal 2.10.5 → 2.10.6.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/ext/agent.yml +19 -19
- data/lib/appsignal.rb +6 -3
- data/lib/appsignal/cli/notify_of_deploy.rb +1 -1
- data/lib/appsignal/event_formatter.rb +1 -2
- data/lib/appsignal/minutely.rb +1 -2
- data/lib/appsignal/rack/js_exception_catcher.rb +3 -4
- data/lib/appsignal/utils/deprecation_message.rb +2 -2
- data/lib/appsignal/version.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/minutely_spec.rb +4 -4
- data/spec/lib/appsignal/rack/js_exception_catcher_spec.rb +9 -5
- data/spec/lib/appsignal_spec.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51edcc0b81c3ddb5c59dac6422d122ab494aa4a1fb9b502710d75d474bc1f1cd
|
4
|
+
data.tar.gz: ddbaf4156396503c98ace77e7b81f848bfc3b659f43a27333e7ded08de5214e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3894f99f68a715f1e0e47ab229b6614862c1e0bcb9a525646e8f67442a01bd8dd5b0d3f997cf69d53d696ebce5fcc0c2cd7038436ab7c8825d8fa7d58eff450
|
7
|
+
data.tar.gz: 35523e53053a5e592ded456ed48a5e16d676c7c6e773d27eb5fc1a5303ad69fbc72d117f2a1ca89c4fe43319eee047852cd45d01d435ba1feb0f69b930ba5fd1
|
data/CHANGELOG.md
CHANGED
data/ext/agent.yml
CHANGED
@@ -1,70 +1,70 @@
|
|
1
1
|
---
|
2
|
-
version:
|
2
|
+
version: 96b684b
|
3
3
|
mirrors:
|
4
4
|
- https://appsignal-agent-releases.global.ssl.fastly.net
|
5
5
|
- https://d135dj0rjqvssy.cloudfront.net
|
6
6
|
triples:
|
7
7
|
x86_64-darwin:
|
8
8
|
static:
|
9
|
-
checksum:
|
9
|
+
checksum: 6278d03abdcacde207e210374601b0a98eabace8cbc9fb74dffea3c18fc8a252
|
10
10
|
filename: appsignal-x86_64-darwin-all-static.tar.gz
|
11
11
|
dynamic:
|
12
|
-
checksum:
|
12
|
+
checksum: b0ad069bbff68acde7ef19de47938fa786771bae4821c757718f1894b9654a93
|
13
13
|
filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
|
14
14
|
universal-darwin:
|
15
15
|
static:
|
16
|
-
checksum:
|
16
|
+
checksum: 6278d03abdcacde207e210374601b0a98eabace8cbc9fb74dffea3c18fc8a252
|
17
17
|
filename: appsignal-x86_64-darwin-all-static.tar.gz
|
18
18
|
dynamic:
|
19
|
-
checksum:
|
19
|
+
checksum: b0ad069bbff68acde7ef19de47938fa786771bae4821c757718f1894b9654a93
|
20
20
|
filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
|
21
21
|
i686-linux:
|
22
22
|
static:
|
23
|
-
checksum:
|
23
|
+
checksum: f3e79a575241a50d7968fe4743c4f4e5aebb840e0b8664d055383caf696d5d38
|
24
24
|
filename: appsignal-i686-linux-all-static.tar.gz
|
25
25
|
dynamic:
|
26
|
-
checksum:
|
26
|
+
checksum: 0df11c9fe85c9c94336dfb4df788032c78eda1ea648f98e8c1e4e213258816e1
|
27
27
|
filename: appsignal-i686-linux-all-dynamic.tar.gz
|
28
28
|
x86-linux:
|
29
29
|
static:
|
30
|
-
checksum:
|
30
|
+
checksum: f3e79a575241a50d7968fe4743c4f4e5aebb840e0b8664d055383caf696d5d38
|
31
31
|
filename: appsignal-i686-linux-all-static.tar.gz
|
32
32
|
dynamic:
|
33
|
-
checksum:
|
33
|
+
checksum: 0df11c9fe85c9c94336dfb4df788032c78eda1ea648f98e8c1e4e213258816e1
|
34
34
|
filename: appsignal-i686-linux-all-dynamic.tar.gz
|
35
35
|
i686-linux-musl:
|
36
36
|
static:
|
37
|
-
checksum:
|
37
|
+
checksum: 07ab5749b532f1cc6cb45a3334fd950f6d15edacbe6d1bfe25af75b24df73cd1
|
38
38
|
filename: appsignal-i686-linux-musl-all-static.tar.gz
|
39
39
|
x86-linux-musl:
|
40
40
|
static:
|
41
|
-
checksum:
|
41
|
+
checksum: 07ab5749b532f1cc6cb45a3334fd950f6d15edacbe6d1bfe25af75b24df73cd1
|
42
42
|
filename: appsignal-i686-linux-musl-all-static.tar.gz
|
43
43
|
x86_64-linux:
|
44
44
|
static:
|
45
|
-
checksum:
|
45
|
+
checksum: d0e8f48973bca7d783d654404617bb5ab4f47756deb6805c4876bfcda83981cd
|
46
46
|
filename: appsignal-x86_64-linux-all-static.tar.gz
|
47
47
|
dynamic:
|
48
|
-
checksum:
|
48
|
+
checksum: aff7569b04416cd40440d228c5b9881b860e1ecf597bc996ac02c2735f49d993
|
49
49
|
filename: appsignal-x86_64-linux-all-dynamic.tar.gz
|
50
50
|
x86_64-linux-musl:
|
51
51
|
static:
|
52
|
-
checksum:
|
52
|
+
checksum: 2e3db648d0883f2a7e72f1207ec0976b97d144cafe0a3e755df2d91ca93d113f
|
53
53
|
filename: appsignal-x86_64-linux-musl-all-static.tar.gz
|
54
54
|
dynamic:
|
55
|
-
checksum:
|
55
|
+
checksum: 5da62f954d761af47da16f34ab675b46fedd7b91b485574bf895b43896f61ce0
|
56
56
|
filename: appsignal-x86_64-linux-musl-all-dynamic.tar.gz
|
57
57
|
x86_64-freebsd:
|
58
58
|
static:
|
59
|
-
checksum:
|
59
|
+
checksum: 8dc226834ef39bac43dbc4a5c6a812c50c34669b0607036dd9494ac587e72d6a
|
60
60
|
filename: appsignal-x86_64-freebsd-all-static.tar.gz
|
61
61
|
dynamic:
|
62
|
-
checksum:
|
62
|
+
checksum: 0edfbaa450c89dba5750b306043efc00b82851dce2b75fa6ee62de07d30b4a3b
|
63
63
|
filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
64
64
|
amd64-freebsd:
|
65
65
|
static:
|
66
|
-
checksum:
|
66
|
+
checksum: 8dc226834ef39bac43dbc4a5c6a812c50c34669b0607036dd9494ac587e72d6a
|
67
67
|
filename: appsignal-x86_64-freebsd-all-static.tar.gz
|
68
68
|
dynamic:
|
69
|
-
checksum:
|
69
|
+
checksum: 0edfbaa450c89dba5750b306043efc00b82851dce2b75fa6ee62de07d30b4a3b
|
70
70
|
filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
data/lib/appsignal.rb
CHANGED
@@ -6,6 +6,7 @@ require "securerandom"
|
|
6
6
|
require "appsignal/logger"
|
7
7
|
require "appsignal/helpers/instrumentation"
|
8
8
|
require "appsignal/helpers/metrics"
|
9
|
+
require "appsignal/utils/deprecation_message"
|
9
10
|
|
10
11
|
# AppSignal for Ruby gem's main module.
|
11
12
|
#
|
@@ -15,9 +16,9 @@ require "appsignal/helpers/metrics"
|
|
15
16
|
# {Appsignal::Helpers::Metrics}) for ease of use.
|
16
17
|
module Appsignal
|
17
18
|
class << self
|
18
|
-
extend Gem::Deprecate
|
19
19
|
include Helpers::Instrumentation
|
20
20
|
include Helpers::Metrics
|
21
|
+
include Utils::DeprecationMessage
|
21
22
|
|
22
23
|
# Accessor for the AppSignal configuration.
|
23
24
|
# Return the current AppSignal configuration.
|
@@ -280,16 +281,18 @@ module Appsignal
|
|
280
281
|
|
281
282
|
# @deprecated No replacement
|
282
283
|
def is_ignored_error?(error) # rubocop:disable Naming/PredicateName
|
284
|
+
deprecation_message "Appsignal.is_ignored_error? is deprecated " \
|
285
|
+
"with no replacement and will be removed in version 3.0."
|
283
286
|
Appsignal.config[:ignore_errors].include?(error.class.name)
|
284
287
|
end
|
285
288
|
alias :is_ignored_exception? :is_ignored_error?
|
286
|
-
deprecate :is_ignored_error?, :none, 2017, 3
|
287
289
|
|
288
290
|
# @deprecated No replacement
|
289
291
|
def is_ignored_action?(action) # rubocop:disable Naming/PredicateName
|
292
|
+
deprecation_message "Appsignal.is_ignored_action? is deprecated " \
|
293
|
+
"with no replacement and will be removed in version 3.0."
|
290
294
|
Appsignal.config[:ignore_actions].include?(action)
|
291
295
|
end
|
292
|
-
deprecate :is_ignored_action?, :none, 2017, 3
|
293
296
|
|
294
297
|
private
|
295
298
|
|
@@ -94,7 +94,7 @@ module Appsignal
|
|
94
94
|
"see our documentation for more information on the recommended " \
|
95
95
|
"method: " \
|
96
96
|
"https://docs.appsignal.com/application/markers/deploy-markers.html"
|
97
|
-
deprecation_message message
|
97
|
+
deprecation_message message
|
98
98
|
end
|
99
99
|
|
100
100
|
private
|
@@ -91,8 +91,7 @@ module Appsignal
|
|
91
91
|
"Formatter for '#{name}' is using a deprecated registration " \
|
92
92
|
"method. This event formatter will not be loaded. " \
|
93
93
|
"Please update the formatter according to the documentation at: " \
|
94
|
-
"https://docs.appsignal.com/ruby/instrumentation/event-formatters.html"
|
95
|
-
logger
|
94
|
+
"https://docs.appsignal.com/ruby/instrumentation/event-formatters.html"
|
96
95
|
|
97
96
|
EventFormatter.deprecated_formatter_classes[name] = self
|
98
97
|
end
|
data/lib/appsignal/minutely.rb
CHANGED
@@ -33,8 +33,7 @@ module Appsignal
|
|
33
33
|
# @return [void]
|
34
34
|
def <<(probe)
|
35
35
|
deprecation_message "Deprecated `Appsignal::Minute.probes <<` " \
|
36
|
-
"call. Please use `Appsignal::Minutely.probes.register` instead."
|
37
|
-
logger
|
36
|
+
"call. Please use `Appsignal::Minutely.probes.register` instead."
|
38
37
|
register probe.object_id, probe
|
39
38
|
end
|
40
39
|
|
@@ -28,10 +28,9 @@ module Appsignal
|
|
28
28
|
def initialize(app, _options = nil)
|
29
29
|
Appsignal.logger.debug \
|
30
30
|
"Initializing Appsignal::Rack::JSExceptionCatcher"
|
31
|
-
|
32
|
-
"Please use the official AppSignal JavaScript
|
33
|
-
"https://docs.appsignal.com/front-end/"
|
34
|
-
deprecation_message message, Appsignal.logger
|
31
|
+
deprecation_message "The Appsignal::Rack::JSExceptionCatcher is " \
|
32
|
+
"deprecated. Please use the official AppSignal JavaScript " \
|
33
|
+
"integration instead. https://docs.appsignal.com/front-end/"
|
35
34
|
@app = app
|
36
35
|
end
|
37
36
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Appsignal
|
2
2
|
module Utils
|
3
3
|
module DeprecationMessage
|
4
|
-
def deprecation_message(message, logger)
|
5
|
-
$
|
4
|
+
def deprecation_message(message, logger = Appsignal.logger)
|
5
|
+
$stderr.puts "appsignal WARNING: #{message}"
|
6
6
|
logger.warn message
|
7
7
|
end
|
8
8
|
end
|
data/lib/appsignal/version.rb
CHANGED
@@ -5,6 +5,8 @@ describe Appsignal::CLI::NotifyOfDeploy do
|
|
5
5
|
|
6
6
|
let(:out_stream) { std_stream }
|
7
7
|
let(:output) { out_stream.read }
|
8
|
+
let(:err_stream) { std_stream }
|
9
|
+
let(:stderr) { err_stream.read }
|
8
10
|
|
9
11
|
define :include_deploy_notification do
|
10
12
|
match do |log|
|
@@ -32,7 +34,7 @@ describe Appsignal::CLI::NotifyOfDeploy do
|
|
32
34
|
end
|
33
35
|
|
34
36
|
def run
|
35
|
-
|
37
|
+
capture_std_streams(out_stream, err_stream) do
|
36
38
|
run_cli("notify_of_deploy", options)
|
37
39
|
end
|
38
40
|
end
|
@@ -130,7 +132,7 @@ describe Appsignal::CLI::NotifyOfDeploy do
|
|
130
132
|
it "prints a deprecation message" do
|
131
133
|
run
|
132
134
|
deprecation_message = "This command (appsignal notify_of_deploy) has been deprecated"
|
133
|
-
expect(
|
135
|
+
expect(stderr).to include("appsignal WARNING: #{deprecation_message}")
|
134
136
|
expect(log).to contains_log :warn, deprecation_message
|
135
137
|
end
|
136
138
|
|
@@ -323,11 +323,11 @@ describe Appsignal::Config do
|
|
323
323
|
end
|
324
324
|
|
325
325
|
describe "support for old config keys" do
|
326
|
-
let(:
|
327
|
-
let(:
|
326
|
+
let(:err_stream) { std_stream }
|
327
|
+
let(:stderr) { err_stream.read }
|
328
328
|
let(:config) { project_fixture_config(env, {}, test_logger(log)) }
|
329
329
|
let(:log) { StringIO.new }
|
330
|
-
before {
|
330
|
+
before { capture_std_streams(std_stream, err_stream) { config } }
|
331
331
|
|
332
332
|
describe ":api_key" do
|
333
333
|
context "without :push_api_key" do
|
@@ -338,7 +338,7 @@ describe Appsignal::Config do
|
|
338
338
|
expect(config.config_hash).to_not have_key :api_key
|
339
339
|
|
340
340
|
message = "Old configuration key found. Please update the 'api_key' to 'push_api_key'"
|
341
|
-
expect(
|
341
|
+
expect(stderr).to include "appsignal WARNING: #{message}"
|
342
342
|
expect(log_contents(log)).to contains_log :warn, message
|
343
343
|
end
|
344
344
|
end
|
@@ -351,7 +351,7 @@ describe Appsignal::Config do
|
|
351
351
|
expect(config.config_hash).to_not have_key :api_key
|
352
352
|
|
353
353
|
message = "Old configuration key found. Please update the 'api_key' to 'push_api_key'"
|
354
|
-
expect(
|
354
|
+
expect(stderr).to include "appsignal WARNING: #{message}"
|
355
355
|
expect(log_contents(log)).to contains_log :warn, message
|
356
356
|
end
|
357
357
|
end
|
@@ -366,7 +366,7 @@ describe Appsignal::Config do
|
|
366
366
|
expect(config.config_hash).to_not have_key :ignore_exceptions
|
367
367
|
|
368
368
|
message = "Old configuration key found. Please update the 'ignore_exceptions' to 'ignore_errors'"
|
369
|
-
expect(
|
369
|
+
expect(stderr).to include "appsignal WARNING: #{message}"
|
370
370
|
expect(log_contents(log)).to contains_log :warn, message
|
371
371
|
end
|
372
372
|
end
|
@@ -379,7 +379,7 @@ describe Appsignal::Config do
|
|
379
379
|
expect(config.config_hash).to_not have_key :ignore_exceptions
|
380
380
|
|
381
381
|
message = "Old configuration key found. Please update the 'ignore_exceptions' to 'ignore_errors'"
|
382
|
-
expect(
|
382
|
+
expect(stderr).to include "appsignal WARNING: #{message}"
|
383
383
|
expect(log_contents(log)).to contains_log :warn, message
|
384
384
|
end
|
385
385
|
end
|
@@ -116,7 +116,8 @@ describe Appsignal::EventFormatter do
|
|
116
116
|
end
|
117
117
|
|
118
118
|
context "when registering deprecated formatters" do
|
119
|
-
let(:
|
119
|
+
let(:err_stream) { std_stream }
|
120
|
+
let(:stderr) { err_stream.read }
|
120
121
|
let(:deprecated_formatter) do
|
121
122
|
Class.new(Appsignal::EventFormatter) do
|
122
123
|
register "mock.deprecated"
|
@@ -133,16 +134,16 @@ describe Appsignal::EventFormatter do
|
|
133
134
|
"https://docs.appsignal.com/ruby/instrumentation/event-formatters.html"
|
134
135
|
|
135
136
|
logs = capture_logs do
|
136
|
-
|
137
|
+
capture_std_streams(std_stream, err_stream) { deprecated_formatter }
|
137
138
|
end
|
138
139
|
expect(logs).to contains_log :warn, message
|
139
|
-
expect(
|
140
|
+
expect(stderr).to include "appsignal WARNING: #{message}"
|
140
141
|
|
141
142
|
expect(klass.deprecated_formatter_classes.keys).to include("mock.deprecated")
|
142
143
|
end
|
143
144
|
|
144
145
|
it "initializes deprecated formatters" do
|
145
|
-
|
146
|
+
capture_std_streams(std_stream, err_stream) { deprecated_formatter }
|
146
147
|
klass.initialize_deprecated_formatters
|
147
148
|
|
148
149
|
expect(klass.registered?("mock.deprecated")).to be_truthy
|
@@ -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
|
|
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
|
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.10.
|
4
|
+
version: 2.10.6.beta.1
|
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-04-
|
13
|
+
date: 2020-04-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|
@@ -392,9 +392,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
392
392
|
version: '1.9'
|
393
393
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
394
394
|
requirements:
|
395
|
-
- - "
|
395
|
+
- - ">"
|
396
396
|
- !ruby/object:Gem::Version
|
397
|
-
version:
|
397
|
+
version: 1.3.1
|
398
398
|
requirements: []
|
399
399
|
rubygems_version: 3.1.2
|
400
400
|
signing_key:
|