appsignal 3.0.21.alpha.1-java → 3.0.23-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: ab615abe5b6e300341b57c3bc85147eba95e99730d382df8087eb636f777dd94
4
- data.tar.gz: 38099b1d602f9aed9b67d38e24cee1fa7b63cf069ad806e218b8d360f4655806
3
+ metadata.gz: d0a8e7c62a9f20677d9e661ba95f8603d2c125aea696e3026622ce5167518cb7
4
+ data.tar.gz: 2f82a1a82dcbb5cd8dfb6717302b5ee546367702d9c88f8fb429fbb4ae23a93b
5
5
  SHA512:
6
- metadata.gz: 3b0c2f190ea004672a780140a513c585d9bf543aab1caab1b2a4a9504da364efe552a7bd9d9f63d7f72e7249f78f9ca743120cb4c5d7382ffa9b605051a8a457
7
- data.tar.gz: 85e43d5094ac8247abe40cade7fe61665a8fc1f0d655db63277db1a9875fa61ab675f35ef48f04f17a77882d80003b1c0d0dac4aff10f2ef6a25957b5f70796f
6
+ metadata.gz: 9e86439110442d5e184d8b269efacec5a57c91a4037b3b9d114a94c25fde8c7171ebee25976ac6fda47a6bd84dfdf4c4a4a1124a73964f2880d962a64db2a776
7
+ data.tar.gz: 914145f0b0a6d6ade3e1c9ee5f9456b318e45914c216e4f9fa1694f725eb575c7dab78904f69b268ef61024743588b8060ddffec15df9a5ee73bf40f05997a43
data/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # AppSignal for Ruby gem Changelog
2
2
 
3
+ ## 3.0.23
4
+
5
+ ### Fixed
6
+
7
+ - [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.
8
+ - [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.
9
+
10
+ ## 3.0.22
11
+
12
+ ### Changed
13
+
14
+ - [9762e79d](https://github.com/appsignal/appsignal-ruby/commit/9762e79d4545e50c8f3540deff825b10d77e59a5) patch - Bump agent to v-bbc830a
15
+
16
+ - Support batched statsd messages
17
+ - Set start times for spans with traceparents
18
+ - Check duration in transactions for negative and too high value
19
+
20
+ ## 3.0.21
21
+
22
+ ### Changed
23
+
24
+ - [548dd6f4](https://github.com/appsignal/appsignal-ruby/commit/548dd6f4c61ae3be24995a200dc3e5bea1a5f58c) patch - Add config override source. Track final decisions made by the Ruby gem in the configuration in the `override` config source. This will help us track new config options which are being set by their deprecated predecessors in the diagnose report.
25
+
26
+ ### Removed
27
+
28
+ - [3f503ade](https://github.com/appsignal/appsignal-ruby/commit/3f503ade83f22f4b0d86d76ea00e5f4dd3c56b6f) patch - Remove internal `Appsignal.extensions` system. It was unused.
29
+
3
30
  ## 3.0.21.alpha.1
4
31
 
5
32
  ### Changed
@@ -191,6 +218,10 @@ Please read our [upgrade from version 2 to 3 guide][upgrade3] before upgrading.
191
218
  - Add Sidekiq error handler. Report more Sidekiq errors that happen around job
192
219
  execution. PR #699
193
220
 
221
+ ## 2.11.10
222
+ - Backport extension fallbacks on extension installation failure, that caused
223
+ NoMethodErrors. PR #736
224
+
194
225
  ## 2.11.9
195
226
  - Fix and simplify Ruby method delegation for object method instrumentation in
196
227
  the different Ruby versions. PR #706
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: 15ee07b
6
+ version: bbc830a
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: 59bb7f5aea47ccea89b48cc323371fd87609592945ae8692f36063a635970e22
13
+ checksum: 5e817193bb57f13ff16bacceda459d8badc2d5a04a6b131a7bb343212329304a
14
14
  filename: appsignal-x86_64-darwin-all-static.tar.gz
15
15
  dynamic:
16
- checksum: ce2d489170fdd84be1467d24e5c13782cf97912b3c7dbaaebe9e074d56e711a2
16
+ checksum: 641a499de4dd2a0ebc92d0d28ea98bf9c8387ee7393d093ba2f83a64d522d162
17
17
  filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
18
18
  universal-darwin:
19
19
  static:
20
- checksum: 59bb7f5aea47ccea89b48cc323371fd87609592945ae8692f36063a635970e22
20
+ checksum: 5e817193bb57f13ff16bacceda459d8badc2d5a04a6b131a7bb343212329304a
21
21
  filename: appsignal-x86_64-darwin-all-static.tar.gz
22
22
  dynamic:
23
- checksum: ce2d489170fdd84be1467d24e5c13782cf97912b3c7dbaaebe9e074d56e711a2
23
+ checksum: 641a499de4dd2a0ebc92d0d28ea98bf9c8387ee7393d093ba2f83a64d522d162
24
24
  filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
25
25
  aarch64-darwin:
26
26
  static:
27
- checksum: aa37596a85d65d46fc5bba25d4d059e98655709e6c44ee39e7c6ba72398ad704
27
+ checksum: d443e00232acd3e53cd3d3f8c525da69ad362c38230472cc596e687cf73c7d94
28
28
  filename: appsignal-aarch64-darwin-all-static.tar.gz
29
29
  dynamic:
30
- checksum: b40026410702c1bb3ac974c9648d464e0551956dc933deff22543f10cca81e46
30
+ checksum: 750cbaf06fca0a46e0ad046823a5b55b461cdff4bd4882383d22b0c60d4e434e
31
31
  filename: appsignal-aarch64-darwin-all-dynamic.tar.gz
32
32
  arm64-darwin:
33
33
  static:
34
- checksum: aa37596a85d65d46fc5bba25d4d059e98655709e6c44ee39e7c6ba72398ad704
34
+ checksum: d443e00232acd3e53cd3d3f8c525da69ad362c38230472cc596e687cf73c7d94
35
35
  filename: appsignal-aarch64-darwin-all-static.tar.gz
36
36
  dynamic:
37
- checksum: b40026410702c1bb3ac974c9648d464e0551956dc933deff22543f10cca81e46
37
+ checksum: 750cbaf06fca0a46e0ad046823a5b55b461cdff4bd4882383d22b0c60d4e434e
38
38
  filename: appsignal-aarch64-darwin-all-dynamic.tar.gz
39
39
  arm-darwin:
40
40
  static:
41
- checksum: aa37596a85d65d46fc5bba25d4d059e98655709e6c44ee39e7c6ba72398ad704
41
+ checksum: d443e00232acd3e53cd3d3f8c525da69ad362c38230472cc596e687cf73c7d94
42
42
  filename: appsignal-aarch64-darwin-all-static.tar.gz
43
43
  dynamic:
44
- checksum: b40026410702c1bb3ac974c9648d464e0551956dc933deff22543f10cca81e46
44
+ checksum: 750cbaf06fca0a46e0ad046823a5b55b461cdff4bd4882383d22b0c60d4e434e
45
45
  filename: appsignal-aarch64-darwin-all-dynamic.tar.gz
46
46
  aarch64-linux:
47
47
  static:
48
- checksum: 12c5659d5a5d67ee641bdb1c38ef842b7687811fdec1f9edf8e196a2ed596405
48
+ checksum: 7cd884dfd47466112d571ce49830057ffff0070383037eec4bfecf29547e3e47
49
49
  filename: appsignal-aarch64-linux-all-static.tar.gz
50
50
  dynamic:
51
- checksum: 8301ab5f64af1c185860314682fbfd89027ea5e4850d8beb222613ca5455358a
51
+ checksum: 060c7b768c7bd81aaf0dd9a872d4bd36f1efd433972ae5cab41e2791236a3d0c
52
52
  filename: appsignal-aarch64-linux-all-dynamic.tar.gz
53
53
  i686-linux:
54
54
  static:
55
- checksum: afebd51e26b8d21923a8adcbc8fda7bbd29d4e12573f53895e3a650fcd84ffd5
55
+ checksum: 21ca02f85c438190307b2a3500642a94dbd35ada6349cd97ac32253ac7dcc9e1
56
56
  filename: appsignal-i686-linux-all-static.tar.gz
57
57
  dynamic:
58
- checksum: e0ed425a1d92ad7e9beb83f5b7c896f8606773cc599337a198536a150ba76c51
58
+ checksum: 2cf89679e62b725374e8578bb58dcfea30c573e406bd28f42215be52a2c8f31e
59
59
  filename: appsignal-i686-linux-all-dynamic.tar.gz
60
60
  x86-linux:
61
61
  static:
62
- checksum: afebd51e26b8d21923a8adcbc8fda7bbd29d4e12573f53895e3a650fcd84ffd5
62
+ checksum: 21ca02f85c438190307b2a3500642a94dbd35ada6349cd97ac32253ac7dcc9e1
63
63
  filename: appsignal-i686-linux-all-static.tar.gz
64
64
  dynamic:
65
- checksum: e0ed425a1d92ad7e9beb83f5b7c896f8606773cc599337a198536a150ba76c51
65
+ checksum: 2cf89679e62b725374e8578bb58dcfea30c573e406bd28f42215be52a2c8f31e
66
66
  filename: appsignal-i686-linux-all-dynamic.tar.gz
67
67
  x86_64-linux:
68
68
  static:
69
- checksum: 563eb5c9daeec67a760ac236b2848aee4ec0e39dca1368150a6d99844d4d665f
69
+ checksum: 6feb2ed89451c6fdf6365dd1023bd419d8fa99e3c986d6a4e804f8cb68b3f401
70
70
  filename: appsignal-x86_64-linux-all-static.tar.gz
71
71
  dynamic:
72
- checksum: 74940f06f4c92582262014a9967f298bccee3ca94e3a490ddc40787573c91ed0
72
+ checksum: e8dc655eaf5194dade1b5b20fc2bed0b443db84bfaf9c1828875a77dd20516c9
73
73
  filename: appsignal-x86_64-linux-all-dynamic.tar.gz
74
74
  x86_64-linux-musl:
75
75
  static:
76
- checksum: 2ecad2b2bdd362d9d871322eac79370d12314e3d32a53c83be17d054e91f188d
76
+ checksum: 61a70bb104b7d7cbb9d51a0a5d806346a6c36deb60d1e41351eb61c4813587c1
77
77
  filename: appsignal-x86_64-linux-musl-all-static.tar.gz
78
78
  dynamic:
79
- checksum: 5e4c4096ca7b0c7a97fe03f684c0678396c97f24c2065dc961081d022a8ad2a7
79
+ checksum: cfe38530c1b1c9ab014aca25dd397540f73ca117fe48119a956d864c9d10c1e5
80
80
  filename: appsignal-x86_64-linux-musl-all-dynamic.tar.gz
81
81
  x86_64-freebsd:
82
82
  static:
83
- checksum: 2eaa4beeb3322ec3c6007f4a8ec483405f8ade4c372031a068bbedf05da9443d
83
+ checksum: 8662a282787b11a6e48dab944afbf1afca91b45ca3147de8cdadb52ef271a43a
84
84
  filename: appsignal-x86_64-freebsd-all-static.tar.gz
85
85
  dynamic:
86
- checksum: 4805995f0b10d4b5183e4a2430af19638372a4f290d95a123a0874b2f3878d8e
86
+ checksum: 4d8f0aa768aee213fd7ada877e2e86f47fb4c17269cbe54584ff759d480afc10
87
87
  filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
88
88
  amd64-freebsd:
89
89
  static:
90
- checksum: 2eaa4beeb3322ec3c6007f4a8ec483405f8ade4c372031a068bbedf05da9443d
90
+ checksum: 8662a282787b11a6e48dab944afbf1afca91b45ca3147de8cdadb52ef271a43a
91
91
  filename: appsignal-x86_64-freebsd-all-static.tar.gz
92
92
  dynamic:
93
- checksum: 4805995f0b10d4b5183e4a2430af19638372a4f290d95a123a0874b2f3878d8e
93
+ checksum: 4d8f0aa768aee213fd7ada877e2e86f47fb4c17269cbe54584ff759d480afc10
94
94
  filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
@@ -471,7 +471,8 @@ module Appsignal
471
471
  :system => config.system_config,
472
472
  :initial => config.initial_config,
473
473
  :file => config.file_config,
474
- :env => config.env_config
474
+ :env => config.env_config,
475
+ :override => config.override_config
475
476
  }
476
477
  }
477
478
  print_config_options(config)
@@ -170,7 +170,7 @@ module Appsignal
170
170
  # @return [Hash]
171
171
 
172
172
  attr_reader :root_path, :env, :config_hash, :system_config,
173
- :initial_config, :file_config, :env_config
173
+ :initial_config, :file_config, :env_config, :override_config
174
174
  attr_accessor :logger
175
175
 
176
176
  # Initialize a new configuration object for AppSignal.
@@ -231,6 +231,9 @@ module Appsignal
231
231
  # Load config from environment variables
232
232
  @env_config = load_from_environment
233
233
  merge(env_config)
234
+ # Load config overrides
235
+ @override_config = determine_overrides
236
+ merge(override_config)
234
237
  # Handle deprecated config options
235
238
  maintain_backwards_compatibility
236
239
  # Validate that we have a correct config
@@ -396,37 +399,23 @@ module Appsignal
396
399
 
397
400
  # Maintain backwards compatibility with deprecated config options.
398
401
  #
399
- # Add deprecated config options here with the behavior of setting its
400
- # replacement, if the replacement option is not configured by the user.
402
+ # Add warnings for deprecated config options here if they have no
403
+ # replacement, or should be non-functional.
404
+ #
405
+ # Add them to {determine_overrides} if replacement config options should be
406
+ # set instead.
401
407
  #
402
408
  # Make sure to remove the contents of this method in the next major
403
409
  # version, but the method itself with an empty body can stick around as a
404
410
  # structure for future deprecations.
405
411
  def maintain_backwards_compatibility
406
- skip_session_data = config_hash[:skip_session_data]
407
- send_session_data = config_hash[:send_session_data]
408
- if skip_session_data.nil? # Deprecated option is not set
409
- if send_session_data.nil? # Not configured by user
410
- @system_config[:send_session_data] = true
411
- merge(:send_session_data => true) # Set default value
412
- end
413
- else
414
- if send_session_data.nil? # Not configured by user
415
- @system_config[:send_session_data] = !skip_session_data
416
- merge(:send_session_data => !skip_session_data)
417
- end
418
- deprecation_message "The `skip_session_data` config option is " \
419
- "deprecated. Please use `send_session_data` instead.",
420
- logger
421
- end
412
+ return unless config_hash.key?(:working_dir_path)
422
413
 
423
- if config_hash.key?(:working_dir_path) # rubocop:disable Style/GuardClause
424
- deprecation_message \
425
- "The `working_dir_path` option is deprecated, please use " \
426
- "`working_directory_path` instead and specify the " \
427
- "full path to the working directory",
428
- logger
429
- end
414
+ deprecation_message \
415
+ "The `working_dir_path` option is deprecated, please use " \
416
+ "`working_directory_path` instead and specify the " \
417
+ "full path to the working directory",
418
+ logger
430
419
  end
431
420
 
432
421
  def load_from_environment
@@ -456,6 +445,31 @@ module Appsignal
456
445
  config
457
446
  end
458
447
 
448
+ # Set config options based on the final user config. Fix any conflicting
449
+ # config or set new config options based on deprecated config options.
450
+ #
451
+ # Make sure to remove behavior for deprecated config options in this method
452
+ # in the next major version, but the method itself with an empty body can
453
+ # stick around as a structure for future deprecations.
454
+ def determine_overrides
455
+ config = {}
456
+ skip_session_data = config_hash[:skip_session_data]
457
+ send_session_data = config_hash[:send_session_data]
458
+ if skip_session_data.nil? # Deprecated option is not set
459
+ if send_session_data.nil? # Not configured by user
460
+ config[:send_session_data] = true # Set default value
461
+ end
462
+ else
463
+ deprecation_message "The `skip_session_data` config option is " \
464
+ "deprecated. Please use `send_session_data` instead.",
465
+ logger
466
+ # Not configured by user
467
+ config[:send_session_data] = !skip_session_data if send_session_data.nil?
468
+ end
469
+
470
+ config
471
+ end
472
+
459
473
  def merge(new_config)
460
474
  new_config.each do |key, value|
461
475
  unless config_hash[key].nil?
@@ -11,8 +11,10 @@ module Appsignal
11
11
  end
12
12
 
13
13
  def install
14
- ::ActiveJob::Base
15
- .extend ::Appsignal::Hooks::ActiveJobHook::ActiveJobClassInstrumentation
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
@@ -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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Appsignal
4
- VERSION = "3.0.21.alpha.1".freeze
4
+ VERSION = "3.0.23".freeze
5
5
  end
data/lib/appsignal.rb CHANGED
@@ -58,20 +58,6 @@ module Appsignal
58
58
  # @see start_logger
59
59
  attr_writer :logger
60
60
 
61
- # @api private
62
- def extensions
63
- @extensions ||= []
64
- end
65
-
66
- # @api private
67
- def initialize_extensions
68
- Appsignal.logger.debug("Initializing extensions")
69
- extensions.each do |extension|
70
- Appsignal.logger.debug("Initializing #{extension}")
71
- extension.initializer
72
- end
73
- end
74
-
75
61
  # @api private
76
62
  def testing?
77
63
  false
@@ -123,7 +109,6 @@ module Appsignal
123
109
  config.write_to_environment
124
110
  Appsignal::Extension.start
125
111
  Appsignal::Hooks.load_hooks
126
- initialize_extensions
127
112
 
128
113
  if config[:enable_allocation_tracking] && !Appsignal::System.jruby?
129
114
  Appsignal::Extension.install_allocation_event_hook
@@ -772,10 +772,11 @@ describe Appsignal::CLI::Diagnose, :api_stub => true, :send_report => :yes_cli_i
772
772
  "options" => default_config.merge("env" => "", "send_session_data" => true),
773
773
  "sources" => {
774
774
  "default" => default_config,
775
- "system" => { "send_session_data" => true },
775
+ "system" => {},
776
776
  "initial" => { "env" => "" },
777
777
  "file" => {},
778
- "env" => {}
778
+ "env" => {},
779
+ "override" => { "send_session_data" => true }
779
780
  }
780
781
  )
781
782
  end
@@ -890,10 +891,11 @@ describe Appsignal::CLI::Diagnose, :api_stub => true, :send_report => :yes_cli_i
890
891
  "options" => hash_with_string_keys(final_config),
891
892
  "sources" => {
892
893
  "default" => hash_with_string_keys(Appsignal::Config::DEFAULT_CONFIG),
893
- "system" => { "send_session_data" => true },
894
+ "system" => {},
894
895
  "initial" => hash_with_string_keys(config.initial_config.merge(additional_initial_config)),
895
896
  "file" => hash_with_string_keys(config.file_config),
896
- "env" => {}
897
+ "env" => {},
898
+ "override" => { "send_session_data" => true }
897
899
  }
898
900
  )
899
901
  end
@@ -917,10 +919,11 @@ describe Appsignal::CLI::Diagnose, :api_stub => true, :send_report => :yes_cli_i
917
919
  "options" => hash_with_string_keys(config.config_hash).merge("env" => "foobar"),
918
920
  "sources" => {
919
921
  "default" => hash_with_string_keys(Appsignal::Config::DEFAULT_CONFIG),
920
- "system" => { "send_session_data" => true },
922
+ "system" => {},
921
923
  "initial" => hash_with_string_keys(config.initial_config),
922
924
  "file" => hash_with_string_keys(config.file_config),
923
- "env" => {}
925
+ "env" => {},
926
+ "override" => { "send_session_data" => true }
924
927
  }
925
928
  )
926
929
  end
@@ -434,6 +434,87 @@ describe Appsignal::Config do
434
434
  end
435
435
  end
436
436
 
437
+ describe "with config based on overrides" do
438
+ let(:log_stream) { StringIO.new }
439
+ let(:logger) { test_logger(log_stream) }
440
+ let(:logs) { log_contents(log_stream) }
441
+ let(:config) do
442
+ described_class.new(Dir.pwd, "production", config_options, logger)
443
+ end
444
+
445
+ describe "skip_session_data" do
446
+ let(:err_stream) { std_stream }
447
+ let(:stderr) { err_stream.read }
448
+ let(:deprecation_message) do
449
+ "The `skip_session_data` config option is deprecated. Please use " \
450
+ "`send_session_data` instead."
451
+ end
452
+ before do
453
+ capture_std_streams(std_stream, err_stream) { config }
454
+ end
455
+
456
+ context "when not set" do
457
+ let(:config_options) { {} }
458
+
459
+ it "sets the default send_session_data value" do
460
+ expect(config[:skip_session_data]).to be_nil
461
+ expect(config[:send_session_data]).to eq(true)
462
+ expect(config.override_config[:send_session_data]).to eq(true)
463
+ end
464
+
465
+ it "does not print a deprecation warning" do
466
+ expect(stderr).to_not include("appsignal WARNING: #{deprecation_message}")
467
+ expect(logs).to_not include(deprecation_message)
468
+ end
469
+ end
470
+
471
+ context "when set to true" do
472
+ let(:config_options) { { :skip_session_data => true } }
473
+
474
+ it "sets send_session_data if send_session_data is not set by the user" do
475
+ expect(config[:skip_session_data]).to eq(true)
476
+ expect(config[:send_session_data]).to eq(false)
477
+ expect(config.override_config[:send_session_data]).to eq(false)
478
+ end
479
+
480
+ it "prints a deprecation warning" do
481
+ expect(stderr).to include("appsignal WARNING: #{deprecation_message}")
482
+ expect(logs).to include(deprecation_message)
483
+ end
484
+ end
485
+
486
+ context "when set to false" do
487
+ let(:config_options) { { :skip_session_data => false } }
488
+
489
+ it "sets send_session_data if send_session_data is not set by the user" do
490
+ expect(config[:skip_session_data]).to eq(false)
491
+ expect(config[:send_session_data]).to eq(true)
492
+ expect(config.override_config[:send_session_data]).to eq(true)
493
+ end
494
+
495
+ it "prints a deprecation warning" do
496
+ expect(stderr).to include("appsignal WARNING: #{deprecation_message}")
497
+ expect(logs).to include(deprecation_message)
498
+ end
499
+ end
500
+
501
+ context "when skip_session_data and send_session_data are both set" do
502
+ let(:config_options) { { :skip_session_data => true, :send_session_data => true } }
503
+
504
+ it "does not overwrite the send_session_data value" do
505
+ expect(config[:skip_session_data]).to eq(true)
506
+ expect(config[:send_session_data]).to eq(true)
507
+ expect(config.override_config[:send_session_data]).to be_nil
508
+ end
509
+
510
+ it "prints a deprecation warning" do
511
+ expect(stderr).to include("appsignal WARNING: #{deprecation_message}")
512
+ expect(logs).to include(deprecation_message)
513
+ end
514
+ end
515
+ end
516
+ end
517
+
437
518
  describe "config keys" do
438
519
  describe ":endpoint" do
439
520
  subject { config[:endpoint] }
@@ -789,78 +870,6 @@ describe Appsignal::Config do
789
870
  end
790
871
  end
791
872
  end
792
-
793
- describe "skip_session_data" do
794
- let(:err_stream) { std_stream }
795
- let(:stderr) { err_stream.read }
796
- let(:deprecation_message) do
797
- "The `skip_session_data` config option is deprecated. Please use " \
798
- "`send_session_data` instead."
799
- end
800
- before do
801
- capture_std_streams(std_stream, err_stream) { config }
802
- end
803
-
804
- context "when not set" do
805
- let(:config_options) { {} }
806
-
807
- it "sets the default send_session_data value" do
808
- expect(config[:skip_session_data]).to be_nil
809
- expect(config[:send_session_data]).to eq(true)
810
- expect(config.system_config[:send_session_data]).to eq(true)
811
- end
812
-
813
- it "does not print a deprecation warning" do
814
- expect(stderr).to_not include("appsignal WARNING: #{deprecation_message}")
815
- expect(logs).to_not include(deprecation_message)
816
- end
817
- end
818
-
819
- context "when set to true" do
820
- let(:config_options) { { :skip_session_data => true } }
821
-
822
- it "sets send_session_data if send_session_data is not set by the user" do
823
- expect(config[:skip_session_data]).to eq(true)
824
- expect(config[:send_session_data]).to eq(false)
825
- expect(config.system_config[:send_session_data]).to eq(false)
826
- end
827
-
828
- it "prints a deprecation warning" do
829
- expect(stderr).to include("appsignal WARNING: #{deprecation_message}")
830
- expect(logs).to include(deprecation_message)
831
- end
832
- end
833
-
834
- context "when set to false" do
835
- let(:config_options) { { :skip_session_data => false } }
836
-
837
- it "sets send_session_data if send_session_data is not set by the user" do
838
- expect(config[:skip_session_data]).to eq(false)
839
- expect(config[:send_session_data]).to eq(true)
840
- expect(config.system_config[:send_session_data]).to eq(true)
841
- end
842
-
843
- it "prints a deprecation warning" do
844
- expect(stderr).to include("appsignal WARNING: #{deprecation_message}")
845
- expect(logs).to include(deprecation_message)
846
- end
847
- end
848
-
849
- context "when skip_session_data and send_session_data are both set" do
850
- let(:config_options) { { :skip_session_data => true, :send_session_data => true } }
851
-
852
- it "does not overwrite the send_session_data value" do
853
- expect(config[:skip_session_data]).to eq(true)
854
- expect(config[:send_session_data]).to eq(true)
855
- expect(config.system_config[:send_session_data]).to be_nil
856
- end
857
-
858
- it "prints a deprecation warning" do
859
- expect(stderr).to include("appsignal WARNING: #{deprecation_message}")
860
- expect(logs).to include(deprecation_message)
861
- end
862
- end
863
- end
864
873
  end
865
874
 
866
875
  describe "#validate" do
@@ -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
@@ -148,7 +148,7 @@ if DependencyHelper.padrino_present?
148
148
  expect_a_transaction_to_be_created
149
149
  # Uses path for action name
150
150
  expect(transaction).to receive(:set_action_if_nil).with("PadrinoTestApp#unknown")
151
- expect(response).to match_response(404, %r{^GET /404})
151
+ expect(response).to match_response(404, /^GET /404/)
152
152
  end
153
153
  end
154
154
 
@@ -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 "should only return the first level of the object" do
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 hash values with a single questionmark" do
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
 
@@ -5,7 +5,6 @@ describe Appsignal do
5
5
  # Make sure we have a clean state because we want to test
6
6
  # initialization here.
7
7
  Appsignal.config = nil
8
- Appsignal.extensions.clear
9
8
  end
10
9
 
11
10
  let(:transaction) { http_request_transaction }
@@ -20,14 +19,6 @@ describe Appsignal do
20
19
  end
21
20
  end
22
21
 
23
- describe ".extensions" do
24
- it "should keep a list of extensions" do
25
- expect(Appsignal.extensions).to be_empty
26
- Appsignal.extensions << Appsignal::MockExtension
27
- expect(Appsignal.extensions.size).to eq(1)
28
- end
29
- end
30
-
31
22
  describe ".start" do
32
23
  context "with no config set beforehand" do
33
24
  it "should do nothing when config is not set and there is no valid config in the env" do
@@ -63,15 +54,6 @@ describe Appsignal do
63
54
  Appsignal.start
64
55
  end
65
56
 
66
- context "with an extension" do
67
- before { Appsignal.extensions << Appsignal::MockExtension }
68
-
69
- it "should call the extension's initializer" do
70
- expect(Appsignal::MockExtension).to receive(:initializer)
71
- Appsignal.start
72
- end
73
- end
74
-
75
57
  context "when allocation tracking and gc instrumentation have been enabled" do
76
58
  before do
77
59
  allow(GC::Profiler).to receive(:enable)
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.21.alpha.1
4
+ version: 3.0.23
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-02-14 00:00:00.000000000 Z
13
+ date: 2022-02-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
@@ -405,7 +405,6 @@ files:
405
405
  - spec/support/matchers/contains_log.rb
406
406
  - spec/support/matchers/have_colorized_text.rb
407
407
  - spec/support/mocks/fake_gc_profiler.rb
408
- - spec/support/mocks/mock_extension.rb
409
408
  - spec/support/mocks/mock_probe.rb
410
409
  - spec/support/rails/my_app.rb
411
410
  - spec/support/shared_examples/instrument.rb
@@ -437,11 +436,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
437
436
  version: '2.0'
438
437
  required_rubygems_version: !ruby/object:Gem::Requirement
439
438
  requirements:
440
- - - ">"
439
+ - - ">="
441
440
  - !ruby/object:Gem::Version
442
- version: 1.3.1
441
+ version: '0'
443
442
  requirements: []
444
- rubygems_version: 3.1.6
443
+ rubygems_version: 3.3.6
445
444
  signing_key:
446
445
  specification_version: 4
447
446
  summary: Logs performance and exception data from your app to appsignal.com
@@ -559,7 +558,6 @@ test_files:
559
558
  - spec/support/matchers/contains_log.rb
560
559
  - spec/support/matchers/have_colorized_text.rb
561
560
  - spec/support/mocks/fake_gc_profiler.rb
562
- - spec/support/mocks/mock_extension.rb
563
561
  - spec/support/mocks/mock_probe.rb
564
562
  - spec/support/rails/my_app.rb
565
563
  - spec/support/shared_examples/instrument.rb
@@ -1,6 +0,0 @@
1
- module Appsignal
2
- module MockExtension
3
- def self.initializer
4
- end
5
- end
6
- end