appsignal 2.9.15-java → 2.9.16-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/CHANGELOG.md +5 -0
- data/appsignal.gemspec +1 -1
- data/ext/agent.yml +19 -19
- data/lib/appsignal/helpers/instrumentation.rb +8 -4
- data/lib/appsignal/transaction.rb +5 -0
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/transaction_spec.rb +27 -4
- data/spec/lib/appsignal_spec.rb +13 -5
- 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: 6f1973fb0dee0ffa4bf34c5d47687b466ecb10b29143ee58dcbf6ee10975650b
|
4
|
+
data.tar.gz: 2be9da926d855415ee5c90ef33fe6726585bdf0a200569ed3647ad8865f0e2ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e549806bdd2cbc8bdec815053259137f821ff9a57de1015d249e9db839a23c60b36f8c72dd3847a91e44f57cdec2a5ca0f0bb1591850517308c6ac763af54da
|
7
|
+
data.tar.gz: 2b61cc4e4f2398b629a3a2d9f4d23ccffa504a400757541c409ec4ae00be2f5e2725ac17f0d5b8fbb2feaeb966b8c6c235f4475cd2dd1ddc0f36d949c24a9a2d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.9.16
|
4
|
+
- Check set_error arguments for Exceptions. PR #565
|
5
|
+
- Bump agent to v-1d8917f - commit 737d6b1b8fc9cd2c0564050bb04246d9267dceb7
|
6
|
+
- Only attempt to send queued payloads if we have a successful transmission.
|
7
|
+
|
3
8
|
## 2.9.15
|
4
9
|
- Bump agent to v-690f4b8 - commit cf4f3787395c8524079f3bed3b2c2367296482a9
|
5
10
|
- Validate transmission_interval option.
|
data/appsignal.gemspec
CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
|
|
38
38
|
gem.add_dependency "rack"
|
39
39
|
|
40
40
|
gem.add_development_dependency "rake", "~> 11"
|
41
|
-
gem.add_development_dependency "rspec", "~> 3.
|
41
|
+
gem.add_development_dependency "rspec", "~> 3.8"
|
42
42
|
gem.add_development_dependency "pry"
|
43
43
|
gem.add_development_dependency "timecop"
|
44
44
|
gem.add_development_dependency "webmock"
|
data/ext/agent.yml
CHANGED
@@ -1,70 +1,70 @@
|
|
1
1
|
---
|
2
|
-
version:
|
2
|
+
version: 1d8917f
|
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: 777cf5c54eeb32d9d0d6de48c61f14d977244351a4a9e70c9b30c4221e38012c
|
10
10
|
filename: appsignal-x86_64-darwin-all-static.tar.gz
|
11
11
|
dynamic:
|
12
|
-
checksum:
|
12
|
+
checksum: 2741e747961dbac985f5740c3c747c7a76ce88452a37604ae8c8588343a08464
|
13
13
|
filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
|
14
14
|
universal-darwin:
|
15
15
|
static:
|
16
|
-
checksum:
|
16
|
+
checksum: 777cf5c54eeb32d9d0d6de48c61f14d977244351a4a9e70c9b30c4221e38012c
|
17
17
|
filename: appsignal-x86_64-darwin-all-static.tar.gz
|
18
18
|
dynamic:
|
19
|
-
checksum:
|
19
|
+
checksum: 2741e747961dbac985f5740c3c747c7a76ce88452a37604ae8c8588343a08464
|
20
20
|
filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
|
21
21
|
i686-linux:
|
22
22
|
static:
|
23
|
-
checksum:
|
23
|
+
checksum: 483417f3afbc76b959d68137717b85d44e9dd14c56bad3a44fd370294dc86273
|
24
24
|
filename: appsignal-i686-linux-all-static.tar.gz
|
25
25
|
dynamic:
|
26
|
-
checksum:
|
26
|
+
checksum: b34d007f69eea87a197e5bc8b0cd22f512dc37b732c2ae8c49f053c70c291d2c
|
27
27
|
filename: appsignal-i686-linux-all-dynamic.tar.gz
|
28
28
|
x86-linux:
|
29
29
|
static:
|
30
|
-
checksum:
|
30
|
+
checksum: 483417f3afbc76b959d68137717b85d44e9dd14c56bad3a44fd370294dc86273
|
31
31
|
filename: appsignal-i686-linux-all-static.tar.gz
|
32
32
|
dynamic:
|
33
|
-
checksum:
|
33
|
+
checksum: b34d007f69eea87a197e5bc8b0cd22f512dc37b732c2ae8c49f053c70c291d2c
|
34
34
|
filename: appsignal-i686-linux-all-dynamic.tar.gz
|
35
35
|
i686-linux-musl:
|
36
36
|
static:
|
37
|
-
checksum:
|
37
|
+
checksum: ad58fec875496aae76c870e5a1abdf37af27e4d237fc791c4820ef8ccfa05586
|
38
38
|
filename: appsignal-i686-linux-musl-all-static.tar.gz
|
39
39
|
x86-linux-musl:
|
40
40
|
static:
|
41
|
-
checksum:
|
41
|
+
checksum: ad58fec875496aae76c870e5a1abdf37af27e4d237fc791c4820ef8ccfa05586
|
42
42
|
filename: appsignal-i686-linux-musl-all-static.tar.gz
|
43
43
|
x86_64-linux:
|
44
44
|
static:
|
45
|
-
checksum:
|
45
|
+
checksum: dcab7852e81cbacb0a187cb62ce2f583f3ff835fb7c49c09f4e41df64b4b81c5
|
46
46
|
filename: appsignal-x86_64-linux-all-static.tar.gz
|
47
47
|
dynamic:
|
48
|
-
checksum:
|
48
|
+
checksum: 33523662808254ae1e630e33a2466bf17acfb636e3726d98d11b375619ea2cdf
|
49
49
|
filename: appsignal-x86_64-linux-all-dynamic.tar.gz
|
50
50
|
x86_64-linux-musl:
|
51
51
|
static:
|
52
|
-
checksum:
|
52
|
+
checksum: 63cb4ac3d8befaec47eb907b1ff4c6c4af93e39fd7696db783cb6e656dda297c
|
53
53
|
filename: appsignal-x86_64-linux-musl-all-static.tar.gz
|
54
54
|
dynamic:
|
55
|
-
checksum:
|
55
|
+
checksum: 4116c2757c2be2b8eb259d787034ec4ab4123889735ded1ef584afbd68a8247a
|
56
56
|
filename: appsignal-x86_64-linux-musl-all-dynamic.tar.gz
|
57
57
|
x86_64-freebsd:
|
58
58
|
static:
|
59
|
-
checksum:
|
59
|
+
checksum: 39c006dd131d1ca452ff79ec988688a69823e0abf26ee6966b1639cc42720416
|
60
60
|
filename: appsignal-x86_64-freebsd-all-static.tar.gz
|
61
61
|
dynamic:
|
62
|
-
checksum:
|
62
|
+
checksum: 937fb029f9f6a57aa818d46dcf8fbbfe06481c0765ad591859fbc6970a32a1df
|
63
63
|
filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
64
64
|
amd64-freebsd:
|
65
65
|
static:
|
66
|
-
checksum:
|
66
|
+
checksum: 39c006dd131d1ca452ff79ec988688a69823e0abf26ee6966b1639cc42720416
|
67
67
|
filename: appsignal-x86_64-freebsd-all-static.tar.gz
|
68
68
|
dynamic:
|
69
|
-
checksum:
|
69
|
+
checksum: 937fb029f9f6a57aa818d46dcf8fbbfe06481c0765ad591859fbc6970a32a1df
|
70
70
|
filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
@@ -201,7 +201,8 @@ module Appsignal
|
|
201
201
|
)
|
202
202
|
return unless active?
|
203
203
|
unless error.is_a?(Exception)
|
204
|
-
logger.error
|
204
|
+
logger.error "Appsignal.send_error: Cannot send error. The given " \
|
205
|
+
"value is not an exception: #{error.inspect}"
|
205
206
|
return
|
206
207
|
end
|
207
208
|
transaction = Appsignal::Transaction.new(
|
@@ -256,9 +257,12 @@ module Appsignal
|
|
256
257
|
# Exception handling guide
|
257
258
|
# @since 0.6.6
|
258
259
|
def set_error(exception, tags = nil, namespace = nil)
|
259
|
-
|
260
|
-
|
261
|
-
exception.
|
260
|
+
unless exception.is_a?(Exception)
|
261
|
+
logger.error "Appsignal.set_error: Cannot set error. The given " \
|
262
|
+
"value is not an exception: #{exception.inspect}"
|
263
|
+
return
|
264
|
+
end
|
265
|
+
return if !active? || Appsignal::Transaction.current.nil?
|
262
266
|
transaction = Appsignal::Transaction.current
|
263
267
|
transaction.set_error(exception)
|
264
268
|
transaction.set_tags(tags) if tags
|
@@ -264,6 +264,11 @@ module Appsignal
|
|
264
264
|
end
|
265
265
|
|
266
266
|
def set_error(error)
|
267
|
+
unless error.is_a?(Exception)
|
268
|
+
Appsignal.logger.error "Appsignal::Transaction#set_error: Cannot set error. " \
|
269
|
+
"The given value is not an exception: #{error.inspect}"
|
270
|
+
return
|
271
|
+
end
|
267
272
|
return unless error
|
268
273
|
return unless Appsignal.active?
|
269
274
|
|
data/lib/appsignal/version.rb
CHANGED
@@ -630,7 +630,11 @@ describe Appsignal::Transaction do
|
|
630
630
|
|
631
631
|
describe "#set_error" do
|
632
632
|
let(:env) { http_request_env_with_data }
|
633
|
-
let(:error)
|
633
|
+
let(:error) do
|
634
|
+
e = ExampleStandardError.new("test message")
|
635
|
+
allow(e).to receive(:backtrace).and_return(["line 1"])
|
636
|
+
e
|
637
|
+
end
|
634
638
|
|
635
639
|
it "should also respond to add_exception for backwords compatibility" do
|
636
640
|
expect(transaction).to respond_to(:add_exception)
|
@@ -643,10 +647,24 @@ describe Appsignal::Transaction do
|
|
643
647
|
transaction.set_error(error)
|
644
648
|
end
|
645
649
|
|
650
|
+
context "when error is not an error" do
|
651
|
+
let(:error) { Object.new }
|
652
|
+
|
653
|
+
it "does not add the error" do
|
654
|
+
expect(Appsignal.logger).to receive(:error).with(
|
655
|
+
"Appsignal::Transaction#set_error: Cannot set error. " \
|
656
|
+
"The given value is not an exception: #{error.inspect}"
|
657
|
+
)
|
658
|
+
expect(transaction.ext).to_not receive(:set_error)
|
659
|
+
|
660
|
+
transaction.set_error(error)
|
661
|
+
end
|
662
|
+
end
|
663
|
+
|
646
664
|
context "for a http request" do
|
647
665
|
it "should set an error in the extension" do
|
648
666
|
expect(transaction.ext).to receive(:set_error).with(
|
649
|
-
"
|
667
|
+
"ExampleStandardError",
|
650
668
|
"test message",
|
651
669
|
Appsignal::Utils::Data.generate(["line 1"])
|
652
670
|
)
|
@@ -656,7 +674,12 @@ describe Appsignal::Transaction do
|
|
656
674
|
end
|
657
675
|
|
658
676
|
context "when error message is nil" do
|
659
|
-
let(:error)
|
677
|
+
let(:error) do
|
678
|
+
e = ExampleStandardError.new
|
679
|
+
allow(e).to receive(:message).and_return(nil)
|
680
|
+
allow(e).to receive(:backtrace).and_return(["line 1"])
|
681
|
+
e
|
682
|
+
end
|
660
683
|
|
661
684
|
it "should not raise an error" do
|
662
685
|
expect { transaction.set_error(error) }.to_not raise_error
|
@@ -664,7 +687,7 @@ describe Appsignal::Transaction do
|
|
664
687
|
|
665
688
|
it "should set an error in the extension" do
|
666
689
|
expect(transaction.ext).to receive(:set_error).with(
|
667
|
-
"
|
690
|
+
"ExampleStandardError",
|
668
691
|
"",
|
669
692
|
Appsignal::Utils::Data.generate(["line 1"])
|
670
693
|
)
|
data/spec/lib/appsignal_spec.rb
CHANGED
@@ -657,8 +657,10 @@ describe Appsignal do
|
|
657
657
|
let(:error) { double }
|
658
658
|
|
659
659
|
it "logs an error message" do
|
660
|
-
expect(Appsignal.logger).to receive(:error)
|
661
|
-
.
|
660
|
+
expect(Appsignal.logger).to receive(:error).with(
|
661
|
+
"Appsignal.send_error: Cannot send error. " \
|
662
|
+
"The given value is not an exception: #{error.inspect}"
|
663
|
+
)
|
662
664
|
end
|
663
665
|
|
664
666
|
it "does not send the error" do
|
@@ -778,13 +780,19 @@ describe Appsignal do
|
|
778
780
|
Appsignal.set_error(error)
|
779
781
|
end
|
780
782
|
|
781
|
-
context "when the error is
|
782
|
-
|
783
|
+
context "when the error is not an Exception" do
|
784
|
+
let(:error) { Object.new }
|
785
|
+
|
786
|
+
it "logs an error" do
|
787
|
+
expect(Appsignal.logger).to receive(:error).with(
|
788
|
+
"Appsignal.set_error: Cannot set error. " \
|
789
|
+
"The given value is not an exception: #{error.inspect}"
|
790
|
+
)
|
783
791
|
expect(transaction).to_not receive(:set_error)
|
784
792
|
expect(transaction).to_not receive(:set_tags)
|
785
793
|
expect(transaction).to_not receive(:set_namespace)
|
786
794
|
|
787
|
-
Appsignal.set_error(
|
795
|
+
Appsignal.set_error(error)
|
788
796
|
end
|
789
797
|
end
|
790
798
|
|
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.9.
|
4
|
+
version: 2.9.16
|
5
5
|
platform: java
|
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: 2019-09-
|
13
|
+
date: 2019-09-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|
@@ -46,14 +46,14 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '3.
|
49
|
+
version: '3.8'
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - "~>"
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: '3.
|
56
|
+
version: '3.8'
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: pry
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|