newrelic_rpm 3.4.2.beta1 → 3.4.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of newrelic_rpm might be problematic. Click here for more details.

data/CHANGELOG CHANGED
@@ -1,13 +1,21 @@
1
1
 
2
2
  # New Relic Ruby Agent Release Notes #
3
3
 
4
- ### Next Up ###
5
- ## v3.4.2.beta1 ##
4
+ ### current version ###
5
+ ## v3.4.2 ##
6
+
6
7
  * The RUM NRAGENT tk value gets sanitized to prevent potential XSS vulnerabilities
7
8
 
9
+ There was the potential for malicious code to be inserted into the token used
10
+ in Real User Monitoring and have it echoed back to a browser as an XSS exploit.
11
+ The token now gets scrubbed to remove this potential problem.
12
+
8
13
  * Refactoring of agent config code
14
+
15
+ The code that reads the configuration information and confirgures the agent
16
+ got substantially reorganized, consolidated, simplified, and made more robust.
9
17
 
10
- ### current version ###
18
+ ### previous versions ###
11
19
  ## v3.4.1 ##
12
20
  #### Bug Fixes ####
13
21
  * Fix edge case in RUM auto instrumentation where X-UA-Compatible meta tag is
@@ -48,7 +56,6 @@
48
56
  example, out-of-band GC in Unicorn. fixed.
49
57
 
50
58
 
51
- ### previous versions ###
52
59
  v3.4.0.1
53
60
  * Prevent the agent from resolving the collector address when disabled.
54
61
  * Fix for error collector configuration that was introduced during beta.
@@ -15,11 +15,6 @@ module NewRelic
15
15
  def initialize
16
16
  @config_stack = [ EnvironmentSource.new, DEFAULTS ]
17
17
  @cache = Hash.new {|hash,key| hash[key] = self.fetch(key) }
18
-
19
- # letting Control handle this for now
20
- # yaml_config = YamlSource.new("#{NewRelic::Control.instance.root}/#{self['config_path']}",
21
- # NewRelic::Control.instance.env)
22
- # apply_config(yaml_config, 1) if yaml_config
23
18
  end
24
19
 
25
20
  def apply_config(source, level=0)
@@ -36,6 +31,12 @@ module NewRelic
36
31
  expire_cache
37
32
  end
38
33
 
34
+ def replace_or_add_config(source, level=0)
35
+ idx = @config_stack.map{|s| s.class}.index(source.class)
36
+ @config_stack.delete_at(idx) if idx
37
+ apply_config(source, idx || level)
38
+ end
39
+
39
40
  def source(key)
40
41
  @config_stack.each do |config|
41
42
  if config.respond_to?(key.to_sym) || config.has_key?(key.to_sym)
@@ -3,15 +3,11 @@ require 'new_relic/agent/configuration/manager'
3
3
  module NewRelic
4
4
  module Agent
5
5
  module Configuration
6
- def self.manager
7
- @@manager ||= Manager.new
8
- end
9
-
10
6
  # This can be mixed in with minimal impact to provide easy
11
7
  # access to the config manager
12
8
  module Instance
13
9
  def config
14
- Configuration.manager
10
+ @@manager ||= Manager.new
15
11
  end
16
12
  end
17
13
 
@@ -9,7 +9,6 @@ module NewRelic
9
9
  # accessed by any other thread so no need for synchronization.
10
10
  class TransactionSampleBuilder
11
11
  attr_reader :current_segment, :sample
12
- attr_accessor :segment_limit
13
12
 
14
13
  include NewRelic::CollectionHelper
15
14
 
@@ -17,7 +16,6 @@ module NewRelic
17
16
  @sample = NewRelic::TransactionSample.new(time.to_f)
18
17
  @sample_start = time.to_f
19
18
  @current_segment = @sample.root_segment
20
- @segment_limit = Agent.config[:'transaction_tracer.limit_segments']
21
19
  end
22
20
 
23
21
  def sample_id
@@ -33,19 +31,20 @@ module NewRelic
33
31
  end
34
32
 
35
33
  def trace_entry(metric_name, time)
36
- if @sample.count_segments < @segment_limit
34
+ segment_limit = Agent.config[:'transaction_tracer.limit_segments']
35
+ if @sample.count_segments < segment_limit
37
36
  segment = @sample.create_segment(time.to_f - @sample_start, metric_name)
38
37
  @current_segment.add_called_segment(segment)
39
38
  @current_segment = segment
40
- if @sample.count_segments == @segment_limit
41
- NewRelic::Control.instance.log.debug("Segment limit of #{@segment_limit} reached, ceasing collection.")
39
+ if @sample.count_segments == segment_limit
40
+ NewRelic::Control.instance.log.debug("Segment limit of #{segment_limit} reached, ceasing collection.")
42
41
  end
43
42
  @current_segment
44
43
  end
45
44
  end
46
45
 
47
46
  def trace_exit(metric_name, time)
48
- return unless @sample.count_segments < @segment_limit
47
+ return unless @sample.count_segments < Agent.config[:'transaction_tracer.limit_segments']
49
48
  if metric_name != @current_segment.metric_name
50
49
  fail "unbalanced entry/exit: #{metric_name} != #{@current_segment.metric_name}"
51
50
  end
@@ -19,7 +19,7 @@ module NewRelic
19
19
 
20
20
  BUILDER_KEY = :transaction_sample_builder
21
21
 
22
- attr_accessor :stack_trace_threshold, :random_sampling, :sampling_rate
22
+ attr_accessor :random_sampling, :sampling_rate
23
23
  attr_accessor :explain_threshold, :explain_enabled, :transaction_threshold
24
24
  attr_accessor :slow_capture_threshold
25
25
  attr_reader :samples, :last_sample, :disabled
@@ -50,8 +50,6 @@ module NewRelic
50
50
  # @segment_limit and @stack_trace_threshold come from the
51
51
  # configuration file, with built-in defaults that should
52
52
  # suffice for most customers
53
- @segment_limit = Agent.config[:'transaction_tracer.limit_segments']
54
- @stack_trace_threshold = Agent.config[:'transaction_tracer.stack_trace_threshold']
55
53
  @explain_threshold = Agent.config[:'transaction_tracer.explain_threshold']
56
54
  @explain_enabled = Agent.config[:'transaction_tracer.explain_enabled']
57
55
  @transaction_threshold = Agent.config[:'transaction_tracer.transation_threshold']
@@ -308,7 +306,10 @@ module NewRelic
308
306
  # Appends a backtrace to a segment if that segment took longer
309
307
  # than the specified duration
310
308
  def append_backtrace(segment, duration)
311
- segment[:backtrace] = caller.join("\n") if (duration >= @stack_trace_threshold || Thread.current[:capture_deep_tt])
309
+ if (duration >= Agent.config[:'transaction_tracer.stack_trace_threshold'] ||
310
+ Thread.current[:capture_deep_tt])
311
+ segment[:backtrace] = caller.join("\n")
312
+ end
312
313
  end
313
314
 
314
315
  # some statements (particularly INSERTS with large BLOBS
@@ -400,7 +401,7 @@ module NewRelic
400
401
 
401
402
  # Truncate the samples at 2100 segments. The UI will clamp them at 2000 segments anyway.
402
403
  # This will save us memory and bandwidth.
403
- result.each { |sample| sample.truncate(@segment_limit) }
404
+ result.each { |sample| sample.truncate(Agent.config[:'transaction_tracer.limit_segments']) }
404
405
  result
405
406
  end
406
407
 
@@ -11,7 +11,7 @@ require 'rexml/document'
11
11
  require 'new_relic/control' unless defined? NewRelic::Control
12
12
 
13
13
  class NewRelic::Command::Deployments < NewRelic::Command
14
- attr_reader :config
14
+ attr_reader :control
15
15
  def self.command; "deployments"; end
16
16
 
17
17
  # Initialize the deployment uploader with command line args.
@@ -24,12 +24,18 @@ class NewRelic::Command::Deployments < NewRelic::Command
24
24
  # Will throw CommandFailed exception if there's any error.
25
25
  #
26
26
  def initialize command_line_args
27
- @config = NewRelic::Control.instance
27
+ @control = NewRelic::Control.instance
28
28
  super(command_line_args)
29
29
  @description ||= @leftover && @leftover.join(" ")
30
30
  @user ||= ENV['USER']
31
- config.env = @environment if @environment
32
- @appname ||= NewRelic::Agent.config.app_names[0] || config.env || 'development'
31
+ control.env = @environment if @environment
32
+ load_yaml_from_env(control.env)
33
+ @appname ||= NewRelic::Agent.config.app_names[0] || control.env || 'development'
34
+ end
35
+
36
+ def load_yaml_from_env(env)
37
+ yaml = NewRelic::Agent::Configuration::YamlSource.new(NewRelic::Agent.config[:config_path], env)
38
+ NewRelic::Agent.config.replace_or_add_config(yaml, 1)
33
39
  end
34
40
 
35
41
  # Run the Deployment upload in New Relic via Active Resource.
@@ -48,12 +54,13 @@ class NewRelic::Command::Deployments < NewRelic::Command
48
54
  }.each do |k, v|
49
55
  create_params["deployment[#{k}]"] = v unless v.nil? || v == ''
50
56
  end
51
- http = config.http_connection(config.api_server)
57
+ http = control.http_connection(control.api_server)
52
58
 
53
59
  uri = "/deployments.xml"
54
60
 
55
- if NewRelic::Agent.config[:license_key].nil?
56
- raise "license_key was not set in newrelic.yml for #{config.env}"
61
+ if NewRelic::Agent.config[:license_key].nil? ||
62
+ NewRelic::Agent.config[:license_key].empty?
63
+ raise "license_key was not set in newrelic.yml for #{control.env}"
57
64
  end
58
65
  request = Net::HTTP::Post.new(uri, {'x-license-key' => NewRelic::Agent.config[:license_key]})
59
66
  request.content_type = "application/octet-stream"
@@ -70,12 +77,12 @@ class NewRelic::Command::Deployments < NewRelic::Command
70
77
  end
71
78
  rescue SystemCallError, SocketError => e
72
79
  # These include Errno connection errors
73
- err_string = "Transient error attempting to connect to #{config.api_server} (#{e})"
80
+ err_string = "Transient error attempting to connect to #{control.api_server} (#{e})"
74
81
  raise NewRelic::Command::CommandFailure.new(err_string)
75
82
  rescue NewRelic::Command::CommandFailure
76
83
  raise
77
84
  rescue => e
78
- err "Unexpected error attempting to connect to #{config.api_server}"
85
+ err "Unexpected error attempting to connect to #{control.api_server}"
79
86
  info "#{e}: #{e.backtrace.join("\n ")}"
80
87
  raise NewRelic::Command::CommandFailure.new(e.to_s)
81
88
  end
@@ -91,7 +98,7 @@ class NewRelic::Command::Deployments < NewRelic::Command
91
98
  "Default is app_name setting in newrelic.yml") { | e | @appname = e }
92
99
  o.on("-e", "--environment=name", String,
93
100
  "Override the (RAILS|MERB|RUBY|RACK)_ENV setting",
94
- "currently: #{config.env}") { | e | @environment = e }
101
+ "currently: #{control.env}") { | e | @environment = e }
95
102
  o.on("-u", "--user=USER", String,
96
103
  "Specify the user deploying, for information only",
97
104
  "Default: #{@user || '<none>'}") { | u | @user = u }
@@ -44,7 +44,18 @@ module NewRelic
44
44
  # init_config({}) which is called one or more times.
45
45
  #
46
46
  def init_plugin(options={})
47
- Agent.config.apply_config(Agent::Configuration::ManualSource.new(options), 1)
47
+ begin
48
+ path = @newrelic_file || Agent.config[:config_path]
49
+ yaml = Agent::Configuration::YamlSource.new(path, env)
50
+ Agent.config.replace_or_add_config(yaml, 1)
51
+ rescue ScriptError, StandardError => e
52
+ # Why do we need to do this?
53
+ new_err = e.class.new("Error reading newrelic.yml file: #{e}")
54
+ new_err.set_backtrace(e.backtrace)
55
+ raise new_err
56
+ end
57
+
58
+ Agent.config.replace_or_add_config(Agent::Configuration::ManualSource.new(options), 1)
48
59
  options['app_name'] = ENV['NEWRELIC_APP_NAME'] if ENV['NEWRELIC_APP_NAME']
49
60
  options['app_name'] ||= ENV['NEW_RELIC_APP_NAME'] if ENV['NEW_RELIC_APP_NAME']
50
61
 
@@ -131,32 +142,10 @@ module NewRelic
131
142
  File.expand_path(File.join(root,"config","newrelic.yml"))
132
143
  end
133
144
 
134
- # initializes the control instance with a local environment and
135
- # an optional config file override. Checks for the config file
136
- # and loads it.
137
145
  def initialize local_env, config_file_override=nil
138
146
  @local_env = local_env
139
147
  @instrumentation_files = []
140
- newrelic_file = config_file_override || config_file
141
- # Next two are for populating the newrelic.yml via erb binding, necessary
142
- # when using the default newrelic.yml file
143
- generated_for_user = ''
144
- license_key=''
145
- if !File.exists?(newrelic_file)
146
- puts "Cannot find or read #{newrelic_file}"
147
- @yaml = {}
148
- else
149
- @yaml = load_newrelic_yml(newrelic_file, binding)
150
- end
151
- rescue ScriptError, StandardError => e
152
- new_err = e.class.new("Error reading newrelic.yml file: #{e}")
153
- new_err.set_backtrace(e.backtrace)
154
- raise new_err
155
- end
156
-
157
- def load_newrelic_yml(path, binding)
158
- Agent.config.apply_config(Agent::Configuration::YamlSource.new(path, env), 1)
159
- YAML.load(ERB.new(File.read(path)).result(binding))
148
+ @newrelic_file = config_file_override || config_file
160
149
  end
161
150
 
162
151
  def root
@@ -4,7 +4,7 @@ module NewRelic
4
4
  MAJOR = 3
5
5
  MINOR = 4
6
6
  TINY = 2
7
- BUILD = 'beta1' # Set to nil for a release, 'beta1', 'alpha', etc for prerelease builds
7
+ BUILD = nil # Set to nil for a release, 'beta1', 'alpha', etc for prerelease builds
8
8
  STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
9
9
  end
10
10
 
data/newrelic_rpm.gemspec CHANGED
@@ -5,13 +5,13 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "newrelic_rpm"
8
- s.version = "3.4.2.beta1"
8
+ s.version = "3.4.2"
9
9
 
10
10
  s.authors = ["Bill Kayser", "Jon Guymon", "Justin George", "Darin Swanson", "Rob Saul"]
11
- s.date = "2012-08-31"
11
+ s.date = "2012-09-06"
12
12
  s.description = "New Relic is a performance management system, developed by New Relic,\nInc (http://www.newrelic.com). New Relic provides you with deep\ninformation about the performance of your web application as it runs\nin production. The New Relic Ruby Agent is dual-purposed as a either a\nGem or plugin, hosted on\nhttp://github.com/newrelic/rpm/\n"
13
13
  s.email = "support@newrelic.com"
14
- s.executables = ["newrelic", "mongrel_rpm", "newrelic_cmd"]
14
+ s.executables = ["newrelic_cmd", "newrelic", "mongrel_rpm"]
15
15
  s.extra_rdoc_files = [
16
16
  "CHANGELOG",
17
17
  "LICENSE",
@@ -22,7 +22,6 @@ Gem::Specification.new do |s|
22
22
  "CHANGELOG",
23
23
  "LICENSE",
24
24
  "README.rdoc",
25
- "ReleaseNotes.md",
26
25
  "bin/mongrel_rpm",
27
26
  "bin/newrelic",
28
27
  "bin/newrelic_cmd",
@@ -1,6 +1,7 @@
1
1
  ENV['SKIP_RAILS'] = 'true'
2
2
  require File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper'))
3
3
  require "new_relic/agent/browser_monitoring"
4
+ require "new_relic/rack/browser_monitoring"
4
5
  require 'ostruct'
5
6
 
6
7
  class NewRelic::Agent::BrowserMonitoringTest < Test::Unit::TestCase
@@ -370,7 +371,8 @@ var e=document.createElement("script");'
370
371
  request ||= Rack::Request.new('X-NewRelic-Mobile-Trace' => 'true')
371
372
  response = Rack::Response.new
372
373
  txn_data = OpenStruct.new(:transaction_name => 'a transaction name',
373
- :start_time => 5)
374
+ :start_time => 5,
375
+ :force_persist_sample? => false)
374
376
  NewRelic::Agent::TransactionInfo.set(txn_data)
375
377
  NewRelic::Agent::BrowserMonitoring.insert_mobile_response_header(request, response)
376
378
  response
@@ -111,6 +111,18 @@ module NewRelic::Agent::Configuration
111
111
  @manager.flattened_config)
112
112
  end
113
113
 
114
+ def test_replacing_a_layer_by_class
115
+ old_config = NewRelic::Agent::Configuration::ManualSource.new(:test => 'wrong')
116
+ @manager.apply_config(old_config, 1)
117
+ new_config = NewRelic::Agent::Configuration::ManualSource.new(:test => 'right')
118
+ @manager.replace_or_add_config(new_config)
119
+
120
+ assert_equal 'right', @manager[:test]
121
+ assert_equal 3, @manager.config_stack.size
122
+ assert_equal 1, @manager.config_stack.map{|s| s.class} \
123
+ .index(NewRelic::Agent::Configuration::ManualSource)
124
+ end
125
+
114
126
  class TestSource < ::Hash
115
127
  def test_config_accessor
116
128
  'some value'
@@ -171,16 +171,18 @@ class NewRelic::Agent::TransationSampleBuilderTest < Test::Unit::TestCase
171
171
  end
172
172
 
173
173
  def test_trace_should_not_record_more_than_segment_limit
174
- @builder.segment_limit = 3
175
- 8.times {|i| build_segment i.to_s }
176
- assert_equal 3, @builder.sample.count_segments
174
+ with_config(:'transaction_tracer.limit_segments' => 3) do
175
+ 8.times {|i| build_segment i.to_s }
176
+ assert_equal 3, @builder.sample.count_segments
177
+ end
177
178
  end
178
179
 
179
180
  # regression
180
181
  def test_trace_should_log_segment_reached_once
181
- @builder.segment_limit = 3
182
- NewRelic::Control.instance.log.expects(:debug).once
183
- 8.times {|i| build_segment i.to_s }
182
+ with_config(:'transaction_tracer.limit_segments' => 3) do
183
+ NewRelic::Control.instance.log.expects(:debug).once
184
+ 8.times {|i| build_segment i.to_s }
185
+ end
184
186
  end
185
187
 
186
188
  def validate_builder(check_names = true)
@@ -49,32 +49,10 @@ class NewRelic::Agent::TransactionSamplerTest < Test::Unit::TestCase
49
49
  assert_equal(default_value, @sampler.instance_variable_get('@' + variable.to_s))
50
50
  end
51
51
 
52
- segment_limit = @sampler.instance_variable_get('@segment_limit')
53
- assert(segment_limit.is_a?(Numeric), "Segment limit should be numeric")
54
- assert(segment_limit > 0, "Segment limit should be above zero")
55
-
56
- stack_trace_threshold = @sampler.instance_variable_get('@stack_trace_threshold')
57
- assert(stack_trace_threshold.is_a?((0.1).class), "Stack trace threshold should be a #{(0.1).class.inspect}, but is #{stack_trace_threshold.inspect}")
58
- assert(stack_trace_threshold > 0.0, "Stack trace threshold should be above zero")
59
-
60
52
  lock = @sampler.instance_variable_get('@samples_lock')
61
53
  assert(lock.is_a?(Mutex), "Samples lock should be a mutex, is: #{lock.inspect}")
62
54
  end
63
55
 
64
- def test_configure
65
- test_config = {
66
- 'transaction_tracer.stack_trace_threshold' => 5.0,
67
- 'transaction_tracer.limit_segments' => 20,
68
- 'transaction_tracer.explain_threshold' => 4.0
69
- }
70
- with_config(test_config) do
71
- @sampler.configure!
72
- assert_equal 20, @sampler.instance_variable_get('@segment_limit')
73
- assert_equal 5.0, @sampler.instance_variable_get('@stack_trace_threshold')
74
- assert_equal 4.0, @sampler.instance_variable_get('@explain_threshold')
75
- end
76
- end
77
-
78
56
  def test_current_sample_id_default
79
57
  builder = mock('builder')
80
58
  builder.expects(:sample_id).returns(11111)
@@ -437,19 +415,21 @@ class NewRelic::Agent::TransactionSamplerTest < Test::Unit::TestCase
437
415
  end
438
416
 
439
417
  def test_append_backtrace_under_duration
440
- @sampler.instance_eval { @stack_trace_threshold = 2.0 }
441
- segment = mock('segment')
442
- segment.expects(:[]=).with(:backtrace, any_parameters).never
443
- @sampler.append_backtrace(mock('segment'), 1.0)
418
+ with_config(:'transaction_tracer.stack_trace_threshold' => 2.0) do
419
+ segment = mock('segment')
420
+ segment.expects(:[]=).with(:backtrace, any_parameters).never
421
+ @sampler.append_backtrace(mock('segment'), 1.0)
422
+ end
444
423
  end
445
424
 
446
425
  def test_append_backtrace_over_duration
447
- @sampler.instance_eval { @stack_trace_threshold = 2.0 }
448
- segment = mock('segment')
449
- # note the mocha expectation matcher - you can't hardcode a
450
- # backtrace so we match on any string, which should be okay.
451
- segment.expects(:[]=).with(:backtrace, instance_of(String))
452
- @sampler.append_backtrace(segment, 2.5)
426
+ with_config(:'transaction_tracer.stack_trace_threshold' => 2.0) do
427
+ segment = mock('segment')
428
+ # note the mocha expectation matcher - you can't hardcode a
429
+ # backtrace so we match on any string, which should be okay.
430
+ segment.expects(:[]=).with(:backtrace, instance_of(String))
431
+ @sampler.append_backtrace(segment, 2.5)
432
+ end
453
433
  end
454
434
 
455
435
  def test_notice_sql_recording_sql
@@ -494,12 +474,13 @@ class NewRelic::Agent::TransactionSamplerTest < Test::Unit::TestCase
494
474
  end
495
475
 
496
476
  def test_harvest_with_previous_samples
497
- sample = mock('sample')
498
- @sampler.expects(:disabled).returns(false)
499
- @sampler.expects(:add_samples_to).with([sample], 2.0).returns([sample])
500
- @sampler.instance_eval { @segment_limit = 2000 }
501
- sample.expects(:truncate).with(2000)
502
- assert_equal([sample], @sampler.harvest([sample]))
477
+ with_config(:'transaction_tracer.limit_segments' => 2000) do
478
+ sample = mock('sample')
479
+ @sampler.expects(:disabled).returns(false)
480
+ @sampler.expects(:add_samples_to).with([sample], 2.0).returns([sample])
481
+ sample.expects(:truncate).with(2000)
482
+ assert_equal([sample], @sampler.harvest([sample]))
483
+ end
503
484
  end
504
485
 
505
486
  def test_add_random_sample_to_not_random_sampling
@@ -854,39 +835,36 @@ class NewRelic::Agent::TransactionSamplerTest < Test::Unit::TestCase
854
835
  end
855
836
 
856
837
  def test_stack_trace__sql
857
- @sampler.stack_trace_threshold = 0
838
+ with_config(:'transaction_tracer.stack_trace_threshold' => 0) do
839
+ @sampler.notice_first_scope_push Time.now.to_f
840
+ @sampler.notice_sql("test", nil, 1)
841
+ segment = @sampler.send(:builder).current_segment
858
842
 
859
- @sampler.notice_first_scope_push Time.now.to_f
860
-
861
- @sampler.notice_sql("test", nil, 1)
862
-
863
- segment = @sampler.send(:builder).current_segment
864
-
865
- assert segment[:sql]
866
- assert segment[:backtrace]
843
+ assert segment[:sql]
844
+ assert segment[:backtrace]
845
+ end
867
846
  end
868
847
 
869
848
  def test_stack_trace__scope
870
- @sampler.stack_trace_threshold = 0
871
- t = Time.now
872
- @sampler.notice_first_scope_push t.to_f
873
- @sampler.notice_push_scope 'Bill', (t+1).to_f
849
+ with_config(:'transaction_tracer.stack_trace_threshold' => 0) do
850
+ t = Time.now
851
+ @sampler.notice_first_scope_push t.to_f
852
+ @sampler.notice_push_scope 'Bill', (t+1).to_f
874
853
 
875
- segment = @sampler.send(:builder).current_segment
876
- assert segment[:backtrace]
854
+ segment = @sampler.send(:builder).current_segment
855
+ assert segment[:backtrace]
856
+ end
877
857
  end
878
858
 
879
859
  def test_nil_stacktrace
880
- @sampler.stack_trace_threshold = 2
881
-
882
- @sampler.notice_first_scope_push Time.now.to_f
883
-
884
- @sampler.notice_sql("test", nil, 1)
860
+ with_config(:'transaction_tracer.stack_trace_threshold' => 2) do
861
+ @sampler.notice_first_scope_push Time.now.to_f
862
+ @sampler.notice_sql("test", nil, 1)
863
+ segment = @sampler.send(:builder).current_segment
885
864
 
886
- segment = @sampler.send(:builder).current_segment
887
-
888
- assert segment[:sql]
889
- assert_nil segment[:backtrace]
865
+ assert segment[:sql]
866
+ assert_nil segment[:backtrace]
867
+ end
890
868
  end
891
869
 
892
870
  def test_big_sql
@@ -10,6 +10,8 @@ class NewRelic::Command::DeploymentsTest < Test::Unit::TestCase
10
10
  def info(message); @messages = @messages ? @messages + message : message; end
11
11
  def just_exit(status=0); @exit_status ||= status; end
12
12
  end
13
+ @config = { :license_key => 'a' * 40 }
14
+ NewRelic::Agent.config.apply_config(@config)
13
15
  end
14
16
  def teardown
15
17
  super
@@ -17,6 +19,7 @@ class NewRelic::Command::DeploymentsTest < Test::Unit::TestCase
17
19
  puts @deployment.errors
18
20
  puts @deployment.messages
19
21
  puts @deployment.exit_status
22
+ NewRelic::Agent.config.remove_config(@config)
20
23
  end
21
24
  def test_help
22
25
  begin
@@ -33,7 +36,10 @@ class NewRelic::Command::DeploymentsTest < Test::Unit::TestCase
33
36
  end
34
37
  def test_interactive
35
38
  mock_the_connection
36
- @deployment = NewRelic::Command::Deployments.new :appname => 'APP', :revision => 3838, :user => 'Bill', :description => "Some lengthy description"
39
+ @deployment = NewRelic::Command::Deployments.new(:appname => 'APP',
40
+ :revision => 3838,
41
+ :user => 'Bill',
42
+ :description => "Some lengthy description")
37
43
  assert_nil @deployment.exit_status
38
44
  assert_nil @deployment.errors
39
45
  assert_equal '3838', @deployment.revision
@@ -58,13 +64,12 @@ class NewRelic::Command::DeploymentsTest < Test::Unit::TestCase
58
64
  end
59
65
 
60
66
  def test_error_if_no_license_key
61
- config = { 'license_key' => nil }
62
- NewRelic::Agent.config.apply_config(config)
67
+ with_config(:license_key => '') do
63
68
  assert_raise NewRelic::Command::CommandFailure do
64
- deployment = NewRelic::Command::Deployments.new(%w[-a APP -r 3838 --user=Bill] << "Some lengthy description")
69
+ deployment = NewRelic::Command::Deployments.new(%w[-a APP -r 3838 --user=Bill] << "Some lengthy description")
65
70
  deployment.run
66
71
  end
67
- NewRelic::Agent.config.remove_config(config)
72
+ end
68
73
  end
69
74
 
70
75
  private
@@ -204,7 +204,7 @@ class NewRelic::Control::LoggingMethodsTest < Test::Unit::TestCase
204
204
  end
205
205
 
206
206
  def reset_environment_config
207
- NewRelic::Agent::Configuration.manager.config_stack[0] =
207
+ NewRelic::Agent.config.config_stack[0] =
208
208
  NewRelic::Agent::Configuration::EnvironmentSource.new
209
209
  end
210
210
  end
@@ -223,11 +223,4 @@ class NewRelic::ControlTest < Test::Unit::TestCase
223
223
  assert_equal [], NewRelic::Agent.instance.stats_engine.send(:harvest_samplers)
224
224
  end
225
225
  end
226
-
227
- private
228
-
229
- def reset_environment_config
230
- NewRelic::Agent::Configuration.manager.config_stack[0] =
231
- NewRelic::Agent::Configuration::EnvironmentSource.new
232
- end
233
226
  end
data/test/test_helper.rb CHANGED
@@ -121,8 +121,11 @@ end
121
121
  def with_config(config_hash, level=0)
122
122
  config = NewRelic::Agent::Configuration::DottedHash.new(config_hash)
123
123
  NewRelic::Agent.config.apply_config(config, level)
124
- yield
125
- NewRelic::Agent.config.remove_config(config)
124
+ begin
125
+ yield
126
+ ensure
127
+ NewRelic::Agent.config.remove_config(config)
128
+ end
126
129
  end
127
130
 
128
131
  module TransactionSampleTestHelper
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- hash: -3470574200
5
- prerelease: 6
4
+ hash: 19
5
+ prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 4
9
9
  - 2
10
- - beta
11
- - 1
12
- version: 3.4.2.beta1
10
+ version: 3.4.2
13
11
  platform: ruby
14
12
  authors:
15
13
  - Bill Kayser
@@ -21,7 +19,7 @@ autorequire:
21
19
  bindir: bin
22
20
  cert_chain: []
23
21
 
24
- date: 2012-08-31 00:00:00 Z
22
+ date: 2012-09-06 00:00:00 Z
25
23
  dependencies:
26
24
  - !ruby/object:Gem::Dependency
27
25
  name: jeweler
@@ -75,9 +73,9 @@ description: |
75
73
 
76
74
  email: support@newrelic.com
77
75
  executables:
76
+ - newrelic_cmd
78
77
  - newrelic
79
78
  - mongrel_rpm
80
- - newrelic_cmd
81
79
  extensions: []
82
80
 
83
81
  extra_rdoc_files:
@@ -89,7 +87,6 @@ files:
89
87
  - CHANGELOG
90
88
  - LICENSE
91
89
  - README.rdoc
92
- - ReleaseNotes.md
93
90
  - bin/mongrel_rpm
94
91
  - bin/newrelic
95
92
  - bin/newrelic_cmd
@@ -414,14 +411,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
414
411
  required_rubygems_version: !ruby/object:Gem::Requirement
415
412
  none: false
416
413
  requirements:
417
- - - ">"
414
+ - - ">="
418
415
  - !ruby/object:Gem::Version
419
- hash: 25
416
+ hash: 3
420
417
  segments:
421
- - 1
422
- - 3
423
- - 1
424
- version: 1.3.1
418
+ - 0
419
+ version: "0"
425
420
  requirements: []
426
421
 
427
422
  rubyforge_project:
data/ReleaseNotes.md DELETED
@@ -1,638 +0,0 @@
1
-
2
-
3
- # New Relic Ruby Agent Release Notes #
4
-
5
- ### current version ###
6
- ## v3.4.0 ##
7
- #### New Feature(s) ####
8
- * Major refactor of data transmission mechanism. This enabled child processes to send data to parent processes, which then send the data to the New Relic service. This should only affect Resque users, dramatically improving their experience.
9
-
10
- #### Bug Fixes ####
11
- * Resolve issue with configuring the Error Collector when using server-side configuration.
12
-
13
- #### Changes ####
14
- * Moved Resque instrumentation from rpm_contrib to main agent. Resque users should discontinue use of rpm_contrib or upgrade to 2.1.11.
15
-
16
- ## v3.3.5
17
- * Replaced "Custom/DJ Locked Jobs" metric with three new metrics for monitoring DelayedJob: queue_length, failed_jobs, and locked_jobs, all under Workers/DelayedJob
18
- * Fix allowing instrumentation of methods ending in '?' or '!'
19
- * Limit scanning first 50k of the response in RUM auto-instrumentation.
20
- Fix keeping exception from being raised when when extracting metrics from SQL queries with non UTF-8 bytes
21
-
22
- ### Replaced "Custom/DJ Locked Jobs" metric ###
23
- The agent had DJ instrumentation which would poll for locked jobs. The old metrics were removed and three new ones added:
24
- * queue_length: The number of jobs sampled which have a "run_at" value in the past and have a failed_at of NULL.
25
- * failed_jobs: The number of jobs where failed_at is non null
26
- * locked_jobs: The number of jobs currently in the locked state.
27
- all under Workers/DelayedJob
28
-
29
- ### Fix allowing instrumentation of methods ending in '?' or '!' ###
30
- Transaction and method tracers failed for methods the end punctuation such as ! or ? in them. The fix corrects code that would attempt to create new methods with the punctuation in the middle, thereby causing a syntax error.
31
-
32
- ### Limit scanning first 50k of the response in RUM auto-instrumentation. ###
33
- When there are no body tags (like on an ajax response) and the response is very large, the agent will spend a very large amount of time scanning the response (twice!) for the body tags. This can cause the browser to timeout in the worst case. This fix limits the scanning done by the auto-instrumentation code to the first 50k of the response.
34
-
35
- ### Fix keeping exception from being raised when when extracting metrics from SQL queries with non UTF-8 bytes ###
36
- When a query contains invalid UTF-8 bytes (e.g. from binary data) running a regex match will raise an exception. Coercing the data to a binary encoding seems to fix the problem.
37
- ### Older releases ###
38
- v3.3.5
39
- * [FIX] Allow tracing of methods ending in ! and ?
40
- * [PERF] Give up after scanning first 50k of the response in RUM
41
- auto-instrumentation.
42
- * [FIX] Don't raise when extracting metrics from SQL queries with non UTF-8 bytes.
43
- * Replaced "Custom/DJ Locked Jobs" metric with new metrics for
44
- monitoring DelayedJob: queue_length, failed_jobs, and locked_jobs, all under
45
- Workers/DelayedJob. queue_length is also broken out by queue name or priority
46
- depending on the version of DelayedJob deployed.
47
-
48
- v3.3.4.1
49
- * Bug fix when rendering empty collection in Rails 3.1+
50
-
51
- v3.3.4
52
- * Rails 3 view instrumentation
53
-
54
- v3.3.3
55
- * Improved Sinatra instrumentation
56
- * Limit the number of nodes collected in long running transactions to prevent leaking memory
57
-
58
- v3.3.2.1
59
- * [SECURITY] fix for cookie handling by End User Monitoring instrumentation
60
-
61
- v3.3.2
62
- * deployments recipe change: truncate git SHAs to 7 characters
63
- * Fixes for obfuscation of PostgreSQL and SQLite queries
64
- * Fix for lost database connections when using a forking framework
65
- * Workaround for RedHat kernel bug which prevented blocking reads of /proc fs
66
- * Do not trap signals when handling exceptions
67
-
68
- v3.3.1
69
- * improved Ruby 1.8.6 support
70
- * fix for issues with RAILS_ROOT deprecation warnings
71
- * fixed incorrect 1.9 GC time reporting
72
- * obfusction for Slow SQL queries respects transaction trace config
73
- * fix for RUM instrumentation repoting bad timing info in some cases
74
- * refactored ActiveRecord instrumentation, no longer requires Rails
75
-
76
- v3.3.0
77
- * fix for GC instrumentation when using Ruby 1.9
78
- * new feature to correlate browser and server transaction traces
79
- * new feature to trace slow sql statements
80
- * fix to help cope with malformed rack responses
81
- * do not try to instrument versions of ActiveMerchant that are too old
82
-
83
- v3.2.0.1
84
- * Updated LICENSE
85
- * Updated links to support docs
86
-
87
- v3.2.0
88
- * Fix over-detection of mongrel and unicorn and only start the agent when
89
- actual server is running
90
- * Improve developer mode backtraces to support ruby 1.9.2, windows
91
- * Fixed some cases where Memcache instrumentation was failing to load
92
- * Ability to set log destination by NEW_RELIC_LOG env var
93
- * Fix to mutex lib load issue
94
- * Performance enhancements (thanks to Jeremy Kemper)
95
- * Fix overly verbose STDOUT message (thanks to Anselm Helbig)
96
-
97
- v3.1.2
98
- * Fixed some thread safety issues
99
- * Work around for Ruby 1.8.7 Marshal crash bug
100
- * Numerous community patches (Gabriel Horner, Bradley Harris, Diego Garcia,
101
- Tommy Sullivan, Greg Hazel, John Thomas Marino, Paul Elliott, Pan Thomakos)
102
- * Fixed RUM instrumentation bug
103
-
104
- v3.1.1
105
- * Support for Rails 3.1 (thanks to Ben Hoskings via github)
106
- * Support for Rubinius
107
- * Fixed issues affecting some Delayed Job users where log files were not appearing
108
- * Fixed an issue where some instrumentation might not get loaded in Rails apps
109
- * Fix for memcached cas method (thanks to Andrew Long and Joseph Palermo )
110
- * Fix for logger deprecation warning (thanks to Jonathan del Strother via github)
111
- * Support for logging to STDOUT
112
- * Support for Spymemcached client on jruby
113
-
114
- v3.1.0
115
- * Support for aggregating data from short-running
116
- processes to reduce reporting overhead
117
- * Numerous bug fixes
118
- * Increased unit test coverage
119
-
120
- v3.0.1
121
- * Updated Real User Monitoring to reduce javascript size and improve
122
- compatibility, fix a few known bugs
123
-
124
- v3.0.0
125
- * Support for Real User Monitoring
126
- * Back end work on internals to improve reliability
127
- * added a 'log_file_name' and 'log_file_path' configuration variable to allow
128
- setting the path and name of the agent log file
129
- * Improve reliability of statistics calculations
130
- * Remove some previously deprecated methods
131
- * Remove Sequel instrumentation pending more work
132
-
133
- v2.14.1
134
- * Avoid overriding methods named 'log' when including the MethodTracer module
135
- * Ensure that all load paths for 'new_relic/agent' go through 'new_relic/control' first
136
- * Remove some debugging output from tests
137
-
138
- v2.14.0
139
- * Dependency detection framework to prevent multi-loading or early-loading
140
- of instrumentation files
141
-
142
- v2.13.5
143
- * Moved the API helper to the github newrelic_api gem.
144
- * Revamped queue time to include server, queue, and middleware time
145
- * Increased test coverage and stability
146
- * Add Trinidad as a dispatcher (from Calavera, on github)
147
- * Sequel instrumentation from Aman Gupta
148
- * patches to 1.9 compatibility from dkastner on github
149
- * Support for 1.9.2's garbage collection instrumentation from Justin Weiss
150
- * On Heroku, existing queue time headers will be detected
151
- * Fix rack constant scoping in dev mode for 1.9 (Rack != ::Rack)
152
- * Fixes for instrumentation loading failing on Exception classes that
153
- are not subclasses of StandardError
154
- * Fix active record instrumentation load order for Rails 3
155
-
156
- v2.13.4
157
- * Update DNS lookup code to remove hardcoded IP addresses
158
-
159
- v2.13.3
160
- * Dalli instrumentation from Mike Perham (thanks Mike)
161
- * Datamapper instrumentation from Jordan Ritter (thanks Jordan)
162
- * Apdex now defaults to 0.5
163
- !!! Please be aware that if you are not setting an apdex,
164
- !!! this will cause a change in the apparent performance of your app.
165
- * Make metric hashes threadsafe (fixes problems sending metrics in Jruby
166
- threaded code)
167
- * Delete obsolete links to metric docs in developer mode
168
- * Detect gems when using Bundler
169
- * Fix newrelic_ignore in Rails 3
170
- * Break metric parser into a seperate vendored gem
171
- * When using Unicorn, preload_app: true is recommended to get proper
172
- after_fork behavior.
173
-
174
- v2.13.2
175
- * Remove a puts. Yes, a whole release for a puts.
176
-
177
- v2.13.1
178
- * Add missing require in rails 3 framework control
179
-
180
- v2.13.0
181
- * developer mode is now a rack middleware and can be used on any framework;
182
- it is no longer supported automatically on versions of Rails prior to 2.3;
183
- see README for details
184
- * memcache key recording for transaction traces
185
- * use system_timer gem if available, fall back to timeout lib
186
- * address instability issues in JRuby 1.2
187
- * renamed executable 'newrelic_cmd' to 'newrelic'; old name still supported
188
- for backward compatibility
189
- * added 'newrelic install' command to install a newrelic.yml file in the
190
- current directory
191
- * optimization to execution time measurement
192
- * optimization to startup sequence
193
- * change startup sequence so that instrumentation is installed after all
194
- other gems and plugins have loaded
195
- * add option to override automatic flushing of data on exit--send_data_on_exit
196
- defaults to 'true'
197
- * ignored errors no longer affect apdex score
198
- * added record_transaction method to the api to allow recording
199
- details from web and background transactions occurring outside RPM
200
- * fixed a bug related to enabling a gold trial / upgrade not sending
201
- trasaction traces correctly
202
-
203
- v2.12.3
204
- * fix regression in startup sequence
205
-
206
- v2.12.2
207
- * fix for regression in Rails 2.1 inline rendering
208
- * workaround bug found in some rubies that caused a segv and/or NoMemoryError
209
- when deflating content for upload
210
- * avoid creating connection thread in unicorn/passenger spawners
211
-
212
- v2.12.1
213
- * fix bug in profile mode
214
- * fix race condition in Delayed::Job instrumentation loading
215
- * fix glassfish detection in latest glassfish gem
216
-
217
- v2.12.0
218
- * support basic instrumentation for ActsAsSolr and Sunspot
219
-
220
- v2.11.3
221
- * fix bug in startup when running JRuby
222
-
223
- v2.11.2
224
- * fix for unicorn not reporting when the proc line had 'master' in it
225
- * fix regression for passenger 2.0 and earlier
226
- * fix after_fork in the shim
227
-
228
- v2.11.1
229
- * republished gem without generated rdocs
230
-
231
- v2.11.0
232
- * rails3 instrumentation (no developer mode support yet)
233
- * removed the ensure_worker_thread started and instead defined an after_fork
234
- handler that will set up the agent properly in forked processes.
235
- * change at_exit handler so the shutdown always goes after other shutdown
236
- handlers
237
- * add visibility to active record db transactions in the rpm transaction
238
- traces (thanks to jeremy kemper)
239
- * fix regression in merb support which caused merb apps not to start
240
- * added NewRelic::Agent.logger to the public api to write to the agent
241
- log file.
242
- * optimizations to background thread, controller instrumentation, memory
243
- usage
244
- * add logger method to public_api
245
- * support list notation for ignored exceptions in the newrelic.yml
246
-
247
- v2.10.8
248
- * fix bug in delayed_job instrumentation that caused the job queue sampler
249
- to run in the wrong place
250
- * change startup sequence and code that restarts the worker loop
251
- thread
252
- * detect the unicorn master and dont start the agent; hook in after_fork
253
- * fix problem with the Authlogic metric names which caused errors in
254
- developer mode. Authlogic metrics now adhere to the convention of
255
- prefixing the name with 'Custom'
256
- * allow more correct overriding of transaction trace settings in the
257
- call to #manual_start
258
- * simplify WorkerLoop and add better protection for concurrency
259
- * preliminary support for rails3
260
-
261
- v2.10.6
262
- * fix missing URL and referer on some traced errors and transactions
263
- * gather traced errors *after* executing the rescue chain in ActionController
264
- * always load controller instrumentation
265
- * pick up token validation from newrelic.yml
266
-
267
- v2.10.5
268
- * fix bug in delayed_job instrumentation occurring when there was no DJ log
269
-
270
- v2.10.4
271
- * fix incompatibility with Capistrano 2.5.16
272
- * strip down URLs reported in transactions and errors to path only
273
-
274
- v2.10.3
275
- * optimization to reduce overhead: move background samplers into foreground thread
276
- * change default config file to ignore RoutingErrors
277
- * moved the background task instrumentation into a separate tab in the RPM UI
278
- * allow override of the RPM application name via NEWRELIC_APP_NAME environment variable
279
- * revised Delayed::Job instrumentation so no manual_start is required
280
- * send buffered data on shutdown
281
- * expanded support for queue length and queue time
282
- * remove calls to starts_with to fix Sinatra and non-rails deployments
283
- * fix problem with apdex scores recording too low in some circumstances
284
- * switch to jeweler for gem building
285
- * minor fixes, test improvements, doc and rakefile improvements
286
- * fix incompatibility with Hoptoad where Hoptoad was not getting errors handled by New Relic
287
- * many other optimizations, bug fixes and documentation improvements
288
-
289
- v2.10.2.
290
- * beta release of 2.10
291
- * fix bugs with Sinatra app instrumentation
292
- * minor doc updates
293
-
294
- v2.10.1.
295
- * alpha release of 2.10
296
- * rack support, including metal; ignores 404s; requires a module inclusion (see docs)
297
- * sinatra support, displays actions named by the URI pattern matched
298
- * add API method to abort transaction recording for in-flight transactions
299
- * remove account management calls from newrelic_api.rb
300
- * truncating extremely large transaction traces for efficiency
301
- * fix error reporting in recipes; add newrelic_rails_env option to recipes to
302
- override the rails env used to pull the app_name out of newrelic.yml
303
- * added TorqueBox recognition (thanks Bob McWhirter)
304
- * renamed config settings: enabled => monitor_mode; developer => developer_mode;
305
- old names will still work in newrelic.yml
306
- * instrumentation for DelayedJob (thanks Travis Tilley)
307
- * added config switches to turn off certain instrumentation when you aren't
308
- interested in the metrics, to save on overhead--see newrelic.yml for details.
309
- * add profiling support to dev mode; very experimental!
310
- * add 'multi_threaded' config option to indicate when the app is running
311
- multi-threaded, so we can disable some instrumentation
312
- * fix test failures in JRuby, REE
313
- * improve Net::HTTP instrumentation so its more efficient and distinguishes calls
314
- between web and non-web transactions.
315
- * database instrumentation notices all database commands in addition to the core commands
316
- * add support for textmate to dev mode
317
- * added add_transaction_tracer method to support instrumenting methods as
318
- if they were web transactions; this will facilitate better visibility of background
319
- tasks and eventually things like rack, metal and Sinatra
320
- * adjusted apdex scores to reflect time spent in the mongrel queue
321
- * fixed incompatibility with JRuby on startup
322
- * implmented CPU measure for JRuby which reflects the cpu burn for
323
- all controller actions (does not include background tasks)
324
- * fixed scope issue with GC instrumentation, subtracting time from caller
325
- * added # of GC calls to GC instrumentation
326
- * renamed the dispatcher metric
327
- * refactored stats_engine code for readability
328
- * optimization: reduce wakeup times for harvest thread
329
-
330
- v2.10.0.
331
- * alpha release of 2.10
332
- * support unicorn
333
- * instrumentation of GC for REE and MRE with GC patch
334
- * support agent restarting when changes are made to the account
335
- * removed #newrelic_notice_error from Object class, replaced by NewRelic::Agent#notic_error
336
- * collect histogram statistics
337
- * add custom parameters to newrelic_notice_error call to display
338
- extra info for errors
339
- * add method disable_all_tracing(&block) to execute a block without
340
- capturing metrics
341
- * newrelic_ignore now blocks all instrumentation collection for
342
- the specified actions
343
- * added doc to method_tracer API and removed second arg
344
- requirement for add_method_tracer call
345
- * instrumentation for Net::HTTP
346
- * remove method_tracer shim to avoid timing problems in monitoring daemons
347
- * for non-rails daemons, look at APP_ROOT and NRCONFIG env vars for custom locations
348
-
349
- v2.9.9.
350
- * Disable at_exit handler for Unicorn which sometimes caused the
351
- agent to stop reporting immediately.
352
-
353
- v2.9.8.
354
- * add instrumentation for Net::HTTP calls, to show up as "External"
355
- * added support for validating agents in the cloud.
356
- * recognize Unicorn dispatcher
357
- * add NewRelic module definitions to ActiveRecord instrumentation
358
-
359
- v2.9.5.
360
- * Snow Leopard memory fix
361
-
362
- v2.9.4.
363
- * clamp size of data sent to server
364
- * reset statistics for passenger when forking to avoid erroneous data
365
- * fix problem deserializing errors from the server
366
- * fix incompatibility with postgres introduced in 2.9.
367
-
368
- v2.9.3.
369
- * fix startup failure in Windows due to memory sampler
370
- * add JRuby environment information
371
-
372
- v2.9.2.
373
- * change default apdex_t to 0.5 seconds
374
- * fix bug in deployments introduced by multi_homed setting
375
- * support overriding the log in the agent api
376
- * fix JRuby problem using objectspace
377
- * display custom parameters when looking at transactions in dev mode
378
- * display count of sql statements on the list of transactions in dev mode
379
- * fixes for merb--thanks to Carl Lerche
380
-
381
- v2.9.1.
382
- * add newrelic_ignore_apdex method to controller classes to allow
383
- you to omit some actions from apdex statistics
384
- * Add hook for Passenger shutdown events to get more timely shutdown
385
- notices; this will help in more accurate memory readings in
386
- Passenger
387
- * add newrelic_notice_error to Object class
388
- * optional ability to verify SSL certificates, note that this has some
389
- performance and reliability implications
390
- * support multi-homed host with multiple apps running on duplicate
391
- ports
392
-
393
- v2.9.0.
394
- Noteworthy Enhancements
395
- * give visibility to templates and partials in Rails 2.1 and later, in
396
- dev mode and production
397
- * change active record metrics to capture statistics in adapter log()
398
- call, resulting in lower overhead and improved visibility into
399
- different DB operations; only AR operations that are not hitting the
400
- query cache will be measured to avoid overhead
401
- * added mongrel_rpm to the gem, a standalone daemon listening for custom
402
- metric values sent from local processes (experimental); do mongrel_rpm
403
- --help
404
- * add API for system monitoring daemons (refer to KB articles); changed
405
- API for manual starting of the agent; refer to
406
- NewRelic::Agent.manual_start for details
407
- * do certificate verification on ssl connections to
408
- collector.newrelic.com
409
- * support instances appearing in more than one application by allowing a
410
- semicolon separated list of names for the newrelic.yml app_name
411
- setting.
412
- * combined agent logfiles into a single logfile
413
- * use rpm server time for transaction traces rather than agent time
414
-
415
- Developer Mode (only) Enhancements
416
- * show partial rendering in traces
417
- * improved formatting of metric names in traces
418
- * added number of queries to transactions in the transaction list
419
- * added some sorting options for the transaction list
420
- * added a page showing the list of active threads
421
-
422
- Compatibility Enhancements
423
- * ruby 1.9.1 compatibility
424
- * support concurrency when determining busy times, for 2.2 compatibility
425
- * in jruby, use Java used heap for memory sampling if the system memory
426
- is not accessible from an unsupported platform
427
- * jruby will no longer start the agent now when running the console or
428
- rake tasks
429
- * API support for RPM as a footnote add-in
430
- * webrick support restored
431
-
432
- Noteworthy bugfixes
433
- * sample memory on linux by reading /proc/#{$$}/status file
434
- * fixed ambiguous 'View' metrics showing up in controller breakdown
435
- * removed Numeric extensions, including round_to, and to_ms
436
- * using a different timeout mechanism when we post data to RPM
437
- * remove usage of Rails::Info which had a side effect of enabling
438
- ActiveRecord even when it wasn't an active framework
439
- * moved CPU sampler off background thread and onto the harvest thread
440
- * tests now run cleanly in any rails app using test:newrelic or
441
- test:plugins
442
-
443
- Agent improvements to support future RPM enhancements
444
- * add instrumentation to capture metrics on response codes; not yet
445
- working in rails 2.3.*
446
- * added http referer to traced errors
447
- * capture gem requirements from rails
448
- * capture cpu utilization adjusted for processor count
449
- * transaction sampling
450
-
451
- v2.8.10.
452
- * fix thin support with rails 2.3.2 when using script/server
453
- * fix incompatibility with rails 2.3.2 and script/server options
454
- processing
455
- * minor tweak to environment gathering for gem mode
456
-
457
- v2.8.9.
458
- * fix problem finding the newrelic controller in dev mode
459
- * fix incompatibility with older versions of optparse
460
- * fix potential jvm problem with jruby
461
- * remove test:all task definition to avoid conflicts
462
- * change error message about window sampler in windows not supported to a
463
- warning message
464
-
465
- v2.8.8.
466
- * fix error with jruby on windows
467
- * fix problem where webrick was being incorrectly detected causing some
468
- problems with mongrel application assignments--had to disable webrick
469
- for now
470
-
471
- v2.8.7.
472
- * fix for ssl connection hanging problems
473
- * fix problem recognizing mongrel in rails 2.3.2
474
- * fastcgi support in rails 2.3.2
475
- * put back webrick support
476
-
477
- v2.8.6.
478
- * fix for capture_params when using file uploads in controller actions
479
- * use pure ruby NS lookup for collector host to eliminate possibly
480
- blocking applications
481
-
482
- v2.8.5.
483
- * fix reference to CommandError which was breaking some cap scripts
484
- * fix incompatibility with Rails 2.0 in the server API
485
- * fix problem with litespeed with Lite accounts
486
- * fix problem when ActiveRecord is disabled
487
- * moved merb instrumentation to Merb::Controller instead of
488
- AbstractController to address incompatibility with MailController
489
- * fix problem in devmode displaying sql with embedded urls
490
-
491
- v2.8.4.
492
- * fix bug in capistrano recipe causing cap commands to fail with error
493
- about not finding Version class
494
-
495
- v2.8.3.
496
- * refactor unit tests so they will run in a generic rails environment
497
- * require classes in advance to avoid autoloading. this is to address
498
- incompatibilities with desert as well as more flexibility in gem
499
- initialization
500
- * fixed newrelic_helper.rb 1.9 incompatibility
501
-
502
- v2.8.2.
503
- * fix Ruby 1.9 syntax compatibility errors
504
- * update the class loading sanity check, will notify server of errors
505
- * fix agent output on script and rake task execution
506
-
507
- v2.8.1.
508
- * Convert the deployment information upload script to an executable and
509
- put in the bin directory. When installed as a gem this command is
510
- symlinked to /usr/bin. Usage: newrelic_cmd deployments --help
511
- * Fix issue invoking api when host is not set in newrelic.yml
512
- * Fix deployments api so it will work from a gem
513
- * Fix thin incompatibility in developer mode
514
-
515
- v2.8.0.
516
- * add beta of api in new_relic_api.rb
517
- * instrumented dynamic finders in ActiveRecord
518
- * preliminary support for capturing deployment information via capistrano
519
- * change memory sampler for solaris to use /usr/bin/ps
520
- * allow ERB in newrelic.yml file
521
- * merged support for merb into this version
522
- * fix incompatibility in the developer mode with the safe_erb plugin
523
- * fix module namespace issue causing an error accessing
524
- NewRelic::Instrumentation modules
525
- * fix issue where the agent sometimes failed to start up if there was a
526
- transient network problem
527
- * fix IgnoreSilentlyException message
528
-
529
- v2.7.4.
530
- * fix error when trying to serialize some kinds of Enumerable objects
531
- * added extra debug logging
532
- * added app_name to app mapping
533
-
534
- v2.7.3.
535
- * fix compatibility issue with 1.8.5 causing error with Dir.glob
536
-
537
- v2.7.2.
538
- * fix problem with passenger edge not being a detected environment
539
-
540
- v2.7.1.
541
- * fix problem with skipped dispatcher instrumentation
542
-
543
- v2.7.0.
544
- * Repackage to support both plugin and Gem installation
545
- * Support passenger/litespeed/jruby application naming
546
- * Update method for calculating dispatcher queue time
547
- * Show stack traces in RPM Transaction Traces
548
- * Capture error source for TemplateErrors
549
- * Clean up error stack traces.
550
- * Support query plans from postgres
551
- * Performance tuning
552
- * bugfixes
553
-
554
- v2.5.3.
555
- * fix error in transaction tracing causing traces not to show up
556
-
557
- v2.5.2.
558
- * fixes for postgres explain plan support
559
-
560
- v2.5.1.
561
- * bugfixes
562
-
563
- v2.5.0.
564
- * add agent support for rpm 1.1 features
565
- * Fix regression error with thin support
566
-
567
- v2.4.3.
568
- * added 'newrelic_ignore' controller class method with :except and :only options for finer grained control
569
- over the blocking of instrumentation in controllers.
570
- * bugfixes
571
-
572
- v2.4.2.
573
- * error reporting in early access
574
-
575
- v2.4.1.
576
- * bugfix: initializing developer mode
577
-
578
- v2.4.0.
579
- * Beta support for LiteSpeed and Passenger
580
-
581
- v2.3.7.
582
- * bugfixes
583
-
584
- v2.3.6.
585
- * bugfixes
586
-
587
- v2.3.5.
588
- * bugfixes: pie chart data, rails 1.1 compability
589
-
590
- v2.3.4.
591
- * bugfix
592
-
593
- v2.3.3.
594
- * bugfix for non-mysql databases
595
-
596
- v2.3.2.
597
- * bugfixes
598
- * Add enhancement for Transaction Traces early access feature
599
-
600
- v2.3.1.
601
- * bugfixes
602
-
603
- v2.3.0.
604
- + Add support for Transaction Traces early access feature
605
-
606
- v2.2.2.
607
- * bugfixes
608
-
609
- v2.2.1.
610
- + Add rails 2.1 support for Developer Mode
611
- + Changes to memory sampler: Add support for JRuby and fix Solaris support.
612
- * Stop catching exceptions and start catching StandardError; other exception cleanup
613
- * Add protective exception catching to the stats engine
614
- * Improved support for thin domain sockets
615
- * Support JRuby environments
616
-
617
- v2.1.6.
618
- * bugfixes
619
-
620
- v2.1.5.
621
- * bugfixes
622
-
623
- v2.1.4.
624
- * bugfixes
625
-
626
- v2.1.3.
627
- * bugfixes
628
-
629
- v2.1.2.
630
- * bugfixes
631
-
632
- v2.1.1.
633
- * bugfixes
634
-
635
- v2.1.0.
636
- * release for private beta
637
-
638
-