newrelic_rpm 3.14.3.313 → 3.15.0.314

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +20 -6
  3. data/CHANGELOG +31 -0
  4. data/README.md +1 -1
  5. data/lib/new_relic/agent/configuration/default_source.rb +31 -29
  6. data/lib/new_relic/agent/database/obfuscation_helpers.rb +1 -1
  7. data/lib/new_relic/agent/instrumentation/active_job.rb +7 -1
  8. data/lib/new_relic/agent/instrumentation/active_record_4.rb +1 -1
  9. data/lib/new_relic/agent/instrumentation/data_mapper.rb +1 -1
  10. data/lib/new_relic/agent/instrumentation/grape.rb +1 -1
  11. data/lib/new_relic/agent/instrumentation/memcache.rb +1 -1
  12. data/lib/new_relic/agent/instrumentation/rails5/action_controller.rb +29 -0
  13. data/lib/new_relic/agent/instrumentation/rails5/action_view.rb +25 -0
  14. data/lib/new_relic/agent/instrumentation/rails_middleware.rb +2 -2
  15. data/lib/new_relic/agent/supported_versions.rb +1 -0
  16. data/lib/new_relic/agent/system_info.rb +1 -1
  17. data/lib/new_relic/control/frameworks/rails5.rb +14 -0
  18. data/lib/new_relic/version.rb +2 -2
  19. data/lib/tasks/config.rake +15 -23
  20. data/lib/tasks/tests.rake +1 -1
  21. data/newrelic.yml +1 -1
  22. data/newrelic_rpm.gemspec +2 -2
  23. data/test/environments/lib/environments/runner.rb +10 -6
  24. data/test/environments/rails40/Gemfile +1 -1
  25. data/test/environments/rails40/config/database.yml +1 -1
  26. data/test/environments/rails41/Gemfile +1 -1
  27. data/test/environments/rails41/config/database.yml +1 -1
  28. data/test/environments/rails42/Gemfile +1 -1
  29. data/test/environments/rails42/config/database.yml +1 -1
  30. data/test/environments/rails50/Gemfile +36 -0
  31. data/test/environments/rails50/Rakefile +11 -0
  32. data/test/environments/rails50/config/application.rb +18 -0
  33. data/test/environments/rails50/config/boot.rb +10 -0
  34. data/test/environments/rails50/config/database.yml +26 -0
  35. data/test/environments/rails50/config/environment.rb +6 -0
  36. data/test/environments/rails50/db/schema.rb +5 -0
  37. data/test/fixtures/cross_agent_tests/sql_obfuscation/sql_obfuscation.json +55 -27
  38. data/test/multiverse/suites/active_record/Envfile +14 -2
  39. data/test/multiverse/suites/active_record/active_record_test.rb +1 -1
  40. data/test/multiverse/suites/active_record/config/database.yml +8 -5
  41. data/test/multiverse/suites/datamapper/datamapper_test.rb +2 -1
  42. data/test/multiverse/suites/grape/Envfile +1 -1
  43. data/test/multiverse/suites/rails/Envfile +8 -0
  44. data/test/multiverse/suites/rails/error_tracing_test.rb +13 -0
  45. data/test/new_relic/agent/system_info_test.rb +6 -0
  46. data/test/new_relic/agent/transaction_test.rb +14 -14
  47. data/test/new_relic/agent/utilization_data_test.rb +9 -0
  48. metadata +14 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0bda6a646d6112679fd28258a00acdbd96924b7
4
- data.tar.gz: 0425f49e3544124c46ad1c4a43c0e061510137f1
3
+ metadata.gz: 391d2537bee4bdb7f87f25c7d20d017876638851
4
+ data.tar.gz: 974e57e947784e5cba3caf6b802e5d62fd5d8cf3
5
5
  SHA512:
6
- metadata.gz: 0553dab5397468ae5e48fc4a983bfd5ac2b6000b42497ac0f7068f95bfd50865bb024cf5a32aa047f5675708ce51b925f77cce2511b61c1e2c52f9ea7e375c5f
7
- data.tar.gz: 2d0a942e509d2d5dd400dab3ba4c3b48e1154129e6b8041725a4fcb3978562e6f7a32579d3d1c4548b1eb1f9587e37f22b67ce752fb008e44487239f7a7e9b62
6
+ metadata.gz: 50197fcecbff1272846495f6ac2948f274d6c3cca935d34d26aa024c8606bff4b3fb47c59a54a915904a419e227e2a3ab9445d245200f6b2d38a25d8cb2208c0
7
+ data.tar.gz: 56a7a8be8c4e01941baf2dd8c03395debab36e5311ca4e92b4c704d73945a5176f1629a7937b08636de570cf9ef5c7cfcadb830232fb62f32b67b69aacec38cd
@@ -41,7 +41,7 @@ rvm:
41
41
  - jruby-1.7.23
42
42
  - jruby-9.0.4.0
43
43
  - 2.2.4
44
- - 2.1.7
44
+ - 2.1.8
45
45
  - 2.0.0-p648
46
46
  - 1.9.3
47
47
  - 1.9.2
@@ -54,7 +54,7 @@ env:
54
54
  - CI_BUNDLE_PATH=/home/travis/bundle
55
55
  - BUNDLE_PATH=/home/travis/bundle
56
56
  - MONGODB=2.6.11
57
- - JAVA_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
57
+ - JAVA_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xmx512m"
58
58
  - JRUBY_OPTS="-Xcompile.invokedynamic=false -J-Djruby.compile.mode=OFF"
59
59
  - RBXOPT="-Xcompiler.no_rbc -Xint"
60
60
  - SERIALIZE=1
@@ -70,6 +70,7 @@ env:
70
70
  - TYPE=UNIT ENVIRONMENT=rails40
71
71
  - TYPE=UNIT ENVIRONMENT=rails41
72
72
  - TYPE=UNIT ENVIRONMENT=rails42
73
+ - TYPE=UNIT ENVIRONMENT=rails50
73
74
  - TYPE=UNIT ENVIRONMENT=norails
74
75
  - TYPE=FUNCTIONAL GROUP=agent
75
76
  - TYPE=FUNCTIONAL GROUP=api
@@ -100,12 +101,14 @@ matrix:
100
101
  env: TYPE=UNIT ENVIRONMENT=rails23
101
102
 
102
103
  # 2.1
103
- - rvm: 2.1.7
104
+ - rvm: 2.1.8
104
105
  env: TYPE=UNIT ENVIRONMENT=rails21
105
- - rvm: 2.1.7
106
+ - rvm: 2.1.8
106
107
  env: TYPE=UNIT ENVIRONMENT=rails22
107
- - rvm: 2.1.7
108
+ - rvm: 2.1.8
108
109
  env: TYPE=UNIT ENVIRONMENT=rails23
110
+ - rvm: 2.1.8
111
+ env: TYPE=UNIT ENVIRONMENT=rails50
109
112
 
110
113
  # 2.0
111
114
  - rvm: 2.0.0-p648
@@ -114,18 +117,24 @@ matrix:
114
117
  env: TYPE=UNIT ENVIRONMENT=rails22
115
118
  - rvm: 2.0.0-p648
116
119
  env: TYPE=UNIT ENVIRONMENT=rails23
120
+ - rvm: 2.0.0-p648
121
+ env: TYPE=UNIT ENVIRONMENT=rails50
117
122
 
118
123
  # 1.9.3
119
124
  - rvm: 1.9.3
120
125
  env: TYPE=UNIT ENVIRONMENT=rails21
121
126
  - rvm: 1.9.3
122
127
  env: TYPE=UNIT ENVIRONMENT=rails22
128
+ - rvm: 1.9.3
129
+ env: TYPE=UNIT ENVIRONMENT=rails50
123
130
 
124
131
  # 1.9.2
125
132
  - rvm: 1.9.2
126
133
  env: TYPE=UNIT ENVIRONMENT=rails21
127
134
  - rvm: 1.9.2
128
135
  env: TYPE=UNIT ENVIRONMENT=rails22
136
+ - rvm: 1.9.2
137
+ env: TYPE=UNIT ENVIRONMENT=rails50
129
138
 
130
139
  # REE
131
140
  - rvm: ree
@@ -134,6 +143,8 @@ matrix:
134
143
  env: TYPE=UNIT ENVIRONMENT=rails41
135
144
  - rvm: ree
136
145
  env: TYPE=UNIT ENVIRONMENT=rails42
146
+ - rvm: ree
147
+ env: TYPE=UNIT ENVIRONMENT=rails50
137
148
 
138
149
  # 1.8.7
139
150
  - rvm: 1.8.7
@@ -142,6 +153,8 @@ matrix:
142
153
  env: TYPE=UNIT ENVIRONMENT=rails41
143
154
  - rvm: 1.8.7
144
155
  env: TYPE=UNIT ENVIRONMENT=rails42
156
+ - rvm: 1.8.7
157
+ env: TYPE=UNIT ENVIRONMENT=rails50
145
158
 
146
159
  # jruby 1.7
147
160
  - rvm: jruby-1.7.23
@@ -150,6 +163,8 @@ matrix:
150
163
  env: TYPE=UNIT ENVIRONMENT=rails22
151
164
  - rvm: jruby-1.7.23
152
165
  env: TYPE=UNIT ENVIRONMENT=rails23
166
+ - rvm: jruby-1.7.23
167
+ env: TYPE=UNIT ENVIRONMENT=rails50
153
168
 
154
169
  # jruby 9.0
155
170
  - rvm: jruby-9.0.4.0
@@ -178,4 +193,3 @@ matrix:
178
193
  env: TYPE=UNIT ENVIRONMENT=rails31
179
194
  - rvm: rbx-2.5.8
180
195
  env: TYPE=UNIT ENVIRONMENT=rails32
181
-
data/CHANGELOG CHANGED
@@ -1,5 +1,36 @@
1
1
  # New Relic Ruby Agent Release Notes #
2
2
 
3
+ ## v3.15.0 ##
4
+
5
+ * Rails 5 support
6
+
7
+ This release includes experimental support for Rails 5 as of 5.0.0.beta2.
8
+ Please note that this release does not include any support for ActionCable,
9
+ the WebSockets framework new to Rails 5.
10
+
11
+ * Don't include extension from single format Grape API transaction names
12
+
13
+ Starting with Grape 0.12.0, an API with a single format no longer declares
14
+ methods with `.:format`, but with an extension such as `.json`. Thanks Daniel
15
+ Doubrovkine for the contribution!
16
+
17
+ * Fix warnings about shadowing outer local variable when running tests
18
+
19
+ Thanks Rafael Almeida de Carvalho for the contribution!
20
+
21
+ * Check config first for Rails middleware instrumentation installation
22
+
23
+ Checking the config first avoids issues with mock classes that don't implement
24
+ `VERSION`. Thanks Jesse Sanford for the contribution!
25
+
26
+ * Remove a trailing whitespace in the template for generated newrelic.yml
27
+
28
+ Thanks Paul Menzel for the contribution!
29
+
30
+ * Reference external resources in comments and readme with HTTPS
31
+
32
+ Thanks Benjamin Quorning for the contribution!
33
+
3
34
  ## v3.14.3 ##
4
35
 
5
36
  * Don't inadvertently send sensitive information from DataMapper SQLErrors
data/README.md CHANGED
@@ -5,7 +5,7 @@ New Relic, Inc (http://www.newrelic.com). It provides you with deep
5
5
  information about the performance of your Rails or Ruby
6
6
  application as it runs in production. The New Relic Ruby Agent is
7
7
  dual-purposed as a either a Gem or a Rails plugin, hosted on
8
- [github](http://github.com/newrelic/rpm/tree/master).
8
+ [github](https://github.com/newrelic/rpm/tree/master).
9
9
 
10
10
  The New Relic Ruby Agent runs in one of two modes:
11
11
 
@@ -89,6 +89,8 @@ module NewRelic
89
89
  :rails3
90
90
  when 4
91
91
  :rails4
92
+ when 5
93
+ :rails5
92
94
  else
93
95
  ::NewRelic::Agent.logger.error "Detected unsupported Rails version #{Rails::VERSION::STRING}"
94
96
  end
@@ -1413,118 +1415,118 @@ module NewRelic
1413
1415
  },
1414
1416
  :'attributes.enabled' => {
1415
1417
  :default => true,
1416
- :public => false,
1418
+ :public => true,
1417
1419
  :type => Boolean,
1418
1420
  :allowed_from_server => false,
1419
1421
  :description => 'If <code>true</code>, enables capture of attributes for all destinations.'
1420
1422
  },
1421
1423
  :'transaction_tracer.attributes.enabled' => {
1422
1424
  :default => value_of(:'transaction_tracer.capture_attributes'),
1423
- :public => false,
1425
+ :public => true,
1424
1426
  :type => Boolean,
1425
1427
  :allowed_from_server => false,
1426
- :description => 'Enable or disable capture of attributes for transaction traces.'
1428
+ :description => 'If <code>true</code>, the agent captures attributes from transaction traces.'
1427
1429
  },
1428
1430
  :'transaction_events.attributes.enabled' => {
1429
1431
  :default => value_of(:'analytics_events.capture_attributes'),
1430
- :public => false,
1432
+ :public => true,
1431
1433
  :type => Boolean,
1432
1434
  :allowed_from_server => false,
1433
- :description => 'Enable or disable capture of attributes for transaction events.'
1435
+ :description => 'If <code>true</code>, the agent captures attributes from transaction events.'
1434
1436
  },
1435
1437
  :'error_collector.attributes.enabled' => {
1436
1438
  :default => value_of(:'error_collector.capture_attributes'),
1437
- :public => false,
1439
+ :public => true,
1438
1440
  :type => Boolean,
1439
1441
  :allowed_from_server => false,
1440
- :description => 'Enable or disable capture of attributes for error collection.'
1442
+ :description => 'If <code>true</code>, the agent captures attributes from error collection.'
1441
1443
  },
1442
1444
  :'browser_monitoring.attributes.enabled' => {
1443
1445
  :default => value_of(:'browser_monitoring.capture_attributes'),
1444
- :public => false,
1446
+ :public => true,
1445
1447
  :type => Boolean,
1446
1448
  :allowed_from_server => false,
1447
- :description => 'Enable or disable capture of attributes for browser monitoring.'
1449
+ :description => 'If <code>true</code>, the agent captures attributes from browser monitoring.'
1448
1450
  },
1449
1451
  :'attributes.exclude' => {
1450
1452
  :default => [],
1451
- :public => false,
1453
+ :public => true,
1452
1454
  :type => Array,
1453
1455
  :allowed_from_server => false,
1454
1456
  :transform => DefaultSource.method(:convert_to_list),
1455
- :description => 'Prefix of attributes to exclude from all destinations. Allows * as wildcard at end.'
1457
+ :description => 'Prefix of attributes to exclude from all destinations. Allows <code>*</code> as wildcard at end.'
1456
1458
  },
1457
1459
  :'transaction_tracer.attributes.exclude' => {
1458
1460
  :default => [],
1459
- :public => false,
1461
+ :public => true,
1460
1462
  :type => Array,
1461
1463
  :allowed_from_server => false,
1462
1464
  :transform => DefaultSource.method(:convert_to_list),
1463
- :description => 'Prefix of attributes to exclude from transaction traces. Allows * as wildcard at end.'
1465
+ :description => 'Prefix of attributes to exclude from transaction traces. Allows <code>*</code> as wildcard at end.'
1464
1466
  },
1465
1467
  :'transaction_events.attributes.exclude' => {
1466
1468
  :default => [],
1467
- :public => false,
1469
+ :public => true,
1468
1470
  :type => Array,
1469
1471
  :allowed_from_server => false,
1470
1472
  :transform => DefaultSource.method(:convert_to_list),
1471
- :description => 'Prefix of attributes to exclude from transaction events. Allows * as wildcard at end.'
1473
+ :description => 'Prefix of attributes to exclude from transaction events. Allows <code>*</code> as wildcard at end.'
1472
1474
  },
1473
1475
  :'error_collector.attributes.exclude' => {
1474
1476
  :default => [],
1475
- :public => false,
1477
+ :public => true,
1476
1478
  :type => Array,
1477
1479
  :allowed_from_server => false,
1478
1480
  :transform => DefaultSource.method(:convert_to_list),
1479
- :description => 'Prefix of attributes to exclude from error collection. Allows * as wildcard at end.'
1481
+ :description => 'Prefix of attributes to exclude from error collection. Allows <code>*</code> as wildcard at end.'
1480
1482
  },
1481
1483
  :'browser_monitoring.attributes.exclude' => {
1482
1484
  :default => [],
1483
- :public => false,
1485
+ :public => true,
1484
1486
  :type => Array,
1485
1487
  :allowed_from_server => false,
1486
1488
  :transform => DefaultSource.method(:convert_to_list),
1487
- :description => 'Prefix of attributes to exclude from browser monitoring. Allows * as wildcard at end.'
1489
+ :description => 'Prefix of attributes to exclude from browser monitoring. Allows <code>*</code> as wildcard at end.'
1488
1490
  },
1489
1491
  :'attributes.include' => {
1490
1492
  :default => [],
1491
- :public => false,
1493
+ :public => true,
1492
1494
  :type => Array,
1493
1495
  :allowed_from_server => false,
1494
1496
  :transform => DefaultSource.method(:convert_to_list),
1495
- :description => 'Prefix of attributes to include in all destinations. Allows * as wildcard at end.'
1497
+ :description => 'Prefix of attributes to include in all destinations. Allows <code>*</code> as wildcard at end.'
1496
1498
  },
1497
1499
  :'transaction_tracer.attributes.include' => {
1498
1500
  :default => [],
1499
- :public => false,
1501
+ :public => true,
1500
1502
  :type => Array,
1501
1503
  :allowed_from_server => false,
1502
1504
  :transform => DefaultSource.method(:convert_to_list),
1503
- :description => 'Prefix of attributes to include in transaction traces. Allows * as wildcard at end.'
1505
+ :description => 'Prefix of attributes to include in transaction traces. Allows <code>*</code> as wildcard at end.'
1504
1506
  },
1505
1507
  :'transaction_events.attributes.include' => {
1506
1508
  :default => [],
1507
- :public => false,
1509
+ :public => true,
1508
1510
  :type => Array,
1509
1511
  :allowed_from_server => false,
1510
1512
  :transform => DefaultSource.method(:convert_to_list),
1511
- :description => 'Prefix of attributes to include in transaction events. Allows * as wildcard at end.'
1513
+ :description => 'Prefix of attributes to include in transaction events. Allows <code>*</code> as wildcard at end.'
1512
1514
  },
1513
1515
  :'error_collector.attributes.include' => {
1514
1516
  :default => [],
1515
- :public => false,
1517
+ :public => true,
1516
1518
  :type => Array,
1517
1519
  :allowed_from_server => false,
1518
1520
  :transform => DefaultSource.method(:convert_to_list),
1519
- :description => 'Prefix of attributes to include in error collection. Allows * as wildcard at end.'
1521
+ :description => 'Prefix of attributes to include in error collection. Allows <code>*</code> as wildcard at end.'
1520
1522
  },
1521
1523
  :'browser_monitoring.attributes.include' => {
1522
1524
  :default => [],
1523
- :public => false,
1525
+ :public => true,
1524
1526
  :type => Array,
1525
1527
  :allowed_from_server => false,
1526
1528
  :transform => DefaultSource.method(:convert_to_list),
1527
- :description => 'Prefix of attributes to include in browser monitoring. Allows * as wildcard at end.'
1529
+ :description => 'Prefix of attributes to include in browser monitoring. Allows <code>*</code> as wildcard at end.'
1528
1530
  },
1529
1531
  :'utilization.detect_aws' => {
1530
1532
  :default => true,
@@ -41,7 +41,7 @@ module NewRelic
41
41
  CLEANUP_REGEX = {
42
42
  :mysql => /'|"|\/\*|\*\//,
43
43
  :postgres => /'|\/\*|\*\/|\$(?!\?)/,
44
- :sqlite => /'|\/\*|\*\/|\$/,
44
+ :sqlite => /'|\/\*|\*\//,
45
45
  :cassandra => /'|\/\*|\*\//,
46
46
  :oracle => /'|\/\*|\*\//
47
47
  }
@@ -75,7 +75,13 @@ module NewRelic
75
75
  end
76
76
 
77
77
  def self.adapter
78
- clean_adapter_name(::ActiveJob::Base.queue_adapter.name)
78
+ adapter_class = if ::ActiveJob::Base.queue_adapter.class == Class
79
+ ::ActiveJob::Base.queue_adapter
80
+ else
81
+ ::ActiveJob::Base.queue_adapter.class
82
+ end
83
+
84
+ clean_adapter_name(adapter_class.name)
79
85
  end
80
86
 
81
87
  ADAPTER_REGEX = /ActiveJob::QueueAdapters::(.*)Adapter/
@@ -18,7 +18,7 @@ DependencyDetection.defer do
18
18
  end
19
19
 
20
20
  executes do
21
- ::NewRelic::Agent.logger.info 'Installing ActiveRecord 4 instrumentation'
21
+ ::NewRelic::Agent.logger.info 'Installing ActiveRecord 4+ instrumentation'
22
22
  end
23
23
 
24
24
  executes do
@@ -109,7 +109,7 @@ module NewRelic
109
109
  end
110
110
 
111
111
  DATA_MAPPER = "DataMapper".freeze
112
- PASSWORD_REGEX = /&password=.*?&/
112
+ PASSWORD_REGEX = /&password=.*?(&|$)/
113
113
  AMPERSAND = '&'.freeze
114
114
  PASSWORD_PARAM = '&password='.freeze
115
115
 
@@ -11,7 +11,7 @@ module NewRelic
11
11
  extend self
12
12
 
13
13
  API_ENDPOINT = 'api.endpoint'.freeze
14
- FORMAT_REGEX = /\(\/?\.:format\)/.freeze
14
+ FORMAT_REGEX = /\(\/?\.[\:\w]*\)/.freeze # either :format (< 0.12.0) or .ext (>= 0.12.0)
15
15
  VERSION_REGEX = /:version(\/|$)/.freeze
16
16
  EMPTY_STRING = ''.freeze
17
17
  MIN_VERSION = VersionNumber.new("0.2.0")
@@ -7,7 +7,7 @@
7
7
  # See:
8
8
  # http://www.deveiate.org/code/Ruby-MemCache/ (Gem: Ruby-MemCache)
9
9
  # http://seattlerb.rubyforge.org/memcache-client/ (Gem: memcache-client)
10
- # http://github.com/mperham/dalli (Gem: dalli)
10
+ # https://github.com/mperham/dalli (Gem: dalli)
11
11
 
12
12
  require 'new_relic/agent/datastores/metric_helper'
13
13
 
@@ -0,0 +1,29 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+ require 'new_relic/agent/instrumentation/action_controller_subscriber'
5
+
6
+
7
+ DependencyDetection.defer do
8
+ @name = :rails5_controller
9
+
10
+ depends_on do
11
+ defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i == 5
12
+ end
13
+
14
+ depends_on do
15
+ defined?(ActionController) && defined?(ActionController::Base)
16
+ end
17
+
18
+ executes do
19
+ ::NewRelic::Agent.logger.info 'Installing Rails 5 Controller instrumentation'
20
+ end
21
+
22
+ executes do
23
+ class ActionController::Base
24
+ include NewRelic::Agent::Instrumentation::ControllerInstrumentation
25
+ end
26
+ NewRelic::Agent::Instrumentation::ActionControllerSubscriber \
27
+ .subscribe(/^process_action.action_controller$/)
28
+ end
29
+ end
@@ -0,0 +1,25 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+ require 'new_relic/agent/instrumentation/action_view_subscriber'
5
+
6
+ DependencyDetection.defer do
7
+ @name = :rails5_view
8
+
9
+ depends_on do
10
+ defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i == 5
11
+ end
12
+
13
+ depends_on do
14
+ !NewRelic::Agent.config[:disable_view_instrumentation] &&
15
+ !NewRelic::Agent::Instrumentation::ActionViewSubscriber.subscribed?
16
+ end
17
+
18
+ executes do
19
+ ::NewRelic::Agent.logger.info 'Installing Rails 5 view instrumentation'
20
+ end
21
+
22
+ executes do
23
+ NewRelic::Agent::Instrumentation::ActionViewSubscriber.subscribe(/render_.+\.action_view$/)
24
+ end
25
+ end
@@ -8,11 +8,11 @@ DependencyDetection.defer do
8
8
  named :rails_middleware
9
9
 
10
10
  depends_on do
11
- defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i >= 3
11
+ !::NewRelic::Agent.config[:disable_middleware_instrumentation]
12
12
  end
13
13
 
14
14
  depends_on do
15
- !::NewRelic::Agent.config[:disable_middleware_instrumentation]
15
+ defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i >= 3
16
16
  end
17
17
 
18
18
  executes do