appsignal 3.4.15 → 3.5.0

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: 07e2140415b95bfc8d93ef179ef1005af8276c840ee0e7e22882bb02980e7aac
4
- data.tar.gz: 2bd4fdbb6e01971ee29333b0f00b9e0019c04c65a6edb040964a0cd2b40cd95b
3
+ metadata.gz: fc20e180510d89079b968f752fe4378590ef2edc3c881af7390e4eca883829c3
4
+ data.tar.gz: e475459d746362fe4a1d66ea260596dd376dd78de5ce0c6192784a61afcaa17b
5
5
  SHA512:
6
- metadata.gz: 48524017c1fce4a4a402da303474b8ca68e2768da6b584e52073d1e1bca135d9184f9b2aeabc1663e3f9687ebbb1982bd7bc4f0a26e6642c76bfcef950e481ed
7
- data.tar.gz: 3b9a1f1536b8797515473370324c53892087f6634834455863f5df95a1b4c43ecb5c43fbb9ffa7fb6c29660d4f4d5599141616b3a67befd4efe989258c2e8379
6
+ metadata.gz: e794952ff70e7b8170bb173ee594cfa609a28cc713e04959a3bc97d274e7c547519f54404dfa2a1ac9d71c0ee47cb999bbbc21f19a66e2cef3d39d88f0ac30f7
7
+ data.tar.gz: 62c66a4814ee5663d7db3a1c2c1e844e5024c152425998685c12cd48e52fad3d6a63027457c3f599d2e506ca5b924734d1d48ca7c7d2b348ab80d2d831260ec3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 3.5.0
4
+
5
+ ### Added
6
+
7
+ - [cee1676f](https://github.com/appsignal/appsignal-ruby/commit/cee1676fc5539e380c58e8a824b5c59c3c927119) minor - Nested errors are now supported. The error causes are stored as sample data on the transaction so they can be displayed in the UI.
8
+
9
+ ## 3.4.16
10
+
11
+ ### Changed
12
+
13
+ - [2149c064](https://github.com/appsignal/appsignal-ruby/commit/2149c064be917d2784c4e5571fdfbd0c2ade59ca) patch - Filter more disk mountpoints for disk usage and disk IO stats. This helps reduce noise in the host metrics by focussing on more important mountpoints.
14
+
15
+ The following mountpoint are ignored. Any mountpoint containing:
16
+
17
+ - `/etc/hostname`
18
+ - `/etc/hosts`
19
+ - `/etc/resolv.conf`
20
+ - `/snap/`
21
+ - `/proc/`
22
+
23
+ ### Fixed
24
+
25
+ - [2149c064](https://github.com/appsignal/appsignal-ruby/commit/2149c064be917d2784c4e5571fdfbd0c2ade59ca) patch - - Support disk usage reporting (using `df`) on Alpine Linux. This host metric would report an error on Alpine Linux.
26
+ - When a disk mountpoint has no inodes usage percentage, skip the mountpoint, and report the inodes information successfully for the inodes that do have an inodes usage percentage.
27
+
3
28
  ## 3.4.15
4
29
 
5
30
  ### Changed
data/ext/agent.rb CHANGED
@@ -6,7 +6,7 @@
6
6
  # Modifications to this file will be overwritten with the next agent release.
7
7
 
8
8
  APPSIGNAL_AGENT_CONFIG = {
9
- "version" => "eec7f7b",
9
+ "version" => "aa4daed",
10
10
  "mirrors" => [
11
11
  "https://appsignal-agent-releases.global.ssl.fastly.net",
12
12
  "https://d135dj0rjqvssy.cloudfront.net"
@@ -14,131 +14,131 @@ APPSIGNAL_AGENT_CONFIG = {
14
14
  "triples" => {
15
15
  "x86_64-darwin" => {
16
16
  "static" => {
17
- "checksum" => "69da25f14fbfddffb83214355cda86955024f9f59ef6ac06faf223a475bdbbf7",
17
+ "checksum" => "8216a8c083ffb7f286fd249c82fb63fe45527276a8a616c0921da3f3e8b9073a",
18
18
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
19
19
  },
20
20
  "dynamic" => {
21
- "checksum" => "072ffea3f86fa40d2ed75c0175628dada5c9f3e87d734aea5f5efc2c6aec6266",
21
+ "checksum" => "7d6a5dee8ff1e485a955871ea00a8b7fb407ad7f00b79fac1cd97e97ebc01598",
22
22
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
23
23
  }
24
24
  },
25
25
  "universal-darwin" => {
26
26
  "static" => {
27
- "checksum" => "69da25f14fbfddffb83214355cda86955024f9f59ef6ac06faf223a475bdbbf7",
27
+ "checksum" => "8216a8c083ffb7f286fd249c82fb63fe45527276a8a616c0921da3f3e8b9073a",
28
28
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
29
29
  },
30
30
  "dynamic" => {
31
- "checksum" => "072ffea3f86fa40d2ed75c0175628dada5c9f3e87d734aea5f5efc2c6aec6266",
31
+ "checksum" => "7d6a5dee8ff1e485a955871ea00a8b7fb407ad7f00b79fac1cd97e97ebc01598",
32
32
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
33
33
  }
34
34
  },
35
35
  "aarch64-darwin" => {
36
36
  "static" => {
37
- "checksum" => "281e2daefeb513ea3c8af7cc58397753559606643ad2091bd5c5ba6b9a2a1aca",
37
+ "checksum" => "5f1782b53f24e2d8f8e0681eb7934af93532f84475c44b7389b2fe88ac34630d",
38
38
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
39
39
  },
40
40
  "dynamic" => {
41
- "checksum" => "baf3d77216e1e9b467b4026baab15beb6538d5145c1dd718a6874ed3026c6a94",
41
+ "checksum" => "bee286947c121768a5746130016b4d54063332498e27793e97989ac6b65ca02a",
42
42
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
43
43
  }
44
44
  },
45
45
  "arm64-darwin" => {
46
46
  "static" => {
47
- "checksum" => "281e2daefeb513ea3c8af7cc58397753559606643ad2091bd5c5ba6b9a2a1aca",
47
+ "checksum" => "5f1782b53f24e2d8f8e0681eb7934af93532f84475c44b7389b2fe88ac34630d",
48
48
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
49
49
  },
50
50
  "dynamic" => {
51
- "checksum" => "baf3d77216e1e9b467b4026baab15beb6538d5145c1dd718a6874ed3026c6a94",
51
+ "checksum" => "bee286947c121768a5746130016b4d54063332498e27793e97989ac6b65ca02a",
52
52
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
53
53
  }
54
54
  },
55
55
  "arm-darwin" => {
56
56
  "static" => {
57
- "checksum" => "281e2daefeb513ea3c8af7cc58397753559606643ad2091bd5c5ba6b9a2a1aca",
57
+ "checksum" => "5f1782b53f24e2d8f8e0681eb7934af93532f84475c44b7389b2fe88ac34630d",
58
58
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
59
59
  },
60
60
  "dynamic" => {
61
- "checksum" => "baf3d77216e1e9b467b4026baab15beb6538d5145c1dd718a6874ed3026c6a94",
61
+ "checksum" => "bee286947c121768a5746130016b4d54063332498e27793e97989ac6b65ca02a",
62
62
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
63
63
  }
64
64
  },
65
65
  "aarch64-linux" => {
66
66
  "static" => {
67
- "checksum" => "985ef69698d9cf44c4965f971043be9f65fa4ac825f30e7feca8a9fff210d65a",
67
+ "checksum" => "0743450b2ad48971ec3251565898e33b9af214b4d2db36e12b7089ff3d3b8f3e",
68
68
  "filename" => "appsignal-aarch64-linux-all-static.tar.gz"
69
69
  },
70
70
  "dynamic" => {
71
- "checksum" => "04184dc9658662586e076fd5a72483ba0ebebe1803feee7a3bcc01ab5bd2bd83",
71
+ "checksum" => "8382787ff417a7c89f8679504e0e748eb68e4623ca50b1d6f2a740ba8ee8bbb9",
72
72
  "filename" => "appsignal-aarch64-linux-all-dynamic.tar.gz"
73
73
  }
74
74
  },
75
75
  "i686-linux" => {
76
76
  "static" => {
77
- "checksum" => "4d5c3b4cdbcdd11cf78a3c62a57fef05ad1c62dd136289afcd184897af3ab1c5",
77
+ "checksum" => "32a72c3a9745348251fe20e8e8d10f52476e8cec47ea3b2495c14d1ca4a30ac5",
78
78
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
79
79
  },
80
80
  "dynamic" => {
81
- "checksum" => "9ced8a9fc8e270cfacf4f9f6bf9f0d0ad0a636403878845c572fdc29c62de972",
81
+ "checksum" => "0d383ee9d9781d6ddb09e89e2e3f24d43d5fe228d5a5a5c89f13de14715ccfe3",
82
82
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
83
83
  }
84
84
  },
85
85
  "x86-linux" => {
86
86
  "static" => {
87
- "checksum" => "4d5c3b4cdbcdd11cf78a3c62a57fef05ad1c62dd136289afcd184897af3ab1c5",
87
+ "checksum" => "32a72c3a9745348251fe20e8e8d10f52476e8cec47ea3b2495c14d1ca4a30ac5",
88
88
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
89
89
  },
90
90
  "dynamic" => {
91
- "checksum" => "9ced8a9fc8e270cfacf4f9f6bf9f0d0ad0a636403878845c572fdc29c62de972",
91
+ "checksum" => "0d383ee9d9781d6ddb09e89e2e3f24d43d5fe228d5a5a5c89f13de14715ccfe3",
92
92
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
93
93
  }
94
94
  },
95
95
  "x86_64-linux" => {
96
96
  "static" => {
97
- "checksum" => "5db0bb195c4c5ff72352094d038ebfc75e0153b6fa54f285f6b0908bad20fea0",
97
+ "checksum" => "8804bdd137e87576f0f32e565ecafc395da118e1d427155c38f27cc7d222777d",
98
98
  "filename" => "appsignal-x86_64-linux-all-static.tar.gz"
99
99
  },
100
100
  "dynamic" => {
101
- "checksum" => "db0fa7384f08e3a1f4fcf75298264b4f2dea2afda49d37dc305f0697781796bc",
101
+ "checksum" => "bc545a567ba98a63fe838faf4c6ddcc039295774f936b83d9038a3846b636131",
102
102
  "filename" => "appsignal-x86_64-linux-all-dynamic.tar.gz"
103
103
  }
104
104
  },
105
105
  "x86_64-linux-musl" => {
106
106
  "static" => {
107
- "checksum" => "625fa055ae4944a4afe648a7a2e71e87a82384e96f93e56254b455b2ab049612",
107
+ "checksum" => "09f97d946a7d1c45f24824e8c0c296ac49fdbf0a8e9869e45176838bc82929c5",
108
108
  "filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
109
109
  },
110
110
  "dynamic" => {
111
- "checksum" => "45fca37069ed23f10db14f10df3be342cd2fd0016b274c827f6c5c53370e373d",
111
+ "checksum" => "eea4f2e4ebec0c44435c6185c005722fdf33aa69ed70c836a61090e577d4825a",
112
112
  "filename" => "appsignal-x86_64-linux-musl-all-dynamic.tar.gz"
113
113
  }
114
114
  },
115
115
  "aarch64-linux-musl" => {
116
116
  "static" => {
117
- "checksum" => "82ef1d0a98f6dfa81568dff539eb932973af5baaa6c737c4017faebf1aedf45e",
117
+ "checksum" => "e0f942c8053e2939cffce722c35160d8798d867d91902b6cb9b6ccf7513d0059",
118
118
  "filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
119
119
  },
120
120
  "dynamic" => {
121
- "checksum" => "9fcbf458dc1ff79ebafa83791453abd86cfd425ac58ff0ef8d0f7bc6e3718765",
121
+ "checksum" => "c94dc32400270d90db73277d790c26601f743dbda549314ecf3282b0d96a547b",
122
122
  "filename" => "appsignal-aarch64-linux-musl-all-dynamic.tar.gz"
123
123
  }
124
124
  },
125
125
  "x86_64-freebsd" => {
126
126
  "static" => {
127
- "checksum" => "8fc180e5b3f77df90e4d1498d729e1fa2e8fa713689e92173d98ab69f4332557",
127
+ "checksum" => "c105e18399df06884983ec58602a848369a98806ba8264e6dc2b7a06476dd582",
128
128
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
129
129
  },
130
130
  "dynamic" => {
131
- "checksum" => "8c09f31cc88f0322cdad0b8dc3d8d194a70df69d327185de447f57d74eeb80f9",
131
+ "checksum" => "f7fc985a47123a88498d0ab541e842e9acb02464400cef8e6937d7ea0daf4df4",
132
132
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
133
133
  }
134
134
  },
135
135
  "amd64-freebsd" => {
136
136
  "static" => {
137
- "checksum" => "8fc180e5b3f77df90e4d1498d729e1fa2e8fa713689e92173d98ab69f4332557",
137
+ "checksum" => "c105e18399df06884983ec58602a848369a98806ba8264e6dc2b7a06476dd582",
138
138
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
139
139
  },
140
140
  "dynamic" => {
141
- "checksum" => "8c09f31cc88f0322cdad0b8dc3d8d194a70df69d327185de447f57d74eeb80f9",
141
+ "checksum" => "f7fc985a47123a88498d0ab541e842e9acb02464400cef8e6937d7ea0daf4df4",
142
142
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
143
143
  }
144
144
  }
@@ -12,6 +12,7 @@ module Appsignal
12
12
  ALLOWED_TAG_KEY_TYPES = [Symbol, String].freeze
13
13
  ALLOWED_TAG_VALUE_TYPES = [Symbol, String, Integer].freeze
14
14
  BREADCRUMB_LIMIT = 20
15
+ ERROR_CAUSES_LIMIT = 10
15
16
 
16
17
  class << self
17
18
  def create(id, namespace, request, options = {})
@@ -374,6 +375,41 @@ module Appsignal
374
375
  cleaned_error_message(error),
375
376
  backtrace ? Appsignal::Utils::Data.generate(backtrace) : Appsignal::Extension.data_array_new
376
377
  )
378
+
379
+ root_cause_missing = false
380
+
381
+ causes = []
382
+ while error
383
+ error = error.cause
384
+
385
+ break unless error
386
+
387
+ if causes.length >= ERROR_CAUSES_LIMIT
388
+ Appsignal.logger.debug "Appsignal::Transaction#set_error: Error has more " \
389
+ "than #{ERROR_CAUSES_LIMIT} error causes. Only the first #{ERROR_CAUSES_LIMIT} " \
390
+ "will be reported."
391
+ root_cause_missing = true
392
+ break
393
+ end
394
+
395
+ causes << error
396
+ end
397
+
398
+ return if causes.empty?
399
+
400
+ causes_sample_data = causes.map do |e|
401
+ {
402
+ :name => e.class.name,
403
+ :message => cleaned_error_message(e)
404
+ }
405
+ end
406
+
407
+ causes_sample_data.last[:is_root_cause] = false if root_cause_missing
408
+
409
+ set_sample_data(
410
+ "error_causes",
411
+ causes_sample_data
412
+ )
377
413
  end
378
414
  alias_method :add_exception, :set_error
379
415
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Appsignal
4
- VERSION = "3.4.15"
4
+ VERSION = "3.5.0"
5
5
  end
@@ -788,6 +788,99 @@ describe Appsignal::Transaction do
788
788
  end
789
789
  end
790
790
 
791
+ context "when the error has no causes" do
792
+ it "should not send the causes information as sample data" do
793
+ expect(transaction.ext).to_not receive(:set_sample_data)
794
+
795
+ transaction.set_error(error)
796
+ end
797
+ end
798
+
799
+ context "when the error has multiple causes" do
800
+ let(:error) do
801
+ e = ExampleStandardError.new("test message")
802
+ e2 = RuntimeError.new("cause message")
803
+ e3 = StandardError.new("cause message 2")
804
+ allow(e).to receive(:backtrace).and_return(["line 1"])
805
+ allow(e).to receive(:cause).and_return(e2)
806
+ allow(e2).to receive(:cause).and_return(e3)
807
+ e
808
+ end
809
+
810
+ it "sends the causes information as sample data" do
811
+ expect(transaction.ext).to receive(:set_error).with(
812
+ "ExampleStandardError",
813
+ "test message",
814
+ Appsignal::Utils::Data.generate(["line 1"])
815
+ )
816
+
817
+ expect(transaction.ext).to receive(:set_sample_data).with(
818
+ "error_causes",
819
+ Appsignal::Utils::Data.generate(
820
+ [
821
+ {
822
+ :name => "RuntimeError",
823
+ :message => "cause message"
824
+ },
825
+ {
826
+ :name => "StandardError",
827
+ :message => "cause message 2"
828
+ }
829
+ ]
830
+ )
831
+ )
832
+
833
+ expect(Appsignal.logger).to_not receive(:debug)
834
+
835
+ transaction.set_error(error)
836
+ end
837
+ end
838
+
839
+ context "when the error has too many causes" do
840
+ let(:error) do
841
+ e = ExampleStandardError.new("root cause error")
842
+
843
+ 11.times do |i|
844
+ next_e = ExampleStandardError.new("wrapper error #{i}")
845
+ allow(next_e).to receive(:cause).and_return(e)
846
+ e = next_e
847
+ end
848
+
849
+ allow(e).to receive(:backtrace).and_return(["line 1"])
850
+ e
851
+ end
852
+
853
+ it "sends only the first causes as sample data" do
854
+ expect(transaction.ext).to receive(:set_error).with(
855
+ "ExampleStandardError",
856
+ "wrapper error 10",
857
+ Appsignal::Utils::Data.generate(["line 1"])
858
+ )
859
+
860
+ expected_error_causes = Array.new(10) do |i|
861
+ {
862
+ :name => "ExampleStandardError",
863
+ :message => "wrapper error #{9 - i}"
864
+ }
865
+ end
866
+
867
+ expected_error_causes.last[:is_root_cause] = false
868
+
869
+ expect(transaction.ext).to receive(:set_sample_data).with(
870
+ "error_causes",
871
+ Appsignal::Utils::Data.generate(expected_error_causes)
872
+ )
873
+
874
+ expect(Appsignal.logger).to receive(:debug).with(
875
+ "Appsignal::Transaction#set_error: Error has more " \
876
+ "than 10 error causes. Only the first 10 " \
877
+ "will be reported."
878
+ )
879
+
880
+ transaction.set_error(error)
881
+ end
882
+ end
883
+
791
884
  context "when error message is nil" do
792
885
  let(:error) do
793
886
  e = ExampleStandardError.new
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: 3.4.15
4
+ version: 3.5.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: 2023-11-21 00:00:00.000000000 Z
13
+ date: 2023-12-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
@@ -446,7 +446,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
446
446
  - !ruby/object:Gem::Version
447
447
  version: '0'
448
448
  requirements: []
449
- rubygems_version: 3.4.11
449
+ rubygems_version: 3.3.7
450
450
  signing_key:
451
451
  specification_version: 4
452
452
  summary: Logs performance and exception data from your app to appsignal.com