scout_apm 2.4.19 → 2.4.20

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d38cfea3836f29b9e730a02bf557962026bb9ac
4
- data.tar.gz: 9e27ad539198445863b7bd617852d0ca4a6550a1
3
+ metadata.gz: 3410254ae73b93df713b64fd10fc4e913e9ac8be
4
+ data.tar.gz: aa5bcf808cc4a7190d8d6597f1b1ae92fc0a77a3
5
5
  SHA512:
6
- metadata.gz: 7f659866301061871d82cf314df34b735a07d0cfad4e58d2a9cced65dac466b32e9ce8079b8f7d254be4a68192eaf1f4ca830147997417be3d6768924ec94a5d
7
- data.tar.gz: 738cecce8b1d3e32e6043244c9c2573dda6813c6fc106402e9d83dd00e19807c46fa085f596b6bbc2d5fbb7090e4acdd525bb0a6f69766474ea276fc9000c959
6
+ metadata.gz: d2144aa3b55a6ff69d22cdae53a88fb4eeb8d56040606ddf9cb4421cc6b802d7604004d04bcdd64242460c8c37174e730d118c632cf37a1965e4bf0a862b7a67
7
+ data.tar.gz: 2f79898f6ab830d10c8f6c783e987e47d2a8caa80d5e8b3ae98336372b4cec6abf8a1a9a70b2ac16800ce530ce04b318e3db783f1481fe5439c2a03e69e77584
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,9 @@
1
+ # 2.4.20
2
+
3
+ * `start_resque_server_instrument` option to allow disabling the WEBrick server
4
+ component in custom installation scenarios
5
+ * Allow setting `revision_sha` setting in YAML
6
+
1
7
  # 2.4.19
2
8
 
3
9
  * Fix disabled_instruments (#220)
@@ -26,8 +26,12 @@ module ScoutApm
26
26
  def install_before_fork
27
27
  ::Resque.before_first_fork do
28
28
  begin
29
- ScoutApm::Agent.instance.start
30
- ScoutApm::Agent.instance.context.start_remote_server!(bind, port)
29
+ if ScoutApm::Agent.instance.context.config.value('start_resque_server_instrument')
30
+ ScoutApm::Agent.instance.start
31
+ ScoutApm::Agent.instance.context.start_remote_server!(bind, port)
32
+ else
33
+ logger.info("Not starting remote server due to 'start_resque_server_instrument' setting")
34
+ end
31
35
  rescue Errno::EADDRINUSE
32
36
  ScoutApm::Agent.instance.context.logger.warn "Error while Installing Resque Instruments, Port #{port} already in use. Set via the `remote_agent_port` configuration option"
33
37
  rescue => e
@@ -30,6 +30,7 @@ require 'scout_apm/environment'
30
30
  # uri_reporting - 'path' or 'full_path' default is 'full_path', which reports URL params as well as the path.
31
31
  # remote_agent_host - Internal: What host to bind to, and also send messages to for remote. Default: 127.0.0.1.
32
32
  # remote_agent_port - What port to bind the remote webserver to
33
+ # start_resque_server_instrument - Used in special situations with certain Resque installs
33
34
  #
34
35
  # Any of these config settings can be set with an environment variable prefixed
35
36
  # by SCOUT_ and uppercasing the key: SCOUT_LOG_LEVEL for instance.
@@ -66,7 +67,9 @@ module ScoutApm
66
67
  'remote_agent_host',
67
68
  'remote_agent_port',
68
69
  'report_format',
70
+ 'revision_sha',
69
71
  'scm_subdirectory',
72
+ 'start_resque_server_instrument',
70
73
  'uri_reporting',
71
74
  'instrument_http_url_length',
72
75
  ]
@@ -158,6 +161,7 @@ module ScoutApm
158
161
  'database_metric_limit' => IntegerCoercion.new,
159
162
  'database_metric_report_limit' => IntegerCoercion.new,
160
163
  'instrument_http_url_length' => IntegerCoercion.new,
164
+ 'start_resque_server_instrument' => BooleanCoercion.new,
161
165
  }
162
166
 
163
167
 
@@ -263,6 +267,7 @@ module ScoutApm
263
267
  'database_metric_limit' => 5000, # The hard limit on db metrics
264
268
  'database_metric_report_limit' => 1000,
265
269
  'instrument_http_url_length' => 300,
270
+ 'start_resque_server_instrument' => true, # still only starts if Resque is detected
266
271
  }.freeze
267
272
 
268
273
  def value(key)
@@ -15,7 +15,8 @@ module ScoutApm
15
15
 
16
16
  def present?
17
17
  defined?(::Rails) &&
18
- defined?(ActionController) &&
18
+ defined?(::Rails::VERSION) &&
19
+ defined?(ActionController) &&
19
20
  Rails::VERSION::MAJOR < 3
20
21
  end
21
22
 
@@ -15,7 +15,8 @@ module ScoutApm
15
15
 
16
16
  def present?
17
17
  defined?(::Rails) &&
18
- defined?(ActionController) &&
18
+ defined?(::Rails::VERSION) &&
19
+ defined?(ActionController) &&
19
20
  Rails::VERSION::MAJOR >= 3
20
21
  end
21
22
 
@@ -17,7 +17,7 @@ module ScoutApm
17
17
  private
18
18
 
19
19
  def detect
20
- detect_from_env_var ||
20
+ detect_from_config ||
21
21
  detect_from_heroku ||
22
22
  detect_from_capistrano ||
23
23
  detect_from_git
@@ -27,8 +27,11 @@ module ScoutApm
27
27
  ENV['HEROKU_SLUG_COMMIT']
28
28
  end
29
29
 
30
- def detect_from_env_var
31
- ENV['SCOUT_REVISION_SHA']
30
+ # Config will locate the value from:
31
+ # ENV variable - SCOUT_REVISION_SHA
32
+ # YAML setting - revision_sha
33
+ def detect_from_config
34
+ context.config.value('revision_sha')
32
35
  end
33
36
 
34
37
  def detect_from_capistrano
@@ -1,4 +1,4 @@
1
1
  module ScoutApm
2
- VERSION = "2.4.19"
2
+ VERSION = "2.4.20"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.19
4
+ version: 2.4.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Haynes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-09-18 00:00:00.000000000 Z
12
+ date: 2018-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
@@ -392,7 +392,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
392
392
  version: '0'
393
393
  requirements: []
394
394
  rubyforge_project: scout_apm
395
- rubygems_version: 2.5.1
395
+ rubygems_version: 2.4.5.2
396
396
  signing_key:
397
397
  specification_version: 4
398
398
  summary: Ruby application performance monitoring