appsignal 2.9.15-java → 2.9.16-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 141fd94f295ec5650c66f5fb59930d40992c7df42a05f5dcc0796b67d1be6b32
4
- data.tar.gz: 15f749b731e23358fddd165ea4ff674914766efd2db58121415deedb8b9a006f
3
+ metadata.gz: 6f1973fb0dee0ffa4bf34c5d47687b466ecb10b29143ee58dcbf6ee10975650b
4
+ data.tar.gz: 2be9da926d855415ee5c90ef33fe6726585bdf0a200569ed3647ad8865f0e2ff
5
5
  SHA512:
6
- metadata.gz: 6d455369471e43fdbe0cf4626caf4d87293f9320262e8078486be01fc1b7f475919a859277e14882f7eca1b974b2db1a04a225d138b77e5d5282966cbcfa6376
7
- data.tar.gz: 594eec591ad54d29a61c4dd412c014143be1d0bdc9e1bf1e8e6863fad91a79898de618060ae2c795aaf998f8a870b6d20458d2a818d5d16e6feb94034647a1c2
6
+ metadata.gz: 7e549806bdd2cbc8bdec815053259137f821ff9a57de1015d249e9db839a23c60b36f8c72dd3847a91e44f57cdec2a5ca0f0bb1591850517308c6ac763af54da
7
+ data.tar.gz: 2b61cc4e4f2398b629a3a2d9f4d23ccffa504a400757541c409ec4ae00be2f5e2725ac17f0d5b8fbb2feaeb966b8c6c235f4475cd2dd1ddc0f36d949c24a9a2d
@@ -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.
@@ -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.7"
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"
@@ -1,70 +1,70 @@
1
1
  ---
2
- version: 690f4b8
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: f6dbba7d0dbb65a4eab62fbfeb28ef05812309695519f0207b2240659e656ae4
9
+ checksum: 777cf5c54eeb32d9d0d6de48c61f14d977244351a4a9e70c9b30c4221e38012c
10
10
  filename: appsignal-x86_64-darwin-all-static.tar.gz
11
11
  dynamic:
12
- checksum: a18e6c9b21141bc97699df66e7c06261118e8130d2bdd43568e415b46836cb28
12
+ checksum: 2741e747961dbac985f5740c3c747c7a76ce88452a37604ae8c8588343a08464
13
13
  filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
14
14
  universal-darwin:
15
15
  static:
16
- checksum: f6dbba7d0dbb65a4eab62fbfeb28ef05812309695519f0207b2240659e656ae4
16
+ checksum: 777cf5c54eeb32d9d0d6de48c61f14d977244351a4a9e70c9b30c4221e38012c
17
17
  filename: appsignal-x86_64-darwin-all-static.tar.gz
18
18
  dynamic:
19
- checksum: a18e6c9b21141bc97699df66e7c06261118e8130d2bdd43568e415b46836cb28
19
+ checksum: 2741e747961dbac985f5740c3c747c7a76ce88452a37604ae8c8588343a08464
20
20
  filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
21
21
  i686-linux:
22
22
  static:
23
- checksum: 28cb5a7d1123b9ee3e27dec8d2f4252326cd80bba7c2c976790e9e4ac018e4a7
23
+ checksum: 483417f3afbc76b959d68137717b85d44e9dd14c56bad3a44fd370294dc86273
24
24
  filename: appsignal-i686-linux-all-static.tar.gz
25
25
  dynamic:
26
- checksum: 0c361cb5b06aa8489c345c74c842ab99432afa224260c99521c68e826eb00da7
26
+ checksum: b34d007f69eea87a197e5bc8b0cd22f512dc37b732c2ae8c49f053c70c291d2c
27
27
  filename: appsignal-i686-linux-all-dynamic.tar.gz
28
28
  x86-linux:
29
29
  static:
30
- checksum: 28cb5a7d1123b9ee3e27dec8d2f4252326cd80bba7c2c976790e9e4ac018e4a7
30
+ checksum: 483417f3afbc76b959d68137717b85d44e9dd14c56bad3a44fd370294dc86273
31
31
  filename: appsignal-i686-linux-all-static.tar.gz
32
32
  dynamic:
33
- checksum: 0c361cb5b06aa8489c345c74c842ab99432afa224260c99521c68e826eb00da7
33
+ checksum: b34d007f69eea87a197e5bc8b0cd22f512dc37b732c2ae8c49f053c70c291d2c
34
34
  filename: appsignal-i686-linux-all-dynamic.tar.gz
35
35
  i686-linux-musl:
36
36
  static:
37
- checksum: 712a91ebbfe0fac628d6bb40bd064f2f85af4055f5d2d69aa6d64be961da3616
37
+ checksum: ad58fec875496aae76c870e5a1abdf37af27e4d237fc791c4820ef8ccfa05586
38
38
  filename: appsignal-i686-linux-musl-all-static.tar.gz
39
39
  x86-linux-musl:
40
40
  static:
41
- checksum: 712a91ebbfe0fac628d6bb40bd064f2f85af4055f5d2d69aa6d64be961da3616
41
+ checksum: ad58fec875496aae76c870e5a1abdf37af27e4d237fc791c4820ef8ccfa05586
42
42
  filename: appsignal-i686-linux-musl-all-static.tar.gz
43
43
  x86_64-linux:
44
44
  static:
45
- checksum: c6622328708431e5286bf939a6c21b63290572e50cf5324717da0e6f89fcf565
45
+ checksum: dcab7852e81cbacb0a187cb62ce2f583f3ff835fb7c49c09f4e41df64b4b81c5
46
46
  filename: appsignal-x86_64-linux-all-static.tar.gz
47
47
  dynamic:
48
- checksum: 7329f923eef9e695f2a7690adde3bb4ad43d95a45b177bf3f3c84fe17dabcd32
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: 7f42fc3f714fbab0bcc3e915cc173b18c7f07f3e47687b2bded94d907534e3cc
52
+ checksum: 63cb4ac3d8befaec47eb907b1ff4c6c4af93e39fd7696db783cb6e656dda297c
53
53
  filename: appsignal-x86_64-linux-musl-all-static.tar.gz
54
54
  dynamic:
55
- checksum: 189888ce2cf1b91c3334434bfe5a6f28f653b8d9b8e9291d16fc36383e3053b8
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: f06d8c5bc05a2c58e2ac88027dba8c3fef3bc9a698a68500143912f02da0f8d3
59
+ checksum: 39c006dd131d1ca452ff79ec988688a69823e0abf26ee6966b1639cc42720416
60
60
  filename: appsignal-x86_64-freebsd-all-static.tar.gz
61
61
  dynamic:
62
- checksum: 469741be25df8f3685cc32ade106f41588224b65fb11846b0176a6dec6274775
62
+ checksum: 937fb029f9f6a57aa818d46dcf8fbbfe06481c0765ad591859fbc6970a32a1df
63
63
  filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
64
64
  amd64-freebsd:
65
65
  static:
66
- checksum: f06d8c5bc05a2c58e2ac88027dba8c3fef3bc9a698a68500143912f02da0f8d3
66
+ checksum: 39c006dd131d1ca452ff79ec988688a69823e0abf26ee6966b1639cc42720416
67
67
  filename: appsignal-x86_64-freebsd-all-static.tar.gz
68
68
  dynamic:
69
- checksum: 469741be25df8f3685cc32ade106f41588224b65fb11846b0176a6dec6274775
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("Can't send error, given value is not an exception")
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
- return if !active? ||
260
- Appsignal::Transaction.current.nil? ||
261
- exception.nil?
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Appsignal
4
- VERSION = "2.9.15".freeze
4
+ VERSION = "2.9.16".freeze
5
5
  end
@@ -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) { double(:error, :message => "test message", :backtrace => ["line 1"]) }
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
- "RSpec::Mocks::Double",
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) { double(:error, :message => nil, :backtrace => ["line 1"]) }
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
- "RSpec::Mocks::Double",
690
+ "ExampleStandardError",
668
691
  "",
669
692
  Appsignal::Utils::Data.generate(["line 1"])
670
693
  )
@@ -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
- .with("Can't send error, given value is not an exception")
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 nil" do
782
- it "does nothing" do
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(nil)
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.15
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-23 00:00:00.000000000 Z
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.7'
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.7'
56
+ version: '3.8'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: pry
59
59
  requirement: !ruby/object:Gem::Requirement