newrelic_rpm 2.12.0 → 2.12.1.alpha

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,3 +1,6 @@
1
+ v2.12.1
2
+ * fix race condition in Delayed::Job instrumentation loading
3
+
1
4
  v2.12.0
2
5
  * support basic instrumentation for ActsAsSolr and Sunspot
3
6
 
@@ -79,7 +79,6 @@ module NewRelic
79
79
  require 'new_relic/version'
80
80
  require 'new_relic/local_environment'
81
81
  require 'new_relic/stats'
82
- require 'new_relic/delayed_job_injection'
83
82
  require 'new_relic/metrics'
84
83
  require 'new_relic/metric_spec'
85
84
  require 'new_relic/metric_data'
@@ -326,7 +325,8 @@ module NewRelic
326
325
  # Record the given error in RPM. It will be passed through the
327
326
  # #ignore_error_filter if there is one.
328
327
  #
329
- # * <tt>exception</tt> is the exception which will be recorded
328
+ # * <tt>exception</tt> is the exception which will be recorded. May also be
329
+ # an error message.
330
330
  # Options:
331
331
  # * <tt>:uri</tt> => The request path, minus any request params or query string.
332
332
  # * <tt>:referer</tt> => The URI of the referer
@@ -334,7 +334,7 @@ module NewRelic
334
334
  # * <tt>:request_params</tt> => Request parameters, already filtered if necessary
335
335
  # * <tt>:custom_params</tt> => Custom parameters
336
336
  #
337
- # Anything left over is treated as custom params
337
+ # Anything left over is treated as custom params.
338
338
  #
339
339
  def notice_error(exception, options={})
340
340
  NewRelic::Agent::Instrumentation::MetricFrame.notice_error(exception, options)
@@ -71,12 +71,17 @@ module NewRelic
71
71
  # in a mode where tracers are not installed then we should not start the agent.
72
72
  #
73
73
  # Subclasses are not allowed to override, but must implement init_config({}) which
74
- # is called at most once.
74
+ # is called one or more times.
75
75
  #
76
76
  def init_plugin(options={})
77
77
  options['app_name'] = ENV['NEWRELIC_APP_NAME'] if ENV['NEWRELIC_APP_NAME']
78
78
 
79
79
  require 'new_relic/agent'
80
+
81
+ # Load the DJ injection now. If you do it sooner, DJ might not be loaded and
82
+ # you'll miss it.
83
+ require 'new_relic/delayed_job_injection'
84
+
80
85
  # Merge the stringified options into the config as overrides:
81
86
  logger_override = options.delete(:log)
82
87
  environment_name = options.delete(:env) and self.env = environment_name
@@ -1,5 +1,7 @@
1
1
  # This installs some code to manually start the agent when a delayed job worker starts.
2
-
2
+ # It's not really instrumentation. It's more like a hook from DJ to RPM so it gets
3
+ # loaded at the time the RPM plugin initializes, which must be before the DJ worker
4
+ # initializes. Loaded from control.rb
3
5
  module NewRelic
4
6
  module DelayedJobInjection
5
7
  extend self
@@ -16,8 +18,8 @@ Delayed::Worker.class_eval do
16
18
  end
17
19
  dispatcher_instance_id = worker_name || "host:#{Socket.gethostname} pid:#{Process.pid}" rescue "pid:#{Process.pid}"
18
20
  say "RPM Monitoring DJ worker #{dispatcher_instance_id}"
19
- NewRelic::Agent.manual_start :dispatcher => :delayed_job, :dispatcher_instance_id => dispatcher_instance_id
20
21
  NewRelic::DelayedJobInjection.worker_name = worker_name
22
+ NewRelic::Agent.manual_start :dispatcher => :delayed_job, :dispatcher_instance_id => dispatcher_instance_id
21
23
  end
22
24
 
23
25
  alias initialize_without_new_relic initialize
@@ -3,8 +3,8 @@ module NewRelic
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 2
5
5
  MINOR = 12
6
- TINY = 0
7
- BUILD = nil #'0' # Set to nil for a release, 'beta1', 'alpha', etc for prerelease builds
6
+ TINY = 1
7
+ BUILD = 'alpha' #'0' # 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,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{newrelic_rpm}
8
- s.version = "2.12.0"
8
+ s.version = "2.12.1.alpha"
9
9
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
10
+ s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Bill Kayser"]
12
- s.date = %q{2010-05-13}
12
+ s.date = %q{2010-05-17}
13
13
  s.description = %q{New Relic RPM is a Ruby performance management system, developed by
14
14
  New Relic, Inc (http://www.newrelic.com). RPM provides you with deep
15
15
  information about the performance of your Ruby on Rails or Merb
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ prerelease: true
5
5
  segments:
6
6
  - 2
7
7
  - 12
8
- - 0
9
- version: 2.12.0
8
+ - 1
9
+ - alpha
10
+ version: 2.12.1.alpha
10
11
  platform: ruby
11
12
  authors:
12
13
  - Bill Kayser
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-05-13 00:00:00 -07:00
18
+ date: 2010-05-17 00:00:00 -07:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
@@ -240,11 +241,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
240
241
  version: "0"
241
242
  required_rubygems_version: !ruby/object:Gem::Requirement
242
243
  requirements:
243
- - - ">="
244
+ - - ">"
244
245
  - !ruby/object:Gem::Version
245
246
  segments:
246
- - 0
247
- version: "0"
247
+ - 1
248
+ - 3
249
+ - 1
250
+ version: 1.3.1
248
251
  requirements: []
249
252
 
250
253
  rubyforge_project: