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 +4 -4
- data/CHANGELOG.md +25 -0
- data/ext/agent.rb +27 -27
- data/lib/appsignal/transaction.rb +36 -0
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/transaction_spec.rb +93 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc20e180510d89079b968f752fe4378590ef2edc3c881af7390e4eca883829c3
|
4
|
+
data.tar.gz: e475459d746362fe4a1d66ea260596dd376dd78de5ce0c6192784a61afcaa17b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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" => "
|
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" => "
|
17
|
+
"checksum" => "8216a8c083ffb7f286fd249c82fb63fe45527276a8a616c0921da3f3e8b9073a",
|
18
18
|
"filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
|
19
19
|
},
|
20
20
|
"dynamic" => {
|
21
|
-
"checksum" => "
|
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" => "
|
27
|
+
"checksum" => "8216a8c083ffb7f286fd249c82fb63fe45527276a8a616c0921da3f3e8b9073a",
|
28
28
|
"filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
|
29
29
|
},
|
30
30
|
"dynamic" => {
|
31
|
-
"checksum" => "
|
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" => "
|
37
|
+
"checksum" => "5f1782b53f24e2d8f8e0681eb7934af93532f84475c44b7389b2fe88ac34630d",
|
38
38
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
39
39
|
},
|
40
40
|
"dynamic" => {
|
41
|
-
"checksum" => "
|
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" => "
|
47
|
+
"checksum" => "5f1782b53f24e2d8f8e0681eb7934af93532f84475c44b7389b2fe88ac34630d",
|
48
48
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
49
49
|
},
|
50
50
|
"dynamic" => {
|
51
|
-
"checksum" => "
|
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" => "
|
57
|
+
"checksum" => "5f1782b53f24e2d8f8e0681eb7934af93532f84475c44b7389b2fe88ac34630d",
|
58
58
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
59
59
|
},
|
60
60
|
"dynamic" => {
|
61
|
-
"checksum" => "
|
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" => "
|
67
|
+
"checksum" => "0743450b2ad48971ec3251565898e33b9af214b4d2db36e12b7089ff3d3b8f3e",
|
68
68
|
"filename" => "appsignal-aarch64-linux-all-static.tar.gz"
|
69
69
|
},
|
70
70
|
"dynamic" => {
|
71
|
-
"checksum" => "
|
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" => "
|
77
|
+
"checksum" => "32a72c3a9745348251fe20e8e8d10f52476e8cec47ea3b2495c14d1ca4a30ac5",
|
78
78
|
"filename" => "appsignal-i686-linux-all-static.tar.gz"
|
79
79
|
},
|
80
80
|
"dynamic" => {
|
81
|
-
"checksum" => "
|
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" => "
|
87
|
+
"checksum" => "32a72c3a9745348251fe20e8e8d10f52476e8cec47ea3b2495c14d1ca4a30ac5",
|
88
88
|
"filename" => "appsignal-i686-linux-all-static.tar.gz"
|
89
89
|
},
|
90
90
|
"dynamic" => {
|
91
|
-
"checksum" => "
|
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" => "
|
97
|
+
"checksum" => "8804bdd137e87576f0f32e565ecafc395da118e1d427155c38f27cc7d222777d",
|
98
98
|
"filename" => "appsignal-x86_64-linux-all-static.tar.gz"
|
99
99
|
},
|
100
100
|
"dynamic" => {
|
101
|
-
"checksum" => "
|
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" => "
|
107
|
+
"checksum" => "09f97d946a7d1c45f24824e8c0c296ac49fdbf0a8e9869e45176838bc82929c5",
|
108
108
|
"filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
|
109
109
|
},
|
110
110
|
"dynamic" => {
|
111
|
-
"checksum" => "
|
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" => "
|
117
|
+
"checksum" => "e0f942c8053e2939cffce722c35160d8798d867d91902b6cb9b6ccf7513d0059",
|
118
118
|
"filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
|
119
119
|
},
|
120
120
|
"dynamic" => {
|
121
|
-
"checksum" => "
|
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" => "
|
127
|
+
"checksum" => "c105e18399df06884983ec58602a848369a98806ba8264e6dc2b7a06476dd582",
|
128
128
|
"filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
|
129
129
|
},
|
130
130
|
"dynamic" => {
|
131
|
-
"checksum" => "
|
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" => "
|
137
|
+
"checksum" => "c105e18399df06884983ec58602a848369a98806ba8264e6dc2b7a06476dd582",
|
138
138
|
"filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
|
139
139
|
},
|
140
140
|
"dynamic" => {
|
141
|
-
"checksum" => "
|
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
|
|
data/lib/appsignal/version.rb
CHANGED
@@ -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
|
+
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
|
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.
|
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
|