appsignal 3.0.0.rc.1 → 3.0.4.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,11 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ # 3.0.4 beta 1
4
+ - Bump agent to 6caf6d0
5
+ - Add aarch64 (ARM 64-bit Linux) build.
6
+ - Replace curl HTTP client.
7
+ - Various other maintenance updates.
8
+
9
+ # 3.0.3
10
+ - Fix deprecation message for set_error namespace argument. PR #712
11
+ - Fix example code for Transaction#set_namespace method. PR #713
12
+ - Fix extension fallbacks on extension installation failure, that caused
13
+ - NoMethodErrors. PR #720
14
+ - Bump agent to v-75e76ad. PR #721
15
+
16
+ # 3.0.2
17
+ - Fix error on Rails boot when `enable_frontend_error_catching` is `true`.
18
+ PR #711
19
+
20
+ # 3.0.1
21
+ - Fix error occurring on APPSIGNAL_DNS_SERVER environment variable option
22
+ parsing. PR #709
23
+
3
24
  # 3.0.0
25
+
26
+ Please read our [upgrade from version 2 to 3 guide][upgrade3] before upgrading.
27
+
28
+ [upgrade3]: https://docs.appsignal.com/ruby/installation/upgrade-from-2-to-3.html
29
+
4
30
  - Drop Ruby 1.9 support. PR #683, #682, #688, #694
5
31
  - Require Ruby 2.0 or newer for gem. PR #701
6
32
  - Use Module.prepend for all gem integrations. Fixes #603 in combination with
7
33
  other gems that provide instrumentation for gems. PR #683
8
- - Remove deprecated integrations, classes, methods and arguments. PR #685
34
+ - Remove deprecated integrations, classes, methods and arguments. PR #685, #686
9
35
  - Deprecate `set_error` and `send_error` error helpers `tags` and `namespace`
10
36
  arguments. PR #702
11
37
  - Add Sidekiq error handler. Report more Sidekiq errors that happen around job
data/Rakefile CHANGED
@@ -377,8 +377,6 @@ begin
377
377
  is_jruby = defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
378
378
  excludes = []
379
379
  excludes << "spec/lib/appsignal/extension/jruby_spec.rb" unless is_jruby
380
- is_ruby19 = RUBY_VERSION < "2.0"
381
- excludes << "spec/lib/appsignal/integrations/object_spec.rb" if is_ruby19
382
380
  exclude_pattern = "--exclude-pattern=#{excludes.join(",")}" if excludes.any?
383
381
 
384
382
  desc "Run the AppSignal gem test suite."
@@ -387,10 +385,20 @@ begin
387
385
  end
388
386
 
389
387
  namespace :test do
390
- desc "Run the Appsignal gem test in an extension failure scenario"
391
- RSpec::Core::RakeTask.new :failure do |t|
388
+ RSpec::Core::RakeTask.new :rspec_failure do |t|
392
389
  t.rspec_opts = "#{exclude_pattern} --tag extension_installation_failure"
393
390
  end
391
+
392
+ desc "Intentionally fail the extension installation"
393
+ task :prepare_failure do
394
+ # ENV var to make sure installation fails on purpurse
395
+ ENV["_TEST_APPSIGNAL_EXTENSION_FAILURE"] = "true"
396
+ # Run extension installation with intentional failure
397
+ `rake extension:install`
398
+ end
399
+
400
+ desc "Run the Appsignal gem test in an extension failure scenario"
401
+ task :failure => [:prepare_failure, :rspec_failure]
394
402
  end
395
403
  rescue LoadError # rubocop:disable Lint/HandleExceptions
396
404
  # When running rake install, there is no RSpec yet.
data/appsignal.gemspec CHANGED
@@ -42,9 +42,24 @@ Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
42
42
  gem.add_development_dependency "timecop"
43
43
  gem.add_development_dependency "webmock"
44
44
  gem.add_development_dependency "yard", ">= 0.9.20"
45
- is_modern_ruby = Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.0.0")
46
- if is_modern_ruby
47
- gem.add_development_dependency "pry"
45
+ gem.add_development_dependency "pry"
46
+
47
+ # Dependencies that need to be locked to a specific version in developement
48
+ ruby_version = Gem::Version.new(RUBY_VERSION)
49
+ if ruby_version > Gem::Version.new("2.5.0")
50
+ # RuboCop dependency parallel depends on Ruby > 2.4
48
51
  gem.add_development_dependency "rubocop", "0.50.0"
49
52
  end
53
+ if ruby_version < Gem::Version.new("2.1.0")
54
+ # Newer versions of rexml use keyword arguments with optional arguments which
55
+ # work in Ruby 2.1 and newer.
56
+ gem.add_development_dependency "rexml", "3.2.4"
57
+ end
58
+ if ruby_version < Gem::Version.new("2.1.0")
59
+ # public_suffix 3.0 and newer don't support Ruby < 2.1
60
+ gem.add_development_dependency "public_suffix", "~> 2.0.5"
61
+ elsif ruby_version < Gem::Version.new("2.3.0")
62
+ # public_suffix 4.0 and newer don't support Ruby < 2.3
63
+ gem.add_development_dependency "public_suffix", "~> 3.1.1"
64
+ end
50
65
  end
data/build_matrix.yml CHANGED
@@ -88,6 +88,10 @@ matrix:
88
88
  gemsets: # By default all gems are tested
89
89
  none:
90
90
  - "no_dependencies"
91
+ old_rails:
92
+ - "no_dependencies"
93
+ - "rails-3.2"
94
+ - "rails-4.2"
91
95
  minimal:
92
96
  - "no_dependencies"
93
97
  - "rails-5.2"
@@ -97,6 +101,7 @@ matrix:
97
101
  - ruby: "2.0.0-p648"
98
102
  rubygems: "2.7.8"
99
103
  bundler: "1.17.3"
104
+ gems: "old_rails"
100
105
  - ruby: "2.1.10"
101
106
  rubygems: "2.7.8"
102
107
  bundler: "1.17.3"
@@ -112,8 +117,8 @@ matrix:
112
117
  - ruby: "2.5.8"
113
118
  gems: "minimal"
114
119
  - ruby: "2.6.6"
115
- - ruby: "2.7.2"
116
- - ruby: "3.0.0"
120
+ - ruby: "2.7.3"
121
+ - ruby: "3.0.1"
117
122
  - ruby: "jruby-9.1.17.0"
118
123
  gems: "minimal"
119
124
  gems:
@@ -122,47 +127,37 @@ matrix:
122
127
  - gem: "capistrano3"
123
128
  - gem: "grape"
124
129
  - gem: "padrino"
125
- exclude:
126
- ruby:
127
- - "2.0.0-p648"
128
130
  - gem: "que"
129
131
  - gem: "que_beta"
130
- exclude:
131
- ruby:
132
- - "2.0.0-p648"
133
132
  - gem: "rails-3.2"
134
133
  bundler: "1.17.3"
135
134
  exclude:
136
135
  ruby:
137
136
  - "2.6.6"
138
- - "2.7.2"
139
- - "3.0.0"
137
+ - "2.7.3"
138
+ - "3.0.1"
140
139
  - gem: "rails-4.2"
141
140
  bundler: "1.17.3"
142
141
  exclude:
143
142
  ruby:
144
143
  - "2.6.6"
145
- - "2.7.2"
146
- - "3.0.0"
144
+ - "2.7.3"
145
+ - "3.0.1"
147
146
  - gem: "rails-5.0"
148
147
  exclude:
149
148
  ruby:
150
- - "2.0.0-p648"
151
- - "3.0.0"
149
+ - "3.0.1"
152
150
  - gem: "rails-5.1"
153
151
  exclude:
154
152
  ruby:
155
- - "2.0.0-p648"
156
- - "3.0.0"
153
+ - "3.0.1"
157
154
  - gem: "rails-5.2"
158
155
  exclude:
159
156
  ruby:
160
- - "2.0.0-p648"
161
- - "3.0.0"
157
+ - "3.0.1"
162
158
  - gem: "rails-6.0"
163
159
  exclude:
164
160
  ruby:
165
- - "2.0.0-p648"
166
161
  - "2.1.10"
167
162
  - "2.2.10"
168
163
  - "2.3.8"
@@ -172,15 +167,12 @@ matrix:
172
167
  bundler: "1.17.3"
173
168
  exclude:
174
169
  ruby:
175
- - "3.0.0"
170
+ - "3.0.1"
176
171
  - gem: "resque-2"
177
- exclude:
178
- ruby:
179
- - "2.0.0-p648"
180
172
  - gem: "sequel"
181
173
  - gem: "sequel-435"
182
174
  exclude:
183
175
  ruby:
184
- - "3.0.0"
176
+ - "3.0.1"
185
177
  - gem: "sinatra"
186
178
  - gem: "webmachine"
data/ext/agent.yml CHANGED
@@ -1,62 +1,69 @@
1
1
  ---
2
- version: d98461b
2
+ version: 6caf6d0
3
3
  mirrors:
4
4
  - https://appsignal-agent-releases.global.ssl.fastly.net
5
5
  - https://d135dj0rjqvssy.cloudfront.net
6
6
  triples:
7
7
  x86_64-darwin:
8
8
  static:
9
- checksum: 178ab2329c7b29cf45140e4707e75c20379fa0c7dfd7f39266a7a95aea510780
9
+ checksum: 94b6fb3ba7c68041c0e31867221acccc7d82702a027e5ffc2376bc09c04728f2
10
10
  filename: appsignal-x86_64-darwin-all-static.tar.gz
11
11
  dynamic:
12
- checksum: '0923985cc78c5cf278f45d530679954b94b1a91c87453369116fc05525e29864'
12
+ checksum: dffb70cd2c2fce05df798591d93cc67ccce66237fbaaee18c368b174656cace8
13
13
  filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
14
14
  universal-darwin:
15
15
  static:
16
- checksum: 178ab2329c7b29cf45140e4707e75c20379fa0c7dfd7f39266a7a95aea510780
16
+ checksum: 94b6fb3ba7c68041c0e31867221acccc7d82702a027e5ffc2376bc09c04728f2
17
17
  filename: appsignal-x86_64-darwin-all-static.tar.gz
18
18
  dynamic:
19
- checksum: '0923985cc78c5cf278f45d530679954b94b1a91c87453369116fc05525e29864'
19
+ checksum: dffb70cd2c2fce05df798591d93cc67ccce66237fbaaee18c368b174656cace8
20
20
  filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
21
+ aarch64-linux:
22
+ static:
23
+ checksum: 4fa48dba3ce6c2d03105ccdb8ff74908ec1eed40c3bb35357fd197bc70d98fb4
24
+ filename: appsignal-aarch64-linux-all-static.tar.gz
25
+ dynamic:
26
+ checksum: 5d04ed04e89ede3946b411d920875346e1dac42665f0f61ddbe7becbd7a7cba3
27
+ filename: appsignal-aarch64-linux-all-dynamic.tar.gz
21
28
  i686-linux:
22
29
  static:
23
- checksum: cb772a8a178edb25d666b650efda80149c98e80e4264435d6176f8a6104f959a
30
+ checksum: 849db8eb40ac23bb9c0b0aacadf4a6210f428e5b95e92f93311240bbaf0150d2
24
31
  filename: appsignal-i686-linux-all-static.tar.gz
25
32
  dynamic:
26
- checksum: c9ac51f4d1b3cc13773d8fa8ea5cfad6af7909144d85186cef9324ec0531bdac
33
+ checksum: 251a078aecc6f8e44e4f2a1e09b9bbc481636e324d1dcc3e99d3f13ee3ae8a66
27
34
  filename: appsignal-i686-linux-all-dynamic.tar.gz
28
35
  x86-linux:
29
36
  static:
30
- checksum: cb772a8a178edb25d666b650efda80149c98e80e4264435d6176f8a6104f959a
37
+ checksum: 849db8eb40ac23bb9c0b0aacadf4a6210f428e5b95e92f93311240bbaf0150d2
31
38
  filename: appsignal-i686-linux-all-static.tar.gz
32
39
  dynamic:
33
- checksum: c9ac51f4d1b3cc13773d8fa8ea5cfad6af7909144d85186cef9324ec0531bdac
40
+ checksum: 251a078aecc6f8e44e4f2a1e09b9bbc481636e324d1dcc3e99d3f13ee3ae8a66
34
41
  filename: appsignal-i686-linux-all-dynamic.tar.gz
35
42
  x86_64-linux:
36
43
  static:
37
- checksum: d6c280e992d74f97d59da9827ec5707ca4f6776b0568cde1c083c1113e4b7104
44
+ checksum: 9d09faa4a778040774d02688ce12d1b59af526cc0f25f2a23b3a4fb594972fa0
38
45
  filename: appsignal-x86_64-linux-all-static.tar.gz
39
46
  dynamic:
40
- checksum: ef1a3f5d4b2ed61ea2ae4d5cb1a261a0e685fb9d3e7ea9efe455498aad386e59
47
+ checksum: 13bd67e2a1ae718390c5ba61e03ab7d39f9203de6caa8f3be798e104de49a33a
41
48
  filename: appsignal-x86_64-linux-all-dynamic.tar.gz
42
49
  x86_64-linux-musl:
43
50
  static:
44
- checksum: 9cf8ad34392662746a45cfce18113ad19cc29954789e2058f30e527163f2e98a
51
+ checksum: 2dcbbf8306f29cc0b32e9665509af43f272dabac632a7d66cfab68f84eb82e63
45
52
  filename: appsignal-x86_64-linux-musl-all-static.tar.gz
46
53
  dynamic:
47
- checksum: 01bd76983227648d9bc41d035e1552fcf18d62f0d6818bf7bb7fc2e7c166513d
54
+ checksum: aa71dd709e47114950a1dbfa8eb9ab02c989efd69c8dde50adabfac035f40a7b
48
55
  filename: appsignal-x86_64-linux-musl-all-dynamic.tar.gz
49
56
  x86_64-freebsd:
50
57
  static:
51
- checksum: 403a597cbdbdba08460c5c9e93347ed9ad1d24333204e6d72db342deb266a296
58
+ checksum: e439baee1a4445c0eb8028638bbcc19fe6387457c41f9fad93d9fc142d904518
52
59
  filename: appsignal-x86_64-freebsd-all-static.tar.gz
53
60
  dynamic:
54
- checksum: a1faae80ae09a6588c4cd35cb91dfa4b2176fc3cb17fbf79db80194c21e75bf9
61
+ checksum: '08e0f625e22dea0d5121dbacff417ab1c929cae7610e8aac3cf04b862d61d934'
55
62
  filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
56
63
  amd64-freebsd:
57
64
  static:
58
- checksum: 403a597cbdbdba08460c5c9e93347ed9ad1d24333204e6d72db342deb266a296
65
+ checksum: e439baee1a4445c0eb8028638bbcc19fe6387457c41f9fad93d9fc142d904518
59
66
  filename: appsignal-x86_64-freebsd-all-static.tar.gz
60
67
  dynamic:
61
- checksum: a1faae80ae09a6588c4cd35cb91dfa4b2176fc3cb17fbf79db80194c21e75bf9
68
+ checksum: '08e0f625e22dea0d5121dbacff417ab1c929cae7610e8aac3cf04b862d61d934'
62
69
  filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
@@ -2,6 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'capistrano', '< 3.0'
4
4
  gem 'net-ssh', '2.9.2'
5
- gem 'rack', '~> 1.6'
6
5
 
7
6
  gemspec :path => '../'
@@ -3,6 +3,5 @@ source 'https://rubygems.org'
3
3
  gem 'capistrano', '~> 3.0'
4
4
  gem 'i18n', '~> 1.2.0'
5
5
  gem 'net-ssh', '2.9.2'
6
- gem 'rack', '~> 1.6'
7
6
 
8
7
  gemspec :path => '../'
@@ -1,7 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'grape', '0.14.0'
4
- gem 'rack', '~> 1.6'
5
4
  gem 'activesupport', '~> 4.2'
6
5
 
7
6
  gemspec :path => '../'
@@ -1,12 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rack', '~> 1.6'
4
-
5
3
  ruby_version = Gem::Version.new(RUBY_VERSION)
6
- if ruby_version < Gem::Version.new("2.0.0")
7
- # Newer versions of this gem have rexml as a dependency which doesn't work on
8
- # Ruby 1.9
9
- gem "crack", "0.4.4"
4
+ if ruby_version < Gem::Version.new("2.3.0")
5
+ gem 'rack', '~> 1.6'
10
6
  end
11
7
 
12
8
  gemspec :path => '../'
@@ -3,4 +3,6 @@ source 'https://rubygems.org'
3
3
  gem 'rails', '~> 3.2.14'
4
4
  gem 'test-unit'
5
5
 
6
+ gem "rack-cache", "~> 1.9.0"
7
+
6
8
  gemspec :path => '../'
@@ -13,5 +13,11 @@ end
13
13
  if ruby_version < Gem::Version.new("2.1.0")
14
14
  gem 'nokogiri', '~> 1.6.0'
15
15
  end
16
+ if ruby_version < Gem::Version.new("2.5.0")
17
+ gem 'sprockets', '~> 3.7.2'
18
+ end
19
+
20
+ gem "minitest", "5.12.0"
21
+ gem "connection_pool", "2.2.3"
16
22
 
17
23
  gemspec :path => '../'
@@ -4,7 +4,3 @@ gem 'resque', "~> 2.0"
4
4
  gem 'sinatra'
5
5
 
6
6
  gemspec :path => '../'
7
-
8
- if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.1.0")
9
- gem 'nokogiri', '~> 1.6.0'
10
- end
@@ -6,6 +6,5 @@ if RUBY_PLATFORM == "java"
6
6
  else
7
7
  gem 'sqlite3'
8
8
  end
9
- gem 'rack', '~> 1.6'
10
9
 
11
10
  gemspec :path => '../'
@@ -6,6 +6,5 @@ if RUBY_PLATFORM == "java"
6
6
  else
7
7
  gem 'sqlite3'
8
8
  end
9
- gem 'rack', '~> 1.6'
10
9
 
11
10
  gemspec :path => '../'
@@ -1,6 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'sinatra'
4
- gem 'rack', '~> 1.6'
5
4
 
6
5
  gemspec :path => '../'
@@ -81,7 +81,6 @@ module Appsignal
81
81
  ENV_STRING_KEYS = %w[
82
82
  APPSIGNAL_APP_NAME
83
83
  APPSIGNAL_CA_FILE_PATH
84
- APPSIGNAL_DNS_SERVERS
85
84
  APPSIGNAL_HOSTNAME
86
85
  APPSIGNAL_HTTP_PROXY
87
86
  APPSIGNAL_LOG
@@ -112,6 +111,7 @@ module Appsignal
112
111
  ].freeze
113
112
  # @api private
114
113
  ENV_ARRAY_KEYS = %w[
114
+ APPSIGNAL_DNS_SERVERS
115
115
  APPSIGNAL_FILTER_PARAMETERS
116
116
  APPSIGNAL_FILTER_SESSION_DATA
117
117
  APPSIGNAL_IGNORE_ACTIONS
@@ -40,6 +40,16 @@ module Appsignal
40
40
  def method_missing(m, *args, &block)
41
41
  super if Appsignal.testing?
42
42
  end
43
+
44
+ unless Appsignal.extension_loaded?
45
+ def data_map_new
46
+ Appsignal::Extension::MockData.new
47
+ end
48
+
49
+ def data_array_new
50
+ Appsignal::Extension::MockData.new
51
+ end
52
+ end
43
53
  end
44
54
 
45
55
  if Appsignal::System.jruby?
@@ -62,5 +72,45 @@ module Appsignal
62
72
  "#<#{self.class.name}:#{object_id} #{self}>"
63
73
  end
64
74
  end
75
+
76
+ # Mock of the {Data} class. This mock is used when the extension cannot be
77
+ # loaded. This mock listens to all method calls and does nothing, and
78
+ # prevents NoMethodErrors from being raised.
79
+ #
80
+ # Disabled in testing so we can make sure that we don't miss an extension
81
+ # function implementation.
82
+ #
83
+ # This class inherits from the {Data} class so that it passes type checks.
84
+ class MockData < Data
85
+ def initialize(*_args)
86
+ # JRuby extension requirement, as it sends a pointer to the Data object
87
+ # when creating it
88
+ end
89
+
90
+ def method_missing(_method, *_args, &_block)
91
+ super if Appsignal.testing?
92
+ end
93
+
94
+ def to_s
95
+ "{}"
96
+ end
97
+ end
98
+
99
+ # Mock of the {Transaction} class. This mock is used when the extension
100
+ # cannot be loaded. This mock listens to all method calls and does nothing,
101
+ # and prevents NoMethodErrors from being raised.
102
+ #
103
+ # Disabled in testing so we can make sure that we don't miss an extension
104
+ # function implementation.
105
+ class MockTransaction
106
+ def initialize(*_args)
107
+ # JRuby extension requirement, as it sends a pointer to the Transaction
108
+ # object when creating it
109
+ end
110
+
111
+ def method_missing(_method, *_args, &_block)
112
+ super if Appsignal.testing?
113
+ end
114
+ end
65
115
  end
66
116
  end