appsignal 3.4.5 → 3.4.7

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: 705f36b319b37252017d10688f6429008bcd237eb36ae28792585a50551434fe
4
- data.tar.gz: 411f73432159452ea26370a1e664cb440b3b6d89ffd0f0b4c2fe3400b4b3c043
3
+ metadata.gz: a091547d4aa24cd20a2d65ec56f8b345acb0b3581be04cdf2adc5d5f42c39afd
4
+ data.tar.gz: f6a182002d60962ef78c5f65b0828f20dbc297d0ad09da9091a5c1d3f02235a1
5
5
  SHA512:
6
- metadata.gz: 0b216dedc500b3a74adefec649b0cdb267f5f53ae670ec6662cbb1a10dfa9086ab3ab4b3a368ffdaeeb7ba48e54e5bb736da73b4e67d6c6e8fa01f053f865e0b
7
- data.tar.gz: 8b9d4618362c63bb4dede332f5fa7e1c2b042cb673bacf70eb84233a7ad8d191740c2fdebd0ce28ce8fb9819dbc26e0a1053bbebad431bda6062aa555e08bb99
6
+ metadata.gz: 5a38ab546a04187f05aeb9e2880f7fbe4032b180e406ac01505d769ef3b872ec6b7b25fad46b32064eb10aeb4efa20c8e5d17e7adcb46b1e6132220076b114dc
7
+ data.tar.gz: ad1cb050d4dda9a0358fde5ade1821b2d9a001b7fbd27b425de824669a8be7186c7bfe71aa6a8cbdffe240cbbeb2ccd4ef4f16a6f7cc99a4916ba4ddef05c694
data/.gitignore CHANGED
@@ -24,6 +24,7 @@ gemfiles/*.lock
24
24
  bundle_and_spec_all_*
25
25
  ext/libappsignal.*
26
26
  ext/appsignal-agent
27
+ ext/._appsignal-agent
27
28
  ext/appsignal.h
28
29
  ext/appsignal.version
29
30
  ext/Makefile
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 3.4.7
4
+
5
+ ### Added
6
+
7
+ - [46735abb](https://github.com/appsignal/appsignal-ruby/commit/46735abb0d0c43df2c923b36f80549b8322ae4f6) patch - Use `RENDER_GIT_COMMIT` environment variable as revision if no revision is specified.
8
+
9
+ ### Changed
10
+
11
+ - [86856aae](https://github.com/appsignal/appsignal-ruby/commit/86856aae7c16dc13854229d43c7369ec69ced18e) patch - Bump agent to 32590eb.
12
+
13
+ - Only ignore disk metrics that start with "loop", not all mounted disks that end with a number to report metrics for more disks.
14
+
15
+ ## 3.4.6
16
+
17
+ ### Changed
18
+
19
+ - [85c155a0](https://github.com/appsignal/appsignal-ruby/commit/85c155a0a4b2b618c04db52c34ee7f0adba8f3c5) patch - When sanitizing an array or hash, replace recursively nested values with a placeholder string. This fixes a SystemStackError issue when sanitising arrays and hashes.
20
+
3
21
  ## 3.4.5
4
22
 
5
23
  ### Added
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" => "fd8ee9e",
9
+ "version" => "32590eb",
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" => "38731cb50e31377053618cd3687ab99d10cc991171b73ea81a40aab49d415fe1",
17
+ "checksum" => "d19ddec878fd1c608bfc44219eee3059676e329575af0a0f9077a6ebd13ab759",
18
18
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
19
19
  },
20
20
  "dynamic" => {
21
- "checksum" => "d86f34a30a2cfc613f3af9bd84ddec0955af0644204cc394e0141860b201506a",
21
+ "checksum" => "068b99cc5b758e5657cdfe152e2c2ff6a7b53b5d1d14fb7b7f4aa2cb7eab37f3",
22
22
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
23
23
  }
24
24
  },
25
25
  "universal-darwin" => {
26
26
  "static" => {
27
- "checksum" => "38731cb50e31377053618cd3687ab99d10cc991171b73ea81a40aab49d415fe1",
27
+ "checksum" => "d19ddec878fd1c608bfc44219eee3059676e329575af0a0f9077a6ebd13ab759",
28
28
  "filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
29
29
  },
30
30
  "dynamic" => {
31
- "checksum" => "d86f34a30a2cfc613f3af9bd84ddec0955af0644204cc394e0141860b201506a",
31
+ "checksum" => "068b99cc5b758e5657cdfe152e2c2ff6a7b53b5d1d14fb7b7f4aa2cb7eab37f3",
32
32
  "filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
33
33
  }
34
34
  },
35
35
  "aarch64-darwin" => {
36
36
  "static" => {
37
- "checksum" => "ee791758b84b56ce01482c1c3f65db926457558275f22673442e19a4e9b9c43e",
37
+ "checksum" => "ee637a448d7f063a603b34bff2a0387842fd9b7efe477f43c69850d1bde649d8",
38
38
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
39
39
  },
40
40
  "dynamic" => {
41
- "checksum" => "99bbb1d7072849196b7581abf3fbe8e060b6a794a868302988d38eb049b42352",
41
+ "checksum" => "3c8f7f9c3ca53ca9c600290af1f033a96bff477ac8de236da23f5e3fd17643b2",
42
42
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
43
43
  }
44
44
  },
45
45
  "arm64-darwin" => {
46
46
  "static" => {
47
- "checksum" => "ee791758b84b56ce01482c1c3f65db926457558275f22673442e19a4e9b9c43e",
47
+ "checksum" => "ee637a448d7f063a603b34bff2a0387842fd9b7efe477f43c69850d1bde649d8",
48
48
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
49
49
  },
50
50
  "dynamic" => {
51
- "checksum" => "99bbb1d7072849196b7581abf3fbe8e060b6a794a868302988d38eb049b42352",
51
+ "checksum" => "3c8f7f9c3ca53ca9c600290af1f033a96bff477ac8de236da23f5e3fd17643b2",
52
52
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
53
53
  }
54
54
  },
55
55
  "arm-darwin" => {
56
56
  "static" => {
57
- "checksum" => "ee791758b84b56ce01482c1c3f65db926457558275f22673442e19a4e9b9c43e",
57
+ "checksum" => "ee637a448d7f063a603b34bff2a0387842fd9b7efe477f43c69850d1bde649d8",
58
58
  "filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
59
59
  },
60
60
  "dynamic" => {
61
- "checksum" => "99bbb1d7072849196b7581abf3fbe8e060b6a794a868302988d38eb049b42352",
61
+ "checksum" => "3c8f7f9c3ca53ca9c600290af1f033a96bff477ac8de236da23f5e3fd17643b2",
62
62
  "filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
63
63
  }
64
64
  },
65
65
  "aarch64-linux" => {
66
66
  "static" => {
67
- "checksum" => "65ccb3ed4fdc7f55671ca4ff04beaa97bb01835e0f30b6a5f2e02dbe8b5c31f4",
67
+ "checksum" => "c723895a2b627dc9bd6f756468206bb8b946e1ddaeab13f2562d47765bcbdc92",
68
68
  "filename" => "appsignal-aarch64-linux-all-static.tar.gz"
69
69
  },
70
70
  "dynamic" => {
71
- "checksum" => "2dfd4991a4607d5a240d8c46e8449e7dc979ed07155519cb60b840ac264e1daa",
71
+ "checksum" => "a6d2bbd5659eb933274e47ebd1bddf5e124e641ddbf565aee2f46502bd77fdc9",
72
72
  "filename" => "appsignal-aarch64-linux-all-dynamic.tar.gz"
73
73
  }
74
74
  },
75
75
  "i686-linux" => {
76
76
  "static" => {
77
- "checksum" => "849d2a2ff27814961e1ce9183877a0aedda263f538b0dbfa5e17357e2af00ba4",
77
+ "checksum" => "7e8e9b0ba5bde6ed3b3c697eb5c92c1840e0ab1a0ecad1e588d684c04f5aad2b",
78
78
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
79
79
  },
80
80
  "dynamic" => {
81
- "checksum" => "3d5f513d9e6a98a2619b798ead5edeef232654eefa1dabe55930acc662bc69b1",
81
+ "checksum" => "65a47275eee9e75102398df2f8e6ba89ec1f47a3b017a9b97dffa314b76c4cd1",
82
82
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
83
83
  }
84
84
  },
85
85
  "x86-linux" => {
86
86
  "static" => {
87
- "checksum" => "849d2a2ff27814961e1ce9183877a0aedda263f538b0dbfa5e17357e2af00ba4",
87
+ "checksum" => "7e8e9b0ba5bde6ed3b3c697eb5c92c1840e0ab1a0ecad1e588d684c04f5aad2b",
88
88
  "filename" => "appsignal-i686-linux-all-static.tar.gz"
89
89
  },
90
90
  "dynamic" => {
91
- "checksum" => "3d5f513d9e6a98a2619b798ead5edeef232654eefa1dabe55930acc662bc69b1",
91
+ "checksum" => "65a47275eee9e75102398df2f8e6ba89ec1f47a3b017a9b97dffa314b76c4cd1",
92
92
  "filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
93
93
  }
94
94
  },
95
95
  "x86_64-linux" => {
96
96
  "static" => {
97
- "checksum" => "907889dbc50c5f670c1edce503b6f1cdacc52127217611df56b4913137e814f1",
97
+ "checksum" => "b34f064d17a7ab047ebb0eac512452ed4ea91eb7035cd3caa5c06ec8c425ef8e",
98
98
  "filename" => "appsignal-x86_64-linux-all-static.tar.gz"
99
99
  },
100
100
  "dynamic" => {
101
- "checksum" => "7b4ef01a26aec35d892f4c89ac246b0e44d22f8e75b4fb60ed82d458f00e0a71",
101
+ "checksum" => "7ae57a256a6a2115e5c36cab6d93d8c9ab63ffc9ff21f067b3e3769b4d847245",
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" => "f4b26fbee43be4bf15033cd3594d8a79d5cd73a95aa62e1949e3a0836345af03",
107
+ "checksum" => "543e47617392cfc243aa053280cd98804ce71728ddd3e38c9b5c6f62a6006b97",
108
108
  "filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
109
109
  },
110
110
  "dynamic" => {
111
- "checksum" => "b7e0885ce6a19c42781b36c7876e729320df16492630972b47a12096333d9e46",
111
+ "checksum" => "33ecdddcfb6eb9b895346355ab79d97b0c7258d19d9cdfe8d3ec0f384657bce5",
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" => "d316c1a6a92963ba88c1c578a070eba505e1a466e3af768362122d935af31ccd",
117
+ "checksum" => "7e44a1e739f1d4e01fec73cdb4878c0b0b6af5b0f5b433f30807d768fd0cf2f0",
118
118
  "filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
119
119
  },
120
120
  "dynamic" => {
121
- "checksum" => "fcfcfc277e44b87057221e34813146f614a3509128fcd3fe7bc9d8eaf7959a2c",
121
+ "checksum" => "5319e91e5341e19b9ce58b93d439822c35511469a4a08e8e3b6afc75e95dd119",
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" => "c2d8f903e683ce77f608d7e8d1eadc98a0fd29d19f07110e04cc73c5d2cb887c",
127
+ "checksum" => "5ddb4d0d357fbb4677156f538f325924fa53f7fbba5885761b58596fc2ded8ad",
128
128
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
129
129
  },
130
130
  "dynamic" => {
131
- "checksum" => "7d07f06c7a1d86b78cc134213f1c797f1fab4454c274e1e148764f145e1ec30a",
131
+ "checksum" => "5a556a299d69b87c914dca1e0b19cfe1beb4b07ef003e88809600f309117c746",
132
132
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
133
133
  }
134
134
  },
135
135
  "amd64-freebsd" => {
136
136
  "static" => {
137
- "checksum" => "c2d8f903e683ce77f608d7e8d1eadc98a0fd29d19f07110e04cc73c5d2cb887c",
137
+ "checksum" => "5ddb4d0d357fbb4677156f538f325924fa53f7fbba5885761b58596fc2ded8ad",
138
138
  "filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
139
139
  },
140
140
  "dynamic" => {
141
- "checksum" => "7d07f06c7a1d86b78cc134213f1c797f1fab4454c274e1e148764f145e1ec30a",
141
+ "checksum" => "5a556a299d69b87c914dca1e0b19cfe1beb4b07ef003e88809600f309117c746",
142
142
  "filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
143
143
  }
144
144
  }
@@ -5,20 +5,21 @@ module Appsignal
5
5
  # @api private
6
6
  class HashSanitizer
7
7
  FILTERED = "[FILTERED]"
8
+ RECURSIVE = "[RECURSIVE VALUE]"
8
9
 
9
10
  class << self
10
11
  def sanitize(value, filter_keys = [])
11
- sanitize_value(value, filter_keys)
12
+ sanitize_value(value, filter_keys, [])
12
13
  end
13
14
 
14
15
  private
15
16
 
16
- def sanitize_value(value, filter_keys)
17
+ def sanitize_value(value, filter_keys, seen)
17
18
  case value
18
19
  when Hash
19
- sanitize_hash(value, filter_keys)
20
+ sanitize_hash(value, filter_keys, seen)
20
21
  when Array
21
- sanitize_array(value, filter_keys)
22
+ sanitize_array(value, filter_keys, seen)
22
23
  when TrueClass, FalseClass, NilClass, Integer, String, Symbol, Float
23
24
  unmodified(value)
24
25
  else
@@ -26,23 +27,34 @@ module Appsignal
26
27
  end
27
28
  end
28
29
 
29
- def sanitize_hash(source, filter_keys)
30
+ def sanitize_hash(source, filter_keys, seen)
31
+ seen = seen.clone << source.object_id
32
+
30
33
  {}.tap do |hash|
31
34
  source.each_pair do |key, value|
32
35
  hash[key] =
33
- if filter_keys.include?(key.to_s)
36
+ if seen.include?(value.object_id)
37
+ RECURSIVE
38
+ elsif filter_keys.include?(key.to_s)
34
39
  FILTERED
35
40
  else
36
- sanitize_value(value, filter_keys)
41
+ sanitize_value(value, filter_keys, seen)
37
42
  end
38
43
  end
39
44
  end
40
45
  end
41
46
 
42
- def sanitize_array(source, filter_keys)
47
+ def sanitize_array(source, filter_keys, seen)
48
+ seen = seen.clone << source.object_id
49
+
43
50
  [].tap do |array|
44
51
  source.each_with_index do |item, index|
45
- array[index] = sanitize_value(item, filter_keys)
52
+ array[index] =
53
+ if seen.include?(item.object_id)
54
+ RECURSIVE
55
+ else
56
+ sanitize_value(item, filter_keys, seen)
57
+ end
46
58
  end
47
59
  end
48
60
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Appsignal
4
- VERSION = "3.4.5"
4
+ VERSION = "3.4.7"
5
5
  end
@@ -1,5 +1,7 @@
1
1
  describe Appsignal::Utils::HashSanitizer do
2
2
  let(:file) { uploaded_file }
3
+ let(:some_array) { [1, 2, 3] }
4
+ let(:some_hash) { { :a => 1, :b => 2 } }
3
5
  let(:params) do
4
6
  {
5
7
  :text => "string",
@@ -8,6 +10,10 @@ describe Appsignal::Utils::HashSanitizer do
8
10
  :float => 0.0,
9
11
  :bool_true => true,
10
12
  :bool_false => false,
13
+ # Non-recursive appearances of the same array instance
14
+ :some_arrays => [some_array, some_array],
15
+ # Non-recursive appearances of the same hash instance
16
+ :some_hashes => { :a => some_hash, :b => some_hash },
11
17
  :nil => nil,
12
18
  :int => 1, # Fixnum
13
19
  :int64 => 1 << 64, # Bignum
@@ -20,9 +26,20 @@ describe Appsignal::Utils::HashSanitizer do
20
26
  {
21
27
  :key => "value",
22
28
  :file => file
23
- }
24
- ]
25
- }
29
+ }.tap do |hsh|
30
+ # Recursive hash-in-hash (should be [:nested_array][3][:recursive_hash])
31
+ hsh[:recursive_hash] = hsh
32
+ end
33
+ ].tap do |ary|
34
+ # Recursive array-in-array (should be [:nested_array][4])
35
+ ary << ary
36
+ # Recursive array-in-hash (should be [:nested_array][3][:recursive_array])
37
+ ary[3][:recursive_array] = ary
38
+ end
39
+ }.tap do |hsh|
40
+ # Recursive hash-in-array (should be [:nested_array][5])
41
+ hsh[:nested_array] << hsh
42
+ end
26
43
  }
27
44
  end
28
45
 
@@ -43,6 +60,9 @@ describe Appsignal::Utils::HashSanitizer do
43
60
  expect(subject[:nil]).to be_nil
44
61
  expect(subject[:int]).to eq(1)
45
62
  expect(subject[:int64]).to eq(1 << 64)
63
+ expect(subject[:some_arrays]).to eq([[1, 2, 3], [1, 2, 3]])
64
+ expect(subject[:some_hashes]).to eq({ :a => { :a => 1, :b => 2 },
65
+ :b => { :a => 1, :b => 2 } })
46
66
  end
47
67
 
48
68
  it "does not change the original params" do
@@ -72,7 +92,7 @@ describe Appsignal::Utils::HashSanitizer do
72
92
  expect(subject[2]).to include "::UploadedFile"
73
93
  end
74
94
 
75
- describe ":nested_hash key" do
95
+ describe "nested hash" do
76
96
  subject { sanitized_params[:hash][:nested_array][3] }
77
97
 
78
98
  it "returns a sanitized Hash" do
@@ -82,6 +102,24 @@ describe Appsignal::Utils::HashSanitizer do
82
102
  expect(subject[:file]).to be_instance_of String
83
103
  expect(subject[:file]).to include "::UploadedFile"
84
104
  end
105
+
106
+ it "replaces a recursive array" do
107
+ expect(subject[:recursive_array]).to eq("[RECURSIVE VALUE]")
108
+ end
109
+
110
+ it "replaces a recursive hash" do
111
+ expect(subject[:recursive_hash]).to eq("[RECURSIVE VALUE]")
112
+ end
113
+ end
114
+
115
+ describe "nested array" do
116
+ it "replaces a recursive array" do
117
+ expect(sanitized_params[:hash][:nested_array][4]).to eq("[RECURSIVE VALUE]")
118
+ end
119
+
120
+ it "replaces a recursive hash" do
121
+ expect(sanitized_params[:hash][:nested_array][5]).to eq("[RECURSIVE VALUE]")
122
+ end
85
123
  end
86
124
  end
87
125
  end
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.5
4
+ version: 3.4.7
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-06-27 00:00:00.000000000 Z
13
+ date: 2023-07-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
@@ -153,7 +153,6 @@ files:
153
153
  - benchmark.rake
154
154
  - bin/appsignal
155
155
  - build_matrix.yml
156
- - ext/._appsignal-agent
157
156
  - ext/Rakefile
158
157
  - ext/agent.rb
159
158
  - ext/appsignal_extension.c
@@ -439,7 +438,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
439
438
  - !ruby/object:Gem::Version
440
439
  version: '0'
441
440
  requirements: []
442
- rubygems_version: 3.4.8
441
+ rubygems_version: 3.4.15
443
442
  signing_key:
444
443
  specification_version: 4
445
444
  summary: Logs performance and exception data from your app to appsignal.com
Binary file