appsignal 3.0.22-java → 3.0.25-java
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/appsignal.gemspec +1 -1
- data/ext/agent.yml +25 -25
- data/lib/appsignal/hooks/active_job.rb +4 -2
- data/lib/appsignal/transaction.rb +1 -1
- data/lib/appsignal/utils/query_params_sanitizer.rb +1 -1
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/event_formatter/moped/query_formatter_spec.rb +1 -1
- data/spec/lib/appsignal/integrations/sidekiq_spec.rb +1 -1
- data/spec/lib/appsignal/transaction_spec.rb +21 -2
- data/spec/lib/appsignal/utils/query_params_sanitizer_spec.rb +5 -5
- data/spec/support/helpers/activejob_helpers.rb +1 -1
- data/spec/support/helpers/dependency_helper.rb +8 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: deaef7e2168cb358393f26888084c1ea47efd1a370022a74a751c12b3d2a5f05
|
4
|
+
data.tar.gz: b8df7d9e2c01c03797a17e253dcb1cd54ed5df50b533deb4a91e94c5cdf7a3f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f760735aa2fffb0680e00f5b8bc771a9d6ff22bcdb4e13f7bbba0753ae5390ac35d6b9ecc49a388e3290ad2d53fe392e5f5b9a1fc73d1c6f6a52887f93a6ccbc
|
7
|
+
data.tar.gz: 17ff605c14abb3363494062533d33d52f0c64b53c01e9f8a700ecf8d8d22dcdb5f0e55b2be6db9a34b1233d9b2da65dc85ce9227df8d148d49dd5d33492686f8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# AppSignal for Ruby gem Changelog
|
2
2
|
|
3
|
+
## 3.0.25
|
4
|
+
|
5
|
+
### Added
|
6
|
+
|
7
|
+
- [399cf790](https://github.com/appsignal/appsignal-ruby/commit/399cf79044e7c8936ab72dce420d91af4cb71d16) patch - Sanitize `ActiveRecord::RecordNotUnique` error messages to not include any database values that is not unique in the database. This ensures no personal information is sent to AppSignal through error messages from this error.
|
8
|
+
|
9
|
+
## 3.0.24
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
|
13
|
+
- [964861f7](https://github.com/appsignal/appsignal-ruby/commit/964861f76ea7ff71f01497f116def14190bcd404) patch - Bump agent to v-f57e6cb
|
14
|
+
|
15
|
+
- Enable process metrics on Heroku and Dokku
|
16
|
+
|
17
|
+
## 3.0.23
|
18
|
+
|
19
|
+
### Fixed
|
20
|
+
|
21
|
+
- [d73905d3](https://github.com/appsignal/appsignal-ruby/commit/d73905d3b28404638a8aa1e8de3909eff0b8cfb6) patch - Fix sanitized values wrapped in Arrays. When a value like `[{ "foo" => "bar" }]` was sanitized it would be stored as `{ "foo" => "?" }`, omitting the parent value's Array square brackets. Now values will appear with the same structure as they were originally sanitized. This only applies to certain integrations like MongoDB, moped and ElasticSearch.
|
22
|
+
- [096d3cdf](https://github.com/appsignal/appsignal-ruby/commit/096d3cdfd8f452f13b2dbf7de6b763c8a96973b3) patch - Fix the ActiveJob `default_queue_name` config option issue being reset to "default". When ActiveJob `default_queue_name` was set in a Rails initializer it would reset on load to `default`. Now the `default_queue_name` can be set in an initializer as well.
|
23
|
+
|
3
24
|
## 3.0.22
|
4
25
|
|
5
26
|
### Changed
|
@@ -211,6 +232,10 @@ Please read our [upgrade from version 2 to 3 guide][upgrade3] before upgrading.
|
|
211
232
|
- Add Sidekiq error handler. Report more Sidekiq errors that happen around job
|
212
233
|
execution. PR #699
|
213
234
|
|
235
|
+
## 2.11.10
|
236
|
+
- Backport extension fallbacks on extension installation failure, that caused
|
237
|
+
NoMethodErrors. PR #736
|
238
|
+
|
214
239
|
## 2.11.9
|
215
240
|
- Fix and simplify Ruby method delegation for object method instrumentation in
|
216
241
|
the different Ruby versions. PR #706
|
data/appsignal.gemspec
CHANGED
@@ -36,7 +36,7 @@ Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
|
|
36
36
|
|
37
37
|
gem.add_dependency "rack"
|
38
38
|
|
39
|
-
gem.add_development_dependency "rake", "
|
39
|
+
gem.add_development_dependency "rake", ">= 12"
|
40
40
|
gem.add_development_dependency "rspec", "~> 3.8"
|
41
41
|
gem.add_development_dependency "timecop"
|
42
42
|
gem.add_development_dependency "webmock"
|
data/ext/agent.yml
CHANGED
@@ -3,92 +3,92 @@
|
|
3
3
|
# appsignal-agent repository.
|
4
4
|
# Modifications to this file will be overwritten with the next agent release.
|
5
5
|
---
|
6
|
-
version:
|
6
|
+
version: f57e6cb
|
7
7
|
mirrors:
|
8
8
|
- https://appsignal-agent-releases.global.ssl.fastly.net
|
9
9
|
- https://d135dj0rjqvssy.cloudfront.net
|
10
10
|
triples:
|
11
11
|
x86_64-darwin:
|
12
12
|
static:
|
13
|
-
checksum:
|
13
|
+
checksum: dd1ae8d7897edf3112741381226e3622e91553dede6eeae48ca07aae84ac050d
|
14
14
|
filename: appsignal-x86_64-darwin-all-static.tar.gz
|
15
15
|
dynamic:
|
16
|
-
checksum:
|
16
|
+
checksum: a523a85f76bdb37ffcacbf14279c3c7fed0378fbcfd20886ab66ee7602766e72
|
17
17
|
filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
|
18
18
|
universal-darwin:
|
19
19
|
static:
|
20
|
-
checksum:
|
20
|
+
checksum: dd1ae8d7897edf3112741381226e3622e91553dede6eeae48ca07aae84ac050d
|
21
21
|
filename: appsignal-x86_64-darwin-all-static.tar.gz
|
22
22
|
dynamic:
|
23
|
-
checksum:
|
23
|
+
checksum: a523a85f76bdb37ffcacbf14279c3c7fed0378fbcfd20886ab66ee7602766e72
|
24
24
|
filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
|
25
25
|
aarch64-darwin:
|
26
26
|
static:
|
27
|
-
checksum:
|
27
|
+
checksum: cd5175979ec293d0471c71de1fdd00817bea75f800603a1b87931b19471495f3
|
28
28
|
filename: appsignal-aarch64-darwin-all-static.tar.gz
|
29
29
|
dynamic:
|
30
|
-
checksum:
|
30
|
+
checksum: 77503ee5debad5f503719d5fe653f30c3b3bb6624694f48ef03352f575af97c0
|
31
31
|
filename: appsignal-aarch64-darwin-all-dynamic.tar.gz
|
32
32
|
arm64-darwin:
|
33
33
|
static:
|
34
|
-
checksum:
|
34
|
+
checksum: cd5175979ec293d0471c71de1fdd00817bea75f800603a1b87931b19471495f3
|
35
35
|
filename: appsignal-aarch64-darwin-all-static.tar.gz
|
36
36
|
dynamic:
|
37
|
-
checksum:
|
37
|
+
checksum: 77503ee5debad5f503719d5fe653f30c3b3bb6624694f48ef03352f575af97c0
|
38
38
|
filename: appsignal-aarch64-darwin-all-dynamic.tar.gz
|
39
39
|
arm-darwin:
|
40
40
|
static:
|
41
|
-
checksum:
|
41
|
+
checksum: cd5175979ec293d0471c71de1fdd00817bea75f800603a1b87931b19471495f3
|
42
42
|
filename: appsignal-aarch64-darwin-all-static.tar.gz
|
43
43
|
dynamic:
|
44
|
-
checksum:
|
44
|
+
checksum: 77503ee5debad5f503719d5fe653f30c3b3bb6624694f48ef03352f575af97c0
|
45
45
|
filename: appsignal-aarch64-darwin-all-dynamic.tar.gz
|
46
46
|
aarch64-linux:
|
47
47
|
static:
|
48
|
-
checksum:
|
48
|
+
checksum: ae899aba4fa260c1aa1d21cc8f2bf379a2b52596ef2979e9b9b70f0cd54872d4
|
49
49
|
filename: appsignal-aarch64-linux-all-static.tar.gz
|
50
50
|
dynamic:
|
51
|
-
checksum:
|
51
|
+
checksum: 848ab3df66cac4122133145738a380d3e4763e0bcb324cb0d7c0423741751d80
|
52
52
|
filename: appsignal-aarch64-linux-all-dynamic.tar.gz
|
53
53
|
i686-linux:
|
54
54
|
static:
|
55
|
-
checksum:
|
55
|
+
checksum: 3934810379bade5096a5f055450ddd38f60c1bb2fbc05bebcea92f8f7250a81e
|
56
56
|
filename: appsignal-i686-linux-all-static.tar.gz
|
57
57
|
dynamic:
|
58
|
-
checksum:
|
58
|
+
checksum: 2bd5207d0930f9ce262adcb955582c2a022de8872022a0ddd1ea15391339eb55
|
59
59
|
filename: appsignal-i686-linux-all-dynamic.tar.gz
|
60
60
|
x86-linux:
|
61
61
|
static:
|
62
|
-
checksum:
|
62
|
+
checksum: 3934810379bade5096a5f055450ddd38f60c1bb2fbc05bebcea92f8f7250a81e
|
63
63
|
filename: appsignal-i686-linux-all-static.tar.gz
|
64
64
|
dynamic:
|
65
|
-
checksum:
|
65
|
+
checksum: 2bd5207d0930f9ce262adcb955582c2a022de8872022a0ddd1ea15391339eb55
|
66
66
|
filename: appsignal-i686-linux-all-dynamic.tar.gz
|
67
67
|
x86_64-linux:
|
68
68
|
static:
|
69
|
-
checksum:
|
69
|
+
checksum: 956288a49717ea61ec303ef4ab52e7bfafea6e575a8bb9839df24b947d22d988
|
70
70
|
filename: appsignal-x86_64-linux-all-static.tar.gz
|
71
71
|
dynamic:
|
72
|
-
checksum:
|
72
|
+
checksum: abf290aa7ad7be1af54889c9dd70cf2f71902359cfc5f5ce64b53b8421914a51
|
73
73
|
filename: appsignal-x86_64-linux-all-dynamic.tar.gz
|
74
74
|
x86_64-linux-musl:
|
75
75
|
static:
|
76
|
-
checksum:
|
76
|
+
checksum: 5f96744692b6b079bd2b97ac6d8d5900123f108a27237664c88a49782b7ba433
|
77
77
|
filename: appsignal-x86_64-linux-musl-all-static.tar.gz
|
78
78
|
dynamic:
|
79
|
-
checksum:
|
79
|
+
checksum: c0a06de99d88a2e045b60d53319e1bbb8633127667fbe9f09e52f2bbaf6fb54d
|
80
80
|
filename: appsignal-x86_64-linux-musl-all-dynamic.tar.gz
|
81
81
|
x86_64-freebsd:
|
82
82
|
static:
|
83
|
-
checksum:
|
83
|
+
checksum: 23ea3fdcc5ae7dfdc85214c872ef928ed702c029b05c059db614583f689b9304
|
84
84
|
filename: appsignal-x86_64-freebsd-all-static.tar.gz
|
85
85
|
dynamic:
|
86
|
-
checksum:
|
86
|
+
checksum: 683cc20296ef05257c4209b3c5d86ef32b76be6ea75a1d1ec76db0163e729a38
|
87
87
|
filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
88
88
|
amd64-freebsd:
|
89
89
|
static:
|
90
|
-
checksum:
|
90
|
+
checksum: 23ea3fdcc5ae7dfdc85214c872ef928ed702c029b05c059db614583f689b9304
|
91
91
|
filename: appsignal-x86_64-freebsd-all-static.tar.gz
|
92
92
|
dynamic:
|
93
|
-
checksum:
|
93
|
+
checksum: 683cc20296ef05257c4209b3c5d86ef32b76be6ea75a1d1ec76db0163e729a38
|
94
94
|
filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
@@ -11,8 +11,10 @@ module Appsignal
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def install
|
14
|
-
|
15
|
-
|
14
|
+
ActiveSupport.on_load(:active_job) do
|
15
|
+
::ActiveJob::Base
|
16
|
+
.extend ::Appsignal::Hooks::ActiveJobHook::ActiveJobClassInstrumentation
|
17
|
+
end
|
16
18
|
end
|
17
19
|
|
18
20
|
module ActiveJobClassInstrumentation
|
@@ -537,7 +537,7 @@ module Appsignal
|
|
537
537
|
# Returns an unchanged message otherwise.
|
538
538
|
def cleaned_error_message(error)
|
539
539
|
case error.class.to_s
|
540
|
-
when "PG::UniqueViolation"
|
540
|
+
when "PG::UniqueViolation", "ActiveRecord::RecordNotUnique"
|
541
541
|
error.message.to_s.gsub(/\)=\(.*\)/, ")=(?)")
|
542
542
|
else
|
543
543
|
error.message.to_s
|
@@ -35,7 +35,7 @@ module Appsignal
|
|
35
35
|
|
36
36
|
def sanitize_array(array, only_top_level, key_sanitizer)
|
37
37
|
if only_top_level
|
38
|
-
sanitize(array[0], only_top_level, key_sanitizer)
|
38
|
+
[sanitize(array[0], only_top_level, key_sanitizer)]
|
39
39
|
else
|
40
40
|
array.map do |value|
|
41
41
|
sanitize(value, only_top_level, key_sanitizer)
|
data/lib/appsignal/version.rb
CHANGED
@@ -76,7 +76,7 @@ describe Appsignal::EventFormatter::Moped::QueryFormatter do
|
|
76
76
|
)
|
77
77
|
end
|
78
78
|
|
79
|
-
it { is_expected.to eq ["Insert", '{:database=>"database.collection", :documents=>{"_id"=>"?", "events"=>"?"}, :count=>2, :flags=>[]}'] }
|
79
|
+
it { is_expected.to eq ["Insert", '{:database=>"database.collection", :documents=>[{"_id"=>"?", "events"=>"?"}], :count=>2, :flags=>[]}'] }
|
80
80
|
end
|
81
81
|
|
82
82
|
context "Moped::Protocol::Update" do
|
@@ -376,7 +376,7 @@ if DependencyHelper.active_job_present?
|
|
376
376
|
]
|
377
377
|
end
|
378
378
|
let(:expected_wrapped_args) do
|
379
|
-
if
|
379
|
+
if DependencyHelper.active_job_wraps_args?
|
380
380
|
[{
|
381
381
|
"_aj_ruby2_keywords" => ["args"],
|
382
382
|
"args" => expected_args
|
@@ -1350,8 +1350,8 @@ describe Appsignal::Transaction do
|
|
1350
1350
|
end
|
1351
1351
|
|
1352
1352
|
context "with a PG::UniqueViolation" do
|
1353
|
-
|
1354
|
-
|
1353
|
+
before do
|
1354
|
+
stub_const("PG::UniqueViolation", Class.new(StandardError))
|
1355
1355
|
end
|
1356
1356
|
|
1357
1357
|
let(:error) do
|
@@ -1364,6 +1364,25 @@ describe Appsignal::Transaction do
|
|
1364
1364
|
expect(subject).to eq "ERROR: duplicate key value violates unique constraint \"index_users_on_email\" DETAIL: Key (email)=(?) already exists."
|
1365
1365
|
end
|
1366
1366
|
end
|
1367
|
+
|
1368
|
+
context "with a ActiveRecord::RecordNotUnique" do
|
1369
|
+
before do
|
1370
|
+
stub_const("ActiveRecord::RecordNotUnique", Class.new(StandardError))
|
1371
|
+
end
|
1372
|
+
|
1373
|
+
let(:error) do
|
1374
|
+
ActiveRecord::RecordNotUnique.new(
|
1375
|
+
"PG::UniqueViolation: ERROR: duplicate key value violates unique constraint \"example_constraint\"\n" \
|
1376
|
+
"DETAIL: Key (email)=(foo@example.com) already exists."
|
1377
|
+
)
|
1378
|
+
end
|
1379
|
+
|
1380
|
+
it "returns a sanizited error message" do
|
1381
|
+
expect(subject).to eq \
|
1382
|
+
"PG::UniqueViolation: ERROR: duplicate key value violates unique constraint \"example_constraint\"\n" \
|
1383
|
+
"DETAIL: Key (email)=(?) already exists."
|
1384
|
+
end
|
1385
|
+
end
|
1367
1386
|
end
|
1368
1387
|
|
1369
1388
|
describe ".to_hash / .to_h" do
|
@@ -33,7 +33,7 @@ describe Appsignal::Utils::QueryParamsSanitizer do
|
|
33
33
|
let(:value) { ["foo" => "bar"] }
|
34
34
|
|
35
35
|
it "should sanitize all hash values with a questionmark" do
|
36
|
-
expect(subject).to eq("foo" => "?")
|
36
|
+
expect(subject).to eq(["foo" => "?"])
|
37
37
|
end
|
38
38
|
|
39
39
|
it "should not modify source value" do
|
@@ -45,8 +45,8 @@ describe Appsignal::Utils::QueryParamsSanitizer do
|
|
45
45
|
context "when value is an array" do
|
46
46
|
let(:value) { %w[foo bar] }
|
47
47
|
|
48
|
-
it "
|
49
|
-
expect(subject).to eq("?")
|
48
|
+
it "sanitizes all array values" do
|
49
|
+
expect(subject).to eq(["?"])
|
50
50
|
end
|
51
51
|
|
52
52
|
it "should not modify source value" do
|
@@ -58,8 +58,8 @@ describe Appsignal::Utils::QueryParamsSanitizer do
|
|
58
58
|
context "when value is a mixed array" do
|
59
59
|
let(:value) { [nil, "foo", "bar"] }
|
60
60
|
|
61
|
-
it "should sanitize all
|
62
|
-
expect(subject).to eq("?")
|
61
|
+
it "should sanitize all array values with a single questionmark" do
|
62
|
+
expect(subject).to eq(["?"])
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module ActiveJobHelpers
|
2
2
|
def active_job_args_wrapper(args: [], params: nil)
|
3
|
-
if
|
3
|
+
if DependencyHelper.active_job_wraps_args?
|
4
4
|
wrapped_args = {}
|
5
5
|
|
6
6
|
if params
|
@@ -29,10 +29,18 @@ module DependencyHelper
|
|
29
29
|
rails_present? && rails_version >= Gem::Version.new("6.1.0")
|
30
30
|
end
|
31
31
|
|
32
|
+
def rails6_1_5_present?
|
33
|
+
rails_present? && rails_version >= Gem::Version.new("6.1.5")
|
34
|
+
end
|
35
|
+
|
32
36
|
def rails7_present?
|
33
37
|
rails_present? && rails_version >= Gem::Version.new("7.0.0")
|
34
38
|
end
|
35
39
|
|
40
|
+
def active_job_wraps_args?
|
41
|
+
rails7_present? || (ruby_3_1_or_newer? && rails6_1_present? && !rails6_1_5_present?)
|
42
|
+
end
|
43
|
+
|
36
44
|
def rails_version
|
37
45
|
Gem.loaded_specs["rails"].version
|
38
46
|
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.0.
|
4
|
+
version: 3.0.25
|
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: 2022-
|
13
|
+
date: 2022-03-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|
@@ -30,16 +30,16 @@ dependencies:
|
|
30
30
|
name: rake
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- - "
|
33
|
+
- - ">="
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: '
|
35
|
+
version: '12'
|
36
36
|
type: :development
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- - "
|
40
|
+
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '12'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: rspec
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|