newrelic_rpm 4.0.0.332 → 4.1.0.333

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +0 -1
  3. data/CHANGELOG.md +22 -0
  4. data/LICENSE +1 -27
  5. data/README.md +4 -57
  6. data/lib/new_relic/agent.rb +0 -1
  7. data/lib/new_relic/agent/attribute_filter.rb +0 -1
  8. data/lib/new_relic/agent/configuration/default_source.rb +3 -32
  9. data/lib/new_relic/agent/error_collector.rb +0 -2
  10. data/lib/new_relic/agent/http_clients/curb_wrappers.rb +1 -1
  11. data/lib/new_relic/agent/http_clients/typhoeus_wrappers.rb +1 -1
  12. data/lib/new_relic/agent/http_clients/uri_util.rb +12 -7
  13. data/lib/new_relic/agent/stats.rb +0 -14
  14. data/lib/new_relic/agent/stats_engine.rb +171 -3
  15. data/lib/new_relic/agent/supported_versions.rb +9 -9
  16. data/lib/new_relic/agent/traced_method_stack.rb +1 -1
  17. data/lib/new_relic/agent/transaction/attributes.rb +0 -2
  18. data/lib/new_relic/agent/transaction/external_request_segment.rb +1 -5
  19. data/lib/new_relic/agent/transaction/trace_node.rb +0 -10
  20. data/lib/new_relic/agent/transaction_sample_builder.rb +0 -3
  21. data/lib/new_relic/agent/transaction_sampler.rb +3 -13
  22. data/lib/new_relic/collection_helper.rb +0 -18
  23. data/lib/new_relic/control/frameworks/rails.rb +1 -21
  24. data/lib/new_relic/control/frameworks/rails3.rb +1 -1
  25. data/lib/new_relic/noticed_error.rb +1 -0
  26. data/lib/new_relic/version.rb +1 -1
  27. data/newrelic.yml +0 -4
  28. data/newrelic_rpm.gemspec +1 -1
  29. data/test/config/newrelic.yml +1 -1
  30. data/test/multiverse/lib/multiverse/runner.rb +9 -1
  31. data/test/multiverse/suites/active_record/config/newrelic.yml +0 -1
  32. data/test/multiverse/suites/agent_only/config/newrelic.yml +0 -1
  33. data/test/multiverse/suites/capistrano/config/newrelic.yml +0 -1
  34. data/test/multiverse/suites/capistrano2/config/newrelic.yml +0 -1
  35. data/test/multiverse/suites/curb/config/newrelic.yml +0 -1
  36. data/test/multiverse/suites/datamapper/config/newrelic.yml +0 -1
  37. data/test/multiverse/suites/deferred_instrumentation/config/newrelic.yml +0 -1
  38. data/test/multiverse/suites/delayed_job/config/newrelic.yml +0 -1
  39. data/test/multiverse/suites/excon/config/newrelic.yml +0 -1
  40. data/test/multiverse/suites/grape/config/newrelic.yml +0 -1
  41. data/test/multiverse/suites/high_security/config/newrelic.yml +0 -1
  42. data/test/multiverse/suites/httpclient/config/newrelic.yml +0 -1
  43. data/test/multiverse/suites/httprb/config/newrelic.yml +0 -1
  44. data/test/multiverse/suites/json/config/newrelic.yml +0 -1
  45. data/test/multiverse/suites/marshalling/config/newrelic.yml +0 -1
  46. data/test/multiverse/suites/mongo/config/newrelic.yml +0 -1
  47. data/test/multiverse/suites/net_http/config/newrelic.yml +0 -1
  48. data/test/multiverse/suites/padrino/config/newrelic.yml +0 -1
  49. data/test/multiverse/suites/rack/config/newrelic.yml +0 -1
  50. data/test/multiverse/suites/rails/config/newrelic.yml +0 -1
  51. data/test/multiverse/suites/rake/config/newrelic.yml +0 -1
  52. data/test/multiverse/suites/redis/config/newrelic.yml +0 -1
  53. data/test/multiverse/suites/resque/config/newrelic.yml +0 -1
  54. data/test/multiverse/suites/sequel/config/newrelic.yml +0 -1
  55. data/test/multiverse/suites/sidekiq/config/newrelic.yml +0 -1
  56. data/test/multiverse/suites/sinatra/config/newrelic.yml +0 -1
  57. data/test/multiverse/suites/typhoeus/config/newrelic.yml +0 -1
  58. data/test/multiverse/suites/yajl/config/newrelic.yml +0 -1
  59. data/test/multiverse/test/suite_examples/one/a/config/newrelic.yml +0 -1
  60. data/test/multiverse/test/suite_examples/one/b/config/newrelic.yml +0 -1
  61. data/test/new_relic/agent/agent/connect_test.rb +3 -12
  62. data/test/new_relic/agent/agent/start_test.rb +4 -2
  63. data/test/new_relic/agent/busy_calculator_test.rb +13 -5
  64. data/test/new_relic/agent/pipe_channel_manager_test.rb +3 -4
  65. data/test/new_relic/agent/stats_engine_test.rb +313 -1
  66. data/test/new_relic/agent/stats_test.rb +0 -20
  67. data/test/new_relic/agent/traced_method_stack_test.rb +2 -5
  68. data/test/new_relic/agent/transaction/external_request_segment_test.rb +5 -0
  69. data/test/new_relic/agent/transaction/trace_node_test.rb +0 -19
  70. data/test/new_relic/agent/transaction_sampler_test.rb +3 -6
  71. data/test/new_relic/collection_helper_test.rb +0 -39
  72. data/test/new_relic/control_test.rb +2 -4
  73. data/test/new_relic/license_test.rb +4 -14
  74. data/test/performance/suites/external_segment.rb +0 -2
  75. data/test/performance/suites/rack_middleware.rb +1 -3
  76. data/test/performance/suites/transaction_tracing.rb +0 -1
  77. metadata +2 -94
  78. data/lib/conditional_vendored_metric_parser.rb +0 -9
  79. data/lib/new_relic/agent/instrumentation/rubyprof.rb +0 -26
  80. data/lib/new_relic/agent/stats_engine/metric_stats.rb +0 -188
  81. data/lib/new_relic/agent/transaction/developer_mode_sample_buffer.rb +0 -62
  82. data/lib/new_relic/merbtasks.rb +0 -10
  83. data/lib/new_relic/rack/developer_mode.rb +0 -321
  84. data/lib/new_relic/rack/developer_mode/segment_summary.rb +0 -56
  85. data/test/new_relic/agent/stats_engine/metric_stats_test.rb +0 -328
  86. data/test/new_relic/agent/transaction/developer_mode_sample_buffer_test.rb +0 -75
  87. data/test/new_relic/metric_parser/metric_parser_test.rb +0 -17
  88. data/test/new_relic/rack/developer_mode/segment_summary_test.rb +0 -96
  89. data/test/new_relic/rack/developer_mode_helper_test.rb +0 -136
  90. data/test/new_relic/rack/developer_mode_test.rb +0 -96
  91. data/ui/helpers/developer_mode_helper.rb +0 -325
  92. data/ui/helpers/google_pie_chart.rb +0 -54
  93. data/ui/views/layouts/newrelic_default.rhtml +0 -48
  94. data/ui/views/newrelic/_explain_plans.rhtml +0 -27
  95. data/ui/views/newrelic/_sample.rhtml +0 -20
  96. data/ui/views/newrelic/_segment.rhtml +0 -28
  97. data/ui/views/newrelic/_segment_limit_message.rhtml +0 -1
  98. data/ui/views/newrelic/_segment_row.rhtml +0 -12
  99. data/ui/views/newrelic/_show_sample_detail.rhtml +0 -24
  100. data/ui/views/newrelic/_show_sample_sql.rhtml +0 -24
  101. data/ui/views/newrelic/_show_sample_summary.rhtml +0 -3
  102. data/ui/views/newrelic/_sql_row.rhtml +0 -16
  103. data/ui/views/newrelic/_stack_trace.rhtml +0 -15
  104. data/ui/views/newrelic/_table.rhtml +0 -12
  105. data/ui/views/newrelic/explain_sql.rhtml +0 -43
  106. data/ui/views/newrelic/file/images/arrow-close.png +0 -0
  107. data/ui/views/newrelic/file/images/arrow-open.png +0 -0
  108. data/ui/views/newrelic/file/images/blue_bar.gif +0 -0
  109. data/ui/views/newrelic/file/images/file_icon.png +0 -0
  110. data/ui/views/newrelic/file/images/gray_bar.gif +0 -0
  111. data/ui/views/newrelic/file/images/new-relic-rpm-desktop.gif +0 -0
  112. data/ui/views/newrelic/file/images/new_relic_rpm_desktop.gif +0 -0
  113. data/ui/views/newrelic/file/images/textmate.png +0 -0
  114. data/ui/views/newrelic/file/javascript/jquery-1.4.2.js +0 -6243
  115. data/ui/views/newrelic/file/javascript/transaction_sample.js +0 -123
  116. data/ui/views/newrelic/file/stylesheets/style.css +0 -490
  117. data/ui/views/newrelic/index.rhtml +0 -70
  118. data/ui/views/newrelic/sample_not_found.rhtml +0 -2
  119. data/ui/views/newrelic/show_sample.rhtml +0 -81
  120. data/ui/views/newrelic/threads.rhtml +0 -45
  121. data/vendor/gems/metric_parser-0.1.0.pre1/.specification +0 -116
  122. data/vendor/gems/metric_parser-0.1.0.pre1/lib/metric_parser.rb +0 -5
  123. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser.rb +0 -70
  124. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/action_mailer.rb +0 -18
  125. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_merchant.rb +0 -35
  126. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_record.rb +0 -37
  127. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/apdex.rb +0 -93
  128. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/background_transaction.rb +0 -11
  129. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb +0 -50
  130. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller.rb +0 -71
  131. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb +0 -47
  132. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_ext.rb +0 -21
  133. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb +0 -52
  134. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database_pool.rb +0 -28
  135. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/dot_net.rb +0 -32
  136. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/dot_net_parser.rb +0 -21
  137. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/errors.rb +0 -15
  138. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/external.rb +0 -59
  139. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/frontend.rb +0 -44
  140. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/gc.rb +0 -24
  141. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/hibernate_session.rb +0 -11
  142. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/java.rb +0 -35
  143. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/java_parser.rb +0 -21
  144. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/jsp.rb +0 -38
  145. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/jsp_tag.rb +0 -11
  146. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb +0 -56
  147. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/metric_parser.rb +0 -138
  148. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb +0 -33
  149. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/nested.rb +0 -23
  150. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/orm.rb +0 -31
  151. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb +0 -44
  152. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet.rb +0 -11
  153. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_context_listener.rb +0 -11
  154. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_filter.rb +0 -11
  155. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_init.rb +0 -11
  156. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr.rb +0 -31
  157. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr_request_handler.rb +0 -19
  158. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring.rb +0 -58
  159. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring_controller.rb +0 -10
  160. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring_view.rb +0 -10
  161. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/struts_action.rb +0 -24
  162. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/struts_result.rb +0 -24
  163. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/version.rb +0 -9
  164. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/view.rb +0 -74
  165. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_frontend.rb +0 -22
  166. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_service.rb +0 -18
  167. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_transaction.rb +0 -137
@@ -11,22 +11,22 @@ module NewRelic
11
11
  {
12
12
  :type => :ruby,
13
13
  :name => "MRI",
14
- :supported => ["2.0.0", "~> 2.1.0", "~> 2.2.0", "~> 2.3.0", "~> 2.4.0"],
14
+ :supported => ["2.0.0", "~>2.1.0", "~>2.2.0", "~>2.3.0", "~>2.4.0"],
15
15
  :deprecated => ["1.8.6", "1.8.7", "1.9.2", "1.9.3"],
16
16
  :url => "https://www.ruby-lang.org",
17
17
  :feed => "https://www.ruby-lang.org/en/feeds/news.rss",
18
- :notes => ["Last supported agent for 1.8.7, 1.9.2, and 1.9.3 was 3.18.0.329.",
18
+ :notes => ["Last supported agent for 1.8.7, 1.9.2, and 1.9.3 was 3.18.1.330.",
19
19
  "Last supported agent on 1.8.6 was 3.6.8.168."]
20
20
  },
21
21
  :jruby =>
22
22
  {
23
23
  :type => :ruby,
24
24
  :name => "JRuby",
25
- :supported => ["~> 9.0", "~> 9.1"],
26
- :deprecated => ["~> 1.7.0"],
25
+ :supported => ["~>9.0", "~>9.1"],
26
+ :deprecated => ["~>1.7.0"],
27
27
  :url => "http://jruby.org",
28
28
  :feed => "http://jruby.org/atom.xml",
29
- :notes => ["Last supported agent for ~> 1.7.0 was 3.18.0.329."]
29
+ :notes => ["Last supported agent for ~>1.7.0 was 3.18.1.330."]
30
30
  },
31
31
 
32
32
  # App servers
@@ -78,11 +78,11 @@ module NewRelic
78
78
  :rails =>
79
79
  {
80
80
  :type => :web,
81
- :supported => ["~3.0.0", "~>3.1.0", "~>3.2.0", "~>4.0.0", "~>4.1.0", "~>4.2.0", "~> 5.0.0"],
81
+ :supported => ["~3.0.0", "~>3.1.0", "~>3.2.0", "~>4.0.0", "~>4.1.0", "~>4.2.0", "~>5.0.0"],
82
82
  :deprecated => ["~>2.0.0", "~>2.1.0", "~>2.2.0", "~>2.3.0"],
83
83
  :url => "https://rubygems.org/gems/rails",
84
84
  :feed => "https://rubygems.org/gems/rails/versions.atom",
85
- :notes => ["Last supported agent for ~>2.1.0, ~>2.2.0, and ~>2.3.0 was 3.18.0.329.",
85
+ :notes => ["Last supported agent for ~>2.1.0, ~>2.2.0, and ~>2.3.0 was 3.18.1.330.",
86
86
  "Last supported agent for 2.0.x was 3.6.8.168."]
87
87
  },
88
88
  :sinatra =>
@@ -149,7 +149,7 @@ module NewRelic
149
149
  :redis =>
150
150
  {
151
151
  :type => :database,
152
- :supported => ["~> 3.0"],
152
+ :supported => ["~>3.0"],
153
153
  :url => "https://rubygems.org/gems/redis",
154
154
  :feed => "https://rubygems.org/gems/redis/versions.atom"
155
155
  },
@@ -158,7 +158,7 @@ module NewRelic
158
158
  :rake =>
159
159
  {
160
160
  :type => :background,
161
- :supported => ["~> 10.0"],
161
+ :supported => ["~>10.0"],
162
162
  :url => "https://rubygems.org/gems/rake",
163
163
  :feed => "https://rubygems.org/gems/rake/versions.atom"
164
164
  },
@@ -86,7 +86,7 @@ module NewRelic
86
86
  end
87
87
 
88
88
  def sampler_enabled?
89
- Agent.config[:'transaction_tracer.enabled'] || Agent.config[:developer_mode]
89
+ Agent.config[:'transaction_tracer.enabled']
90
90
  end
91
91
 
92
92
  def transaction_sampler
@@ -122,8 +122,6 @@ module NewRelic
122
122
  # Avoid allocating anything if there are no attrs at all
123
123
  return EMPTY_HASH if attributes.empty?
124
124
 
125
- return attributes.dup if destination == NewRelic::Agent::AttributeFilter::DST_DEVELOPER_MODE
126
-
127
125
  attributes.inject({}) do |memo, (key, value)|
128
126
  if @filter.allows?(calculated_destinations[key], destination)
129
127
  memo[key] = value
@@ -13,7 +13,7 @@ module NewRelic
13
13
 
14
14
  def initialize library, uri, procedure
15
15
  @library = library
16
- @uri = normalize_uri uri
16
+ @uri = HTTPClients::URIUtil.parse_and_normalize_url(uri)
17
17
  @procedure = procedure
18
18
  @host_header = nil
19
19
  @app_data = nil
@@ -90,10 +90,6 @@ module NewRelic
90
90
  Agent.instance.transaction_sampler.add_node_parameters node_params
91
91
  end
92
92
 
93
- def normalize_uri uri
94
- uri.is_a?(URI) ? uri : HTTPClients::URIUtil.parse_url(uri)
95
- end
96
-
97
93
  def process_host_header request
98
94
  if @host_header = request.host_from_header
99
95
  update_segment_name
@@ -146,16 +146,6 @@ module NewRelic
146
146
  summary.current_nest_count -= 1 if summary
147
147
  end
148
148
 
149
- # This is only for use by developer mode
150
- def find_node(id)
151
- return self if object_id == id
152
- called_nodes.each do |node|
153
- found = node.find_node(id)
154
- return found if found
155
- end
156
- nil
157
- end
158
-
159
149
  def explain_sql
160
150
  return params[:explain_plan] if params.key?(:explain_plan)
161
151
 
@@ -2,7 +2,6 @@
2
2
  # This file is distributed under New Relic's license terms.
3
3
  # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
4
 
5
- require 'new_relic/collection_helper'
6
5
  require 'new_relic/agent/transaction'
7
6
  require 'new_relic/agent/transaction/trace'
8
7
 
@@ -44,8 +43,6 @@ module NewRelic
44
43
 
45
44
  attr_reader :current_node, :sample
46
45
 
47
- include NewRelic::CollectionHelper
48
-
49
46
  def initialize(time=Time.now)
50
47
  @sample = NewRelic::Agent::Transaction::Trace.new(time.to_f)
51
48
  @sample_start = time.to_f
@@ -3,7 +3,6 @@
3
3
  # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
4
 
5
5
  require 'new_relic/agent/transaction_sample_builder'
6
- require 'new_relic/agent/transaction/developer_mode_sample_buffer'
7
6
  require 'new_relic/agent/transaction/slowest_sample_buffer'
8
7
  require 'new_relic/agent/transaction/synthetics_sample_buffer'
9
8
  require 'new_relic/agent/transaction/xray_sample_buffer'
@@ -20,14 +19,12 @@ module NewRelic
20
19
  #
21
20
  # @api public
22
21
  class TransactionSampler
23
- attr_reader :last_sample, :dev_mode_sample_buffer, :xray_sample_buffer
22
+ attr_reader :last_sample, :xray_sample_buffer
24
23
 
25
24
  def initialize
26
- @dev_mode_sample_buffer = NewRelic::Agent::Transaction::DeveloperModeSampleBuffer.new
27
25
  @xray_sample_buffer = NewRelic::Agent::Transaction::XraySampleBuffer.new
28
26
 
29
27
  @sample_buffers = []
30
- @sample_buffers << @dev_mode_sample_buffer
31
28
  @sample_buffers << @xray_sample_buffer
32
29
  @sample_buffers << NewRelic::Agent::Transaction::SlowestSampleBuffer.new
33
30
  @sample_buffers << NewRelic::Agent::Transaction::SyntheticsSampleBuffer.new
@@ -54,7 +51,7 @@ module NewRelic
54
51
  end
55
52
 
56
53
  def enabled?
57
- Agent.config[:'transaction_tracer.enabled'] || Agent.config[:developer_mode]
54
+ Agent.config[:'transaction_tracer.enabled']
58
55
  end
59
56
 
60
57
  def on_start_transaction(state, start_time)
@@ -65,18 +62,11 @@ module NewRelic
65
62
 
66
63
  # This delegates to the builder to create a new open transaction node
67
64
  # for the frame, beginning at the optionally specified time.
68
- #
69
- # Note that in developer mode, this captures a stacktrace for
70
- # the beginning of each node, which can be fairly slow
71
65
  def notice_push_frame(state, time=Time.now)
72
66
  builder = state.transaction_sample_builder
73
67
  return unless builder
74
68
 
75
- node = builder.trace_entry(time.to_f)
76
- if @dev_mode_sample_buffer
77
- @dev_mode_sample_buffer.visit_node(node)
78
- end
79
- node
69
+ builder.trace_entry(time.to_f)
80
70
  end
81
71
 
82
72
  # Informs the transaction sample builder about the end of a traced frame
@@ -31,24 +31,6 @@ module NewRelic
31
31
  end
32
32
  end
33
33
 
34
- # Return an array of strings (backtrace), cleaned up for readability
35
- # Return nil if there is no backtrace
36
-
37
- def strip_nr_from_backtrace(backtrace)
38
- if backtrace && !Agent.config[:disable_backtrace_cleanup]
39
- # this is for 1.9.1, where strings no longer have Enumerable
40
- backtrace = backtrace.split("\n") if String === backtrace
41
- backtrace = backtrace.map(&:to_s)
42
- backtrace = backtrace.reject do |line|
43
- line.include?(NewRelic::Control.newrelic_root) or
44
- line =~ /^newrelic_rpm\s/
45
- end
46
- # rename methods back to their original state
47
- backtrace = backtrace.collect {|line| line.gsub(/_without_(newrelic|trace)/, "")}
48
- end
49
- backtrace
50
- end
51
-
52
34
  private
53
35
 
54
36
  # Convert any kind of object to a short string.
@@ -12,7 +12,7 @@ module NewRelic
12
12
  class Rails < NewRelic::Control::Frameworks::Ruby
13
13
 
14
14
  def env
15
- @env ||= RAILS_ENV.dup
15
+ @env ||= ( ENV['NEW_RELIC_ENV'] || RAILS_ENV.dup )
16
16
  end
17
17
 
18
18
  # Rails can return an empty string from this method, causing
@@ -58,7 +58,6 @@ module NewRelic
58
58
  # is running, if it thinks it's a rake task, or if the agent_enabled is false.
59
59
  ::NewRelic::Agent.logger.info("New Relic Agent not running.")
60
60
  else
61
- install_developer_mode(rails_config) if Agent.config[:developer_mode]
62
61
  install_browser_monitoring(rails_config)
63
62
  install_agent_hooks(rails_config)
64
63
  end
@@ -95,25 +94,6 @@ module NewRelic
95
94
  end
96
95
  end
97
96
 
98
- def install_developer_mode(rails_config)
99
- return if defined?(@developer_mode_installed) && @developer_mode_installed
100
- @developer_mode_installed = true
101
- if rails_config && rails_config.respond_to?(:middleware)
102
- begin
103
- require 'new_relic/rack/developer_mode'
104
- rails_config.middleware.use NewRelic::Rack::DeveloperMode
105
- ::NewRelic::Agent.logger.info("New Relic Agent Developer Mode enabled.")
106
- if env == "production"
107
- ::NewRelic::Agent.logger.warn("***New Relic Developer Mode is not intended to be enabled in production environments! We highly recommend setting developer_mode: false for the production environment in your newrelic.yml.")
108
- end
109
- rescue => e
110
- ::NewRelic::Agent.logger.warn("Error installing New Relic Developer Mode", e)
111
- end
112
- elsif rails_config
113
- ::NewRelic::Agent.logger.warn("Developer mode not available for Rails versions prior to 2.2")
114
- end
115
- end
116
-
117
97
  def rails_version
118
98
  @rails_version ||= Gem::Version.new(::Rails::VERSION::STRING)
119
99
  end
@@ -15,7 +15,7 @@ module NewRelic
15
15
  class Rails3 < NewRelic::Control::Frameworks::Rails
16
16
 
17
17
  def env
18
- @env ||= ::Rails.env.to_s
18
+ @env ||= ( ENV['NEW_RELIC_ENV'] || ::Rails.env.to_s )
19
19
  end
20
20
 
21
21
  def rails_root
@@ -4,6 +4,7 @@
4
4
 
5
5
  require 'new_relic/helper'
6
6
  require 'new_relic/agent/attribute_filter'
7
+ require 'new_relic/collection_helper'
7
8
 
8
9
  # This class encapsulates an error that was noticed by New Relic in a managed app.
9
10
  class NewRelic::NoticedError
@@ -11,7 +11,7 @@ module NewRelic
11
11
  end
12
12
 
13
13
  MAJOR = 4
14
- MINOR = 0
14
+ MINOR = 1
15
15
  TINY = 0
16
16
 
17
17
  begin
@@ -30,10 +30,6 @@ development:
30
30
  <<: *default_settings
31
31
  app_name: <%= app_name %> (Development)
32
32
 
33
- # NOTE: There is substantial overhead when running in developer mode.
34
- # Do not use for production or load testing.
35
- developer_mode: true
36
-
37
33
  test:
38
34
  <<: *default_settings
39
35
  # It doesn't make sense to report to New Relic from automated test runs.
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
13
13
  s.authors = [ "Tim Krajcar", "Matthew Wear", "Katherine Wu", "Kenichi Nakamura" ]
14
14
  s.date = Time.now.strftime('%Y-%m-%d')
15
- s.licenses = ['New Relic', 'MIT', 'Ruby']
15
+ s.licenses = ['New Relic']
16
16
  s.description = <<-EOS
17
17
  New Relic is a performance management system, developed by New Relic,
18
18
  Inc (http://www.newrelic.com). New Relic provides you with deep
@@ -11,7 +11,7 @@ test:
11
11
  log_level: info
12
12
  agent_enabled: false
13
13
  monitor_mode: false
14
- developer_mode: true
14
+ test_mode: true
15
15
  disable_samplers: true
16
16
  api_host: 127.0.0.1
17
17
  api_port: 443
@@ -91,14 +91,22 @@ module Multiverse
91
91
  "rails" => ["active_record", "rails"],
92
92
  "serialization" => ["json", "marshalling", "yajl"],
93
93
  "sinatra" => ["sinatra", "padrino"],
94
- "background_2" => ["rake", "resque"],
94
+ "background_2" => ["resque"],
95
95
 
96
96
  "rest" => [] # Specially handled below
97
97
  }
98
98
 
99
+ # Would like to reinstate but requires investigation, see RUBY-1749
100
+ unless RUBY_VERSION >= '2.1' and RUBY_VERSION < '2.3'
101
+ GROUPS['background_2'] << 'rake'
102
+ end
103
+
99
104
  def passes_filter?(dir, filter)
100
105
  return true if filter.nil?
101
106
 
107
+ # Would like to reinstate but requires investigation, see RUBY-1749
108
+ return false if dir == 'rake' and RUBY_VERSION >= '2.1' and RUBY_VERSION < '2.3'
109
+
102
110
  if filter.include?("group=")
103
111
  key = filter.sub("group=", "")
104
112
  group = GROUPS[key]
@@ -6,7 +6,6 @@ development:
6
6
  ssl: false
7
7
  monitor_mode: true
8
8
  license_key: bootstrap_newrelic_admin_license_key_000
9
- developer_mode: false
10
9
  app_name: test
11
10
  host: 127.0.0.1
12
11
  api_host: 127.0.0.1
@@ -6,7 +6,6 @@ development:
6
6
  ssl: false
7
7
  monitor_mode: true
8
8
  license_key: bootstrap_newrelic_admin_license_key_000
9
- developer_mode: false
10
9
  app_name: test
11
10
  host: 127.0.0.1
12
11
  api_host: 127.0.0.1
@@ -7,7 +7,6 @@ production:
7
7
  agent_enabled: true
8
8
  monitor_mode: true
9
9
  license_key: bootstrap_newrelic_admin_license_key_000
10
- developer_mode: false
11
10
  app_name: test
12
11
  host: 127.0.0.1
13
12
  api_host: 127.0.0.1
@@ -7,7 +7,6 @@ development:
7
7
  agent_enabled: true
8
8
  monitor_mode: true
9
9
  license_key: bootstrap_newrelic_admin_license_key_000
10
- developer_mode: false
11
10
  app_name: test
12
11
  host: 127.0.0.1
13
12
  api_host: 127.0.0.1
@@ -6,7 +6,6 @@ development:
6
6
  ssl: false
7
7
  monitor_mode: true
8
8
  license_key: bootstrap_newrelic_admin_license_key_000
9
- developer_mode: false
10
9
  app_name: test
11
10
  host: 127.0.0.1
12
11
  api_host: 127.0.0.1
@@ -6,7 +6,6 @@ development:
6
6
  ssl: false
7
7
  monitor_mode: true
8
8
  license_key: bootstrap_newrelic_admin_license_key_000
9
- developer_mode: false
10
9
  app_name: test
11
10
  host: 127.0.0.1
12
11
  api_host: 127.0.0.1
@@ -7,7 +7,6 @@ development:
7
7
  agent_enabled: true
8
8
  monitor_mode: true
9
9
  license_key: bootstrap_newrelic_admin_license_key_000
10
- developer_mode: false
11
10
  app_name: test
12
11
  host: 127.0.0.1
13
12
  api_host: 127.0.0.1
@@ -6,7 +6,6 @@ development:
6
6
  ssl: false
7
7
  monitor_mode: true
8
8
  license_key: bootstrap_newrelic_admin_license_key_000
9
- developer_mode: false
10
9
  app_name: test
11
10
  host: 127.0.0.1
12
11
  api_host: 127.0.0.1
@@ -6,7 +6,6 @@ development:
6
6
  ssl: false
7
7
  monitor_mode: true
8
8
  license_key: bootstrap_newrelic_admin_license_key_000
9
- developer_mode: false
10
9
  app_name: test
11
10
  host: 127.0.0.1
12
11
  api_host: 127.0.0.1
@@ -6,7 +6,6 @@ development:
6
6
  ssl: false
7
7
  monitor_mode: true
8
8
  license_key: bootstrap_newrelic_admin_license_key_000
9
- developer_mode: false
10
9
  app_name: test
11
10
  host: 127.0.0.1
12
11
  api_host: 127.0.0.1
@@ -58,7 +58,6 @@ development:
58
58
  apdex_t: 0.24
59
59
  monitor_mode: true
60
60
  license_key: bootstrap_newrelic_admin_license_key_000
61
- developer_mode: false
62
61
  app_name: test
63
62
  host: localhost
64
63
  api_host: localhost
@@ -6,7 +6,6 @@ development:
6
6
  ssl: false
7
7
  monitor_mode: true
8
8
  license_key: bootstrap_newrelic_admin_license_key_000
9
- developer_mode: false
10
9
  app_name: test
11
10
  host: 127.0.0.1
12
11
  api_host: 127.0.0.1
@@ -6,7 +6,6 @@ development:
6
6
  ssl: false
7
7
  monitor_mode: true
8
8
  license_key: bootstrap_newrelic_admin_license_key_000
9
- developer_mode: false
10
9
  app_name: test
11
10
  host: 127.0.0.1
12
11
  api_host: 127.0.0.1