newrelic_rpm 2.8.8 → 2.8.9

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.

@@ -547,12 +547,15 @@ module NewRelic::Agent
547
547
  end
548
548
 
549
549
  def load_samplers
550
- sampler_files = File.join(File.dirname(__FILE__), 'samplers', '*.rb')
551
- Dir.glob(sampler_files) do |file|
550
+ sampler_files_root = File.join(File.dirname(__FILE__), 'samplers')
551
+ samplers = %w[memory.rb]
552
+ samplers += %w[cpu.rb mongrel.rb] unless RUBY_PLATFORM =~ /java/
553
+ for sampler in samplers do
552
554
  begin
553
- require file
555
+ log.debug "Loading sampler #{sampler}"
556
+ require File.join(sampler_files_root, sampler)
554
557
  rescue => e
555
- log.error "Error loading sampler '#{file}': #{e}"
558
+ log.error "Error loading sampler '#{sampler}': #{e}"
556
559
  end
557
560
  end
558
561
  end
@@ -666,7 +669,7 @@ module NewRelic::Agent
666
669
  uri = "/agent_listener/invoke_raw_method?method=#{method}&license_key=#{license_key}&protocol_version=#{PROTOCOL_VERSION}"
667
670
  uri += "&run_id=#{@agent_id}" if @agent_id
668
671
 
669
- request = Net::HTTP::Post.new(uri, 'ACCEPT-ENCODING' => 'gzip')
672
+ request = Net::HTTP::Post.new(uri, 'ACCEPT-ENCODING' => 'gzip', 'HOST' => config.fetch('host', 'collector.newrelic.com'))
670
673
  request.content_type = "application/octet-stream"
671
674
  request.body = post_data
672
675
 
@@ -16,10 +16,8 @@ module NewRelic::Agent
16
16
  @ps = "/usr/bin/ps -o rss -p"
17
17
  end
18
18
  if !@ps
19
- raise "Unsupported platform for getting memory: #{platform}"
20
- end
21
-
22
- if @ps
19
+ NewRelic::Config.instance.log.warn "Unsupported platform for getting memory: #{platform}"
20
+ else
23
21
  @broken = false
24
22
 
25
23
  agent = NewRelic::Agent.instance
@@ -29,12 +29,10 @@ class NewRelic::Config::Rails < NewRelic::Config
29
29
  def install_developer_mode(rails_config)
30
30
  controller_path = File.join(newrelic_root, 'ui', 'controllers')
31
31
  helper_path = File.join(newrelic_root, 'ui', 'helpers')
32
- $LOAD_PATH << controller_path
33
- $LOAD_PATH << helper_path
34
-
32
+
35
33
  if defined? ActiveSupport::Dependencies
36
- ActiveSupport::Dependencies.load_paths << controller_path
37
- ActiveSupport::Dependencies.load_paths << helper_path
34
+ Dir["#{helper_path}/*.rb"].each { |f| require f }
35
+ Dir["#{controller_path}/*.rb"].each { |f| require f }
38
36
  elsif defined? Dependencies.load_paths
39
37
  Dependencies.load_paths << controller_path
40
38
  Dependencies.load_paths << helper_path
@@ -125,9 +125,9 @@ module NewRelic
125
125
  require 'optparse'
126
126
  # If nothing else is found, use the 3000 default
127
127
  default_port = 3000
128
- ARGV.clone.options do |opts|
128
+ OptionParser.new do |opts|
129
129
  opts.on("-p", "--port=port", String) { | default_port | }
130
- opts.parse!
130
+ opts.parse!(ARGV.clone)
131
131
  end
132
132
  default_port
133
133
  end
@@ -58,7 +58,8 @@ module NewRelic
58
58
 
59
59
  def add_request_parameters(*args)
60
60
  end
61
-
61
+ def add_custom_parameters(*args)
62
+ end
62
63
  def should_ignore_error
63
64
  end
64
65
  end
@@ -3,7 +3,7 @@ module NewRelic
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 2
5
5
  MINOR = 8
6
- TINY = 8
6
+ TINY = 9
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  def self.changes
9
9
  puts "NewRelic RPM Plugin Version: #{NewRelic::VERSION::STRING}"
@@ -11,6 +11,13 @@ module NewRelic
11
11
  end
12
12
 
13
13
  CHANGELOG = <<EOF
14
+ 2009-04-17 version 2.8.9
15
+ * fix problem finding the newrelic controller in dev mode
16
+ * fix incompatibility with older versions of optparse
17
+ * fix potential jvm problem with jruby
18
+ * remove test:all task definition to avoid conflicts
19
+ * change error message about window sampler in windows not supported
20
+ to a warning message
14
21
  2009-03-27 version 2.8.8
15
22
  * fix error with jruby on windows
16
23
  2009-03-20 version 2.8.7
@@ -1,17 +1,13 @@
1
1
  # run unit tests for the NewRelic Agent
2
2
  if defined? Rake::TestTask
3
-
4
- namespace :test do
5
- AGENT_HOME = File.expand_path(File.join(File.dirname(__FILE__), "..",".."))
6
- Rake::TestTask.new(:agent) do |t|
7
- t.libs << "#{AGENT_HOME}/test"
8
- t.libs << "#{AGENT_HOME}/lib"
9
- t.pattern = "#{AGENT_HOME}/test/**/tc_*.rb"
10
- t.verbose = true
3
+ namespace :test do
4
+ AGENT_HOME = File.expand_path(File.join(File.dirname(__FILE__), "..",".."))
5
+ Rake::TestTask.new(:newrelic) do |t|
6
+ t.libs << "#{AGENT_HOME}/test"
7
+ t.libs << "#{AGENT_HOME}/lib"
8
+ t.pattern = "#{AGENT_HOME}/test/**/tc_*.rb"
9
+ t.verbose = true
10
+ end
11
+ Rake::Task['test:newrelic'].comment = "Run the unit tests for the Agent"
11
12
  end
12
- Rake::Task['test:agent'].comment = "Run the unit tests for the Agent"
13
-
14
- Rake::TestTask.new(:all => ["test", "test:agent"])
15
- Rake::Task['test:all'].comment = "Run all tests including agent code"
16
- end
17
13
  end
data/newrelic.yml CHANGED
@@ -47,7 +47,7 @@ common: &default_settings
47
47
  # If a proxy is used, the host setting is required. Other settings are optional. Default
48
48
  # port is 8080.
49
49
  #
50
- # proxy_host: proxy.sample.com
50
+ # proxy_host: proxyhostname
51
51
  # proxy_port: 8080
52
52
  # proxy_user:
53
53
  # proxy_pass:
@@ -1,8 +1,6 @@
1
- ##require 'new_relic/agent'
2
- require 'google_pie_chart'
3
-
4
1
  class NewrelicController < ActionController::Base
5
2
  include NewrelicHelper
3
+ helper NewrelicHelper
6
4
 
7
5
  # See http://wiki.rubyonrails.org/rails/pages/Safe+ERB:
8
6
  # We don't need to worry about checking taintedness
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.8
4
+ version: 2.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bill Kayser
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-31 00:00:00 -07:00
12
+ date: 2009-04-17 00:00:00 -07:00
13
13
  default_executable: newrelic_cmd
14
14
  dependencies: []
15
15