appsignal 2.9.2 → 2.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -2
- data/.travis.yml +3 -9
- data/CHANGELOG.md +3 -0
- data/README.md +4 -3
- data/Rakefile +117 -121
- data/build_matrix.yml +2 -2
- data/gemfiles/capistrano2.gemfile +5 -0
- data/gemfiles/capistrano3.gemfile +5 -0
- data/gemfiles/grape.gemfile +5 -0
- data/gemfiles/no_dependencies.gemfile +5 -0
- data/gemfiles/padrino.gemfile +5 -0
- data/gemfiles/que.gemfile +5 -0
- data/gemfiles/rails-3.2.gemfile +5 -0
- data/gemfiles/rails-4.0.gemfile +5 -0
- data/gemfiles/rails-4.1.gemfile +5 -0
- data/gemfiles/rails-4.2.gemfile +5 -0
- data/gemfiles/resque.gemfile +5 -0
- data/lib/appsignal.rb +1 -4
- data/lib/appsignal/minutely.rb +0 -13
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/minutely_spec.rb +0 -22
- data/spec/lib/appsignal_spec.rb +0 -6
- 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: 6cbf46d2a7bd292e3c89d86b60311f2d7b7a3491587ebb153e3b63f714ac7607
|
4
|
+
data.tar.gz: a275a7afcfc8262f40e44fdb6debe2fc38ac39291ac549eef0191efaa6c56d1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb9960971a71535f595337b8de51ea1eeaecf5d87bc41ea89e34c1fc09a9325740e49455d6a40e9dc9a10f9e102c256c9aec0f05dbaa52a5df0a5e6782b6119e
|
7
|
+
data.tar.gz: 5336b9e8304e1aebfb9ee83da44c5f910a74095e6a2365aaa3363e4ce9233b6dbfbaec098fca9f94567aba8a800444744ec2a4c154b053eb7f59d59128eb762a
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# DO NOT EDIT
|
2
|
-
# This is a generated file by the `rake travis:generate` task.
|
2
|
+
# This is a generated file by the `rake build_matrix:travis:generate` task.
|
3
3
|
# See `build_matrix.yml` for the build matrix.
|
4
|
-
# Generate this file with `rake travis:generate`.
|
4
|
+
# Generate this file with `rake build_matrix:travis:generate`.
|
5
5
|
---
|
6
6
|
sudo: false
|
7
7
|
branches:
|
@@ -33,7 +33,7 @@ matrix:
|
|
33
33
|
gemfile: gemfiles/no_dependencies.gemfile
|
34
34
|
before_script: ''
|
35
35
|
script:
|
36
|
-
- "./support/bundler_wrapper exec rake travis:validate"
|
36
|
+
- "./support/bundler_wrapper exec rake build_matrix:travis:validate"
|
37
37
|
- "./support/bundler_wrapper exec rubocop"
|
38
38
|
- rvm: 2.0.0
|
39
39
|
gemfile: gemfiles/no_dependencies.gemfile
|
@@ -89,9 +89,6 @@ matrix:
|
|
89
89
|
- rvm: 2.5.3
|
90
90
|
gemfile: gemfiles/no_dependencies.gemfile
|
91
91
|
env: _RUBYGEMS_VERSION=latest _BUNDLER_VERSION=latest
|
92
|
-
- rvm: 2.5.3
|
93
|
-
gemfile: gemfiles/rails-4.2.gemfile
|
94
|
-
env: _RUBYGEMS_VERSION=latest _BUNDLER_VERSION=1.17.3
|
95
92
|
- rvm: 2.5.3
|
96
93
|
gemfile: gemfiles/rails-5.2.gemfile
|
97
94
|
env: _RUBYGEMS_VERSION=latest _BUNDLER_VERSION=latest
|
@@ -143,9 +140,6 @@ matrix:
|
|
143
140
|
- rvm: jruby-19mode
|
144
141
|
gemfile: gemfiles/no_dependencies.gemfile
|
145
142
|
env: _RUBYGEMS_VERSION=latest _BUNDLER_VERSION=latest
|
146
|
-
- rvm: jruby-19mode
|
147
|
-
gemfile: gemfiles/rails-4.2.gemfile
|
148
|
-
env: _RUBYGEMS_VERSION=latest _BUNDLER_VERSION=1.17.3
|
149
143
|
- rvm: jruby-19mode
|
150
144
|
gemfile: gemfiles/rails-5.2.gemfile
|
151
145
|
env: _RUBYGEMS_VERSION=latest _BUNDLER_VERSION=latest
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -230,9 +230,9 @@ BUNDLE_GEMFILE=gemfiles/sinatra.gemfile bundle exec rspec
|
|
230
230
|
BUNDLE_GEMFILE=gemfiles/webmachine.gemfile bundle exec rspec
|
231
231
|
```
|
232
232
|
|
233
|
-
If you have either [RVM][rvm]
|
234
|
-
`rake
|
235
|
-
all Ruby versions and gem combinations we support.
|
233
|
+
If you have either [RVM][rvm], [rbenv][rbenv] or [chruby][chruby] installed you
|
234
|
+
can also use `rake build_matrix:local:generate` to generate a script that runs
|
235
|
+
specs for all Ruby versions and gem combinations we support.
|
236
236
|
|
237
237
|
We run the suite against all of the Gemfiles mentioned above and on
|
238
238
|
a number of different Ruby versions.
|
@@ -286,3 +286,4 @@ the most out of using AppSignal.
|
|
286
286
|
[semver]: http://semver.org/
|
287
287
|
[rvm]: http://rvm.io/
|
288
288
|
[rbenv]: https://github.com/rbenv/rbenv
|
289
|
+
[chruby]: https://github.com/postmodern/chruby/
|
data/Rakefile
CHANGED
@@ -2,100 +2,134 @@ require "bundler"
|
|
2
2
|
require "rubygems/package_task"
|
3
3
|
require "fileutils"
|
4
4
|
|
5
|
-
GEMFILES = %w[
|
6
|
-
capistrano2
|
7
|
-
capistrano3
|
8
|
-
grape
|
9
|
-
no_dependencies
|
10
|
-
padrino
|
11
|
-
rails-3.2
|
12
|
-
rails-4.0
|
13
|
-
rails-4.1
|
14
|
-
rails-4.2
|
15
|
-
rails-5.0
|
16
|
-
resque
|
17
|
-
sequel
|
18
|
-
sequel-435
|
19
|
-
sinatra
|
20
|
-
grape
|
21
|
-
webmachine
|
22
|
-
que
|
23
|
-
].freeze
|
24
|
-
|
25
|
-
RUBY_VERSIONS = %w[
|
26
|
-
2.0.0-p648
|
27
|
-
2.1.8
|
28
|
-
2.2.4
|
29
|
-
2.3.0
|
30
|
-
2.4.0
|
31
|
-
].freeze
|
32
|
-
|
33
|
-
EXCLUSIONS = {
|
34
|
-
"rails-5.0" => %w[2.0.0 2.1.8]
|
35
|
-
}.freeze
|
36
|
-
|
37
5
|
VERSION_MANAGERS = {
|
38
|
-
:
|
39
|
-
|
6
|
+
:chruby => {
|
7
|
+
:env => "#!/bin/bash\nsource /usr/local/opt/chruby/share/chruby/chruby.sh",
|
8
|
+
:switch_command => ->(version) { "chruby #{version}" }
|
9
|
+
},
|
10
|
+
:rbenv => {
|
11
|
+
:env => "#!/bin/bash",
|
12
|
+
:switch_command => ->(version) { "rbenv local #{version}" }
|
13
|
+
},
|
14
|
+
:rvm => {
|
15
|
+
:env => "#!/bin/bash --login",
|
16
|
+
:switch_command => ->(version) { "rvm use --default #{version}" }
|
17
|
+
}
|
40
18
|
}.freeze
|
41
19
|
|
42
|
-
namespace :
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
20
|
+
namespace :build_matrix do
|
21
|
+
namespace :travis do
|
22
|
+
task :generate do
|
23
|
+
yaml = YAML.load_file("build_matrix.yml")
|
24
|
+
matrix = yaml["matrix"]
|
25
|
+
defaults = matrix["defaults"]
|
26
|
+
|
27
|
+
builds = []
|
28
|
+
matrix["ruby"].each do |ruby|
|
29
|
+
ruby_version = ruby["ruby"]
|
30
|
+
gemset_for_ruby(ruby, matrix).each do |gem|
|
31
|
+
next if excluded_for_ruby?(gem, ruby)
|
32
|
+
|
33
|
+
env = ""
|
34
|
+
rubygems = gem["rubygems"] || ruby["rubygems"] || defaults["rubygems"]
|
35
|
+
env = "_RUBYGEMS_VERSION=#{rubygems}" if rubygems
|
36
|
+
bundler = gem["bundler"] || ruby["bundler"] || defaults["bundler"]
|
37
|
+
env += " _BUNDLER_VERSION=#{bundler}" if bundler
|
38
|
+
|
39
|
+
builds << {
|
40
|
+
"rvm" => ruby_version,
|
41
|
+
"gemfile" => "gemfiles/#{gem["gem"]}.gemfile",
|
42
|
+
"env" => env
|
43
|
+
}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
travis = yaml["travis"]
|
47
|
+
travis["matrix"]["include"] = travis["matrix"]["include"] + builds
|
48
|
+
|
49
|
+
header = "# DO NOT EDIT\n" \
|
50
|
+
"# This is a generated file by the `rake build_matrix:travis:generate` task.\n" \
|
51
|
+
"# See `build_matrix.yml` for the build matrix.\n" \
|
52
|
+
"# Generate this file with `rake build_matrix:travis:generate`.\n"
|
53
|
+
generated_yaml = header + YAML.dump(travis)
|
54
|
+
File.write(".travis.yml", generated_yaml)
|
55
|
+
puts "Generated `.travis.yml`"
|
56
|
+
puts "Build count: #{builds.length}"
|
57
|
+
end
|
58
|
+
|
59
|
+
task :validate => :generate do
|
60
|
+
`git status | grep .travis.yml 2>&1`
|
61
|
+
if $?.exitstatus.zero? # rubocop:disable Style/SpecialGlobalVars
|
62
|
+
puts "The `.travis.yml` is modified. The changes were not committed."
|
63
|
+
puts "Please run `rake build_matrix:travis:generate` and commit the changes."
|
64
|
+
exit 1
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
namespace :local do
|
70
|
+
task :generate do
|
71
|
+
yaml = YAML.load_file("build_matrix.yml")
|
72
|
+
matrix = yaml["matrix"]
|
73
|
+
defaults = matrix["defaults"]
|
74
|
+
|
75
|
+
VERSION_MANAGERS.each do |version_manager, config|
|
76
|
+
out = []
|
77
|
+
out << config[:env]
|
78
|
+
out << "rm -f .ruby-version"
|
79
|
+
out << "echo 'Using #{version_manager}'"
|
80
|
+
matrix["ruby"].each do |ruby|
|
81
|
+
ruby_version = ruby["ruby"]
|
82
|
+
out << "echo 'Switching to #{ruby_version}'"
|
83
|
+
out << "#{config[:switch_command].call(ruby_version)} || { echo 'Switching Ruby failed'; exit 1; }"
|
84
|
+
out << "ruby -v"
|
85
|
+
out << "echo 'Compiling extension'"
|
86
|
+
out << "./support/bundler_wrapper exec rake extension:install"
|
87
|
+
out << "rm -f gemfiles/*.gemfile.lock"
|
88
|
+
gemset_for_ruby(ruby, matrix).each do |gem|
|
89
|
+
next if excluded_for_ruby?(gem, ruby)
|
90
|
+
gemfile = gem["gem"]
|
91
|
+
out << "echo 'Bundling #{gemfile} in #{ruby_version}'"
|
92
|
+
rubygems = gem["rubygems"] || ruby["rubygems"] || defaults["rubygems"]
|
93
|
+
rubygems_version = "env _RUBYGEMS_VERSION=#{rubygems_version}" if rubygems
|
94
|
+
bundler = gem["bundler"] || ruby["bundler"] || defaults["bundler"]
|
95
|
+
bundler_version = "env _BUNDLER_VERSION=#{bundler}" if bundler
|
96
|
+
gemfile_env = "env BUNDLE_GEMFILE=gemfiles/#{gemfile}.gemfile"
|
97
|
+
out << "#{bundler_version} #{rubygems_version} ./support/install_deps"
|
98
|
+
out << "#{bundler_version} #{gemfile_env} ./support/bundler_wrapper install --quiet || { echo 'Bundling failed'; exit 1; }"
|
99
|
+
out << "echo 'Running #{gemfile} in #{ruby_version}'"
|
100
|
+
out << "#{bundler_version} #{gemfile_env} ./support/bundler_wrapper exec rspec || { echo 'Running specs failed'; exit 1; }"
|
101
|
+
end
|
102
|
+
out << ""
|
103
|
+
end
|
104
|
+
out << "rm -f .ruby-version"
|
105
|
+
out << "echo 'Successfully ran specs for all environments'"
|
48
106
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
if ruby["gems"]
|
54
|
-
# Only a specific gemset for this Ruby
|
55
|
-
selected_gems = matrix["gemsets"].fetch(ruby["gems"])
|
56
|
-
gems.select { |g| selected_gems.include?(g["gem"]) }
|
57
|
-
else
|
58
|
-
# All gems for this Ruby
|
59
|
-
gems
|
107
|
+
script = "bundle_and_spec_all_#{version_manager}"
|
108
|
+
FileUtils.rm_f(script)
|
109
|
+
File.open(script, "w") do |file|
|
110
|
+
file.write out.join("\n")
|
60
111
|
end
|
61
|
-
|
62
|
-
|
63
|
-
next if (gem.dig("exclude", "ruby") || []).include?(ruby_version)
|
64
|
-
|
65
|
-
env = ""
|
66
|
-
rubygems = gem["rubygems"] || ruby["rubygems"] || defaults["rubygems"]
|
67
|
-
env = "_RUBYGEMS_VERSION=#{rubygems}" if rubygems
|
68
|
-
bundler = gem["bundler"] || ruby["bundler"] || defaults["bundler"]
|
69
|
-
env += " _BUNDLER_VERSION=#{bundler}" if bundler
|
70
|
-
|
71
|
-
builds << {
|
72
|
-
"rvm" => ruby_version,
|
73
|
-
"gemfile" => "gemfiles/#{gem["gem"]}.gemfile",
|
74
|
-
"env" => env
|
75
|
-
}
|
112
|
+
File.chmod(0o775, script)
|
113
|
+
puts "Generated #{script}"
|
76
114
|
end
|
77
115
|
end
|
78
|
-
travis = yaml["travis"]
|
79
|
-
travis["matrix"]["include"] = travis["matrix"]["include"] + builds
|
80
|
-
|
81
|
-
header = "# DO NOT EDIT\n" \
|
82
|
-
"# This is a generated file by the `rake travis:generate` task.\n" \
|
83
|
-
"# See `build_matrix.yml` for the build matrix.\n" \
|
84
|
-
"# Generate this file with `rake travis:generate`.\n"
|
85
|
-
generated_yaml = header + YAML.dump(travis)
|
86
|
-
File.write(".travis.yml", generated_yaml)
|
87
|
-
puts "Generated `.travis.yml`"
|
88
|
-
puts "Build count: #{builds.length}"
|
89
116
|
end
|
90
117
|
|
91
|
-
|
92
|
-
|
93
|
-
if
|
94
|
-
|
95
|
-
|
96
|
-
|
118
|
+
def gemset_for_ruby(ruby, matrix)
|
119
|
+
gems = matrix["gems"]
|
120
|
+
if ruby["gems"]
|
121
|
+
# Only a specific gemset for this Ruby
|
122
|
+
selected_gems = matrix["gemsets"].fetch(ruby["gems"])
|
123
|
+
gems.select { |g| selected_gems.include?(g["gem"]) }
|
124
|
+
else
|
125
|
+
# All gems for this Ruby
|
126
|
+
gems
|
97
127
|
end
|
98
128
|
end
|
129
|
+
|
130
|
+
def excluded_for_ruby?(gem, ruby)
|
131
|
+
(gem.dig("exclude", "ruby") || []).include?(ruby["ruby"])
|
132
|
+
end
|
99
133
|
end
|
100
134
|
|
101
135
|
namespace :build do
|
@@ -234,44 +268,6 @@ task :spec_all_gemfiles do
|
|
234
268
|
end
|
235
269
|
end
|
236
270
|
|
237
|
-
task :generate_bundle_and_spec_all do
|
238
|
-
VERSION_MANAGERS.each do |version_manager, switch_command|
|
239
|
-
out = []
|
240
|
-
out << if version_manager == :rvm
|
241
|
-
"#!/bin/bash --login"
|
242
|
-
else
|
243
|
-
"#!/bin/sh"
|
244
|
-
end
|
245
|
-
out << "rm -f .ruby-version"
|
246
|
-
out << "echo 'Using #{version_manager}'"
|
247
|
-
RUBY_VERSIONS.each do |version|
|
248
|
-
short_version = version.split("-").first
|
249
|
-
out << "echo 'Switching to #{short_version}'"
|
250
|
-
out << "#{switch_command.call(version)} || { echo 'Switching Ruby failed'; exit 1; }"
|
251
|
-
out << "ruby -v"
|
252
|
-
out << "echo 'Compiling extension'"
|
253
|
-
out << "cd ext && rm -f appsignal-agent appsignal_extension.bundle appsignal.h libappsignal.a Makefile && ruby extconf.rb && make && cd .."
|
254
|
-
GEMFILES.each do |gemfile|
|
255
|
-
next if EXCLUSIONS[gemfile] && EXCLUSIONS[gemfile].include?(short_version)
|
256
|
-
out << "echo 'Bundling #{gemfile} in #{short_version}'"
|
257
|
-
out << "bundle --quiet --gemfile gemfiles/#{gemfile}.gemfile || { echo 'Bundling failed'; exit 1; }"
|
258
|
-
out << "echo 'Running #{gemfile} in #{short_version}'"
|
259
|
-
out << "env BUNDLE_GEMFILE=gemfiles/#{gemfile}.gemfile bundle exec rspec || { echo 'Running specs failed'; exit 1; }"
|
260
|
-
end
|
261
|
-
end
|
262
|
-
out << "rm -f .ruby-version"
|
263
|
-
out << "echo 'Successfully ran specs for all environments'"
|
264
|
-
|
265
|
-
script = "bundle_and_spec_all_#{version_manager}"
|
266
|
-
FileUtils.rm_f(script)
|
267
|
-
File.open(script, "w") do |file|
|
268
|
-
file.write out.join("\n")
|
269
|
-
end
|
270
|
-
File.chmod(0o775, script)
|
271
|
-
puts "Generated #{script}"
|
272
|
-
end
|
273
|
-
end
|
274
|
-
|
275
271
|
task :console do
|
276
272
|
require "irb"
|
277
273
|
require "irb/completion"
|
data/build_matrix.yml
CHANGED
@@ -34,7 +34,7 @@ travis: # Default `.travis.yml` contents
|
|
34
34
|
gemfile: "gemfiles/no_dependencies.gemfile"
|
35
35
|
before_script: "" # Unset default: No need to install the extension
|
36
36
|
script:
|
37
|
-
- "./support/bundler_wrapper exec rake travis:validate"
|
37
|
+
- "./support/bundler_wrapper exec rake build_matrix:travis:validate"
|
38
38
|
- "./support/bundler_wrapper exec rubocop"
|
39
39
|
|
40
40
|
matrix:
|
@@ -47,8 +47,8 @@ matrix:
|
|
47
47
|
- "no_dependencies"
|
48
48
|
minimal:
|
49
49
|
- "no_dependencies"
|
50
|
-
- "rails-4.2"
|
51
50
|
- "rails-5.2"
|
51
|
+
- "rails-6.2"
|
52
52
|
|
53
53
|
ruby:
|
54
54
|
- ruby: "2.0.0"
|
@@ -3,5 +3,10 @@ source 'https://rubygems.org'
|
|
3
3
|
gem 'capistrano', '< 3.0'
|
4
4
|
gem 'net-ssh', '2.9.2'
|
5
5
|
gem 'rack', '~> 1.6'
|
6
|
+
if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("2.1.0")
|
7
|
+
gem 'public_suffix', "~> 2.0.0"
|
8
|
+
else
|
9
|
+
gem 'public_suffix'
|
10
|
+
end
|
6
11
|
|
7
12
|
gemspec :path => '../'
|
@@ -4,5 +4,10 @@ gem 'capistrano', '~> 3.0'
|
|
4
4
|
gem 'i18n', '~> 1.2.0'
|
5
5
|
gem 'net-ssh', '2.9.2'
|
6
6
|
gem 'rack', '~> 1.6'
|
7
|
+
if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("2.1.0")
|
8
|
+
gem 'public_suffix', "~> 2.0.0"
|
9
|
+
else
|
10
|
+
gem 'public_suffix'
|
11
|
+
end
|
7
12
|
|
8
13
|
gemspec :path => '../'
|
data/gemfiles/grape.gemfile
CHANGED
@@ -3,5 +3,10 @@ source 'https://rubygems.org'
|
|
3
3
|
gem 'grape', '0.14.0'
|
4
4
|
gem 'rack', '~> 1.6'
|
5
5
|
gem 'activesupport', '~> 4.2'
|
6
|
+
if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("2.1.0")
|
7
|
+
gem 'public_suffix', "~> 2.0.0"
|
8
|
+
else
|
9
|
+
gem 'public_suffix'
|
10
|
+
end
|
6
11
|
|
7
12
|
gemspec :path => '../'
|
data/gemfiles/padrino.gemfile
CHANGED
@@ -3,5 +3,10 @@ source 'https://rubygems.org'
|
|
3
3
|
gem 'padrino', '~> 0.13.0'
|
4
4
|
gem 'rack', '~> 1.6'
|
5
5
|
gem 'activesupport', '~> 4.2'
|
6
|
+
if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("2.1.0")
|
7
|
+
gem 'public_suffix', "~> 2.0.0"
|
8
|
+
else
|
9
|
+
gem 'public_suffix'
|
10
|
+
end
|
6
11
|
|
7
12
|
gemspec :path => '../'
|
data/gemfiles/que.gemfile
CHANGED
data/gemfiles/rails-3.2.gemfile
CHANGED
data/gemfiles/rails-4.0.gemfile
CHANGED
data/gemfiles/rails-4.1.gemfile
CHANGED
data/gemfiles/rails-4.2.gemfile
CHANGED
data/gemfiles/resque.gemfile
CHANGED
@@ -10,3 +10,8 @@ gemspec :path => '../'
|
|
10
10
|
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.1.0")
|
11
11
|
gem 'nokogiri', '~> 1.6.0'
|
12
12
|
end
|
13
|
+
if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("2.1.0")
|
14
|
+
gem 'public_suffix', "~> 2.0.0"
|
15
|
+
else
|
16
|
+
gem 'public_suffix'
|
17
|
+
end
|
data/lib/appsignal.rb
CHANGED
@@ -135,10 +135,7 @@ module Appsignal
|
|
135
135
|
Appsignal::Extension.install_allocation_event_hook
|
136
136
|
end
|
137
137
|
|
138
|
-
if config[:enable_gc_instrumentation]
|
139
|
-
GC::Profiler.enable
|
140
|
-
Appsignal::Minutely.register_garbage_collection_probe
|
141
|
-
end
|
138
|
+
GC::Profiler.enable if config[:enable_gc_instrumentation]
|
142
139
|
|
143
140
|
Appsignal::Minutely.start if config[:enable_minutely_probes]
|
144
141
|
else
|
data/lib/appsignal/minutely.rb
CHANGED
@@ -164,11 +164,6 @@ module Appsignal
|
|
164
164
|
60 - Time.now.sec
|
165
165
|
end
|
166
166
|
|
167
|
-
# @api private
|
168
|
-
def register_garbage_collection_probe
|
169
|
-
probes.register :garbage_collection, GCProbe.new
|
170
|
-
end
|
171
|
-
|
172
167
|
private
|
173
168
|
|
174
169
|
def initialize_probes
|
@@ -182,13 +177,5 @@ module Appsignal
|
|
182
177
|
@@probe_instances ||= {}
|
183
178
|
end
|
184
179
|
end
|
185
|
-
|
186
|
-
class GCProbe
|
187
|
-
def call
|
188
|
-
GC.stat.each do |key, value|
|
189
|
-
Appsignal.set_process_gauge("gc.#{key}", value)
|
190
|
-
end
|
191
|
-
end
|
192
|
-
end
|
193
180
|
end
|
194
181
|
end
|
data/lib/appsignal/version.rb
CHANGED
@@ -169,18 +169,6 @@ describe Appsignal::Minutely do
|
|
169
169
|
end
|
170
170
|
end
|
171
171
|
|
172
|
-
describe ".register_garbage_collection_probe" do
|
173
|
-
it "adds the GC probe to the probes list" do
|
174
|
-
expect(Appsignal::Minutely.probes.count).to eql(0)
|
175
|
-
|
176
|
-
Appsignal::Minutely.register_garbage_collection_probe
|
177
|
-
|
178
|
-
expect(Appsignal::Minutely.probes.count).to eql(1)
|
179
|
-
expect(Appsignal::Minutely.probes[:garbage_collection])
|
180
|
-
.to be_instance_of(Appsignal::Minutely::GCProbe)
|
181
|
-
end
|
182
|
-
end
|
183
|
-
|
184
172
|
describe Appsignal::Minutely::ProbeCollection do
|
185
173
|
let(:collection) { described_class.new }
|
186
174
|
|
@@ -267,14 +255,4 @@ describe Appsignal::Minutely do
|
|
267
255
|
end
|
268
256
|
end
|
269
257
|
end
|
270
|
-
|
271
|
-
describe Appsignal::Minutely::GCProbe do
|
272
|
-
describe "#call" do
|
273
|
-
it "collects GC metrics" do
|
274
|
-
expect(Appsignal).to receive(:set_process_gauge).at_least(8).times
|
275
|
-
|
276
|
-
Appsignal::Minutely::GCProbe.new.call
|
277
|
-
end
|
278
|
-
end
|
279
|
-
end
|
280
258
|
end
|
data/spec/lib/appsignal_spec.rb
CHANGED
@@ -94,12 +94,6 @@ describe Appsignal do
|
|
94
94
|
Appsignal.start
|
95
95
|
end
|
96
96
|
end
|
97
|
-
|
98
|
-
it "should add the gc probe to minutely" do
|
99
|
-
expect(Appsignal::Minutely).to receive(:register_garbage_collection_probe)
|
100
|
-
.and_call_original
|
101
|
-
Appsignal.start
|
102
|
-
end
|
103
97
|
end
|
104
98
|
|
105
99
|
context "when allocation tracking and gc instrumentation have been disabled" do
|
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: 2.9.
|
4
|
+
version: 2.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-03-
|
12
|
+
date: 2019-03-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
@@ -379,7 +379,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
379
379
|
- !ruby/object:Gem::Version
|
380
380
|
version: '0'
|
381
381
|
requirements: []
|
382
|
-
rubygems_version: 3.0.
|
382
|
+
rubygems_version: 3.0.2
|
383
383
|
signing_key:
|
384
384
|
specification_version: 4
|
385
385
|
summary: Logs performance and exception data from your app to appsignal.com
|