newrelic_rpm 2.11.3 → 2.12.0

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.0
2
+ * support basic instrumentation for ActsAsSolr and Sunspot
3
+
1
4
  v2.11.3
2
5
  * fix bug in startup when running JRuby
3
6
 
@@ -0,0 +1,45 @@
1
+ if defined?(::ActsAsSolr)
2
+
3
+ module NewRelic
4
+ module Instrumentation
5
+ module ActsAsSolrInstrumentation
6
+ module ParserMethodsInstrumentation
7
+ def parse_query_with_newrelic(*args)
8
+ self.class.trace_execution_scoped(["SolrClient/ActsAsSolr/query"]) do
9
+ t0 = Time.now
10
+ begin
11
+ parse_query_without_newrelic(*args)
12
+ ensure
13
+ NewRelic::Agent.instance.transaction_sampler.notice_nosql(args.first.inspect, (Time.now - t0).to_f) rescue nil
14
+ end
15
+ end
16
+
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+
23
+ module ActsAsSolr
24
+ module ParserMethods #:nodoc
25
+ include NewRelic::Instrumentation::ActsAsSolrInstrumentation::ParserMethodsInstrumentation
26
+ alias :parse_query_without_newrelic :parse_query
27
+ alias :parse_query :parse_query_with_newrelic
28
+ end
29
+
30
+ module ClassMethods #:nodoc
31
+ %w[find_by_solr find_id_by_solr multi_solr_search count_by_solr].each do |method|
32
+ add_method_tracer method, 'SolrClient/ActsAsSolr/query'
33
+ end
34
+ add_method_tracer :rebuild_solr_index, 'SolrClient/ActsAsSolr/index'
35
+ end
36
+
37
+ module CommonMethods #:nodoc
38
+ add_method_tracer :solr_add, 'SolrClient/ActsAsSolr/add'
39
+ add_method_tracer :solr_delete, 'SolrClient/ActsAsSolr/delete'
40
+ add_method_tracer :solr_commit, 'SolrClient/ActsAsSolr/commit'
41
+ add_method_tracer :solr_optimize, 'SolrClient/ActsAsSolr/optimize'
42
+ end
43
+ end
44
+ end
45
+
@@ -0,0 +1,17 @@
1
+ if defined?(::Sunspot)
2
+ ::Sunspot.module_eval do
3
+ class << self
4
+ %w(index index!).each do |method|
5
+ add_method_tracer method, 'SolrClient/Sunspot/index'
6
+ end
7
+ add_method_tracer :commit, 'SolrClient/Sunspot/commit'
8
+
9
+ %w[search more_like_this].each do |method|
10
+ add_method_tracer method, 'SolrClient/Sunspot/query'
11
+ end
12
+ %w[remove remove! remove_by_id remove_by_id! remove_all remove_all!].each do |method|
13
+ add_method_tracer method, 'SolrClient/Sunspot/delete'
14
+ end
15
+ end
16
+ end
17
+ end
@@ -2,8 +2,8 @@
2
2
  module NewRelic
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 2
5
- MINOR = 11
6
- TINY = 3
5
+ MINOR = 12
6
+ TINY = 0
7
7
  BUILD = nil #'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
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.11.3"
8
+ s.version = "2.12.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Bill Kayser"]
12
- s.date = %q{2010-05-01}
12
+ s.date = %q{2010-05-13}
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
@@ -38,6 +38,7 @@ http://github.com/newrelic/rpm/tree/master.
38
38
  "lib/new_relic/agent/error_collector.rb",
39
39
  "lib/new_relic/agent/instrumentation/active_merchant.rb",
40
40
  "lib/new_relic/agent/instrumentation/active_record_instrumentation.rb",
41
+ "lib/new_relic/agent/instrumentation/acts_as_solr.rb",
41
42
  "lib/new_relic/agent/instrumentation/authlogic.rb",
42
43
  "lib/new_relic/agent/instrumentation/controller_instrumentation.rb",
43
44
  "lib/new_relic/agent/instrumentation/data_mapper.rb",
@@ -55,6 +56,7 @@ http://github.com/newrelic/rpm/tree/master.
55
56
  "lib/new_relic/agent/instrumentation/rails3/action_controller.rb",
56
57
  "lib/new_relic/agent/instrumentation/rails3/errors.rb",
57
58
  "lib/new_relic/agent/instrumentation/sinatra.rb",
59
+ "lib/new_relic/agent/instrumentation/sunspot.rb",
58
60
  "lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb",
59
61
  "lib/new_relic/agent/method_tracer.rb",
60
62
  "lib/new_relic/agent/sampler.rb",
@@ -191,7 +193,7 @@ http://github.com/newrelic/rpm/tree/master.
191
193
  s.post_install_message = %q{
192
194
  Please see http://support.newrelic.com/faqs/docs/ruby-agent-release-notes
193
195
  for a complete description of the features and enhancements available
194
- in version 2.11 of the Ruby Agent.
196
+ in version 2.12 of the Ruby Agent.
195
197
 
196
198
  For details on this specific release, refer to the CHANGELOG file.
197
199
 
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 2
7
- - 11
8
- - 3
9
- version: 2.11.3
7
+ - 12
8
+ - 0
9
+ version: 2.12.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Bill Kayser
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-01 00:00:00 -07:00
17
+ date: 2010-05-13 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -61,6 +61,7 @@ files:
61
61
  - lib/new_relic/agent/error_collector.rb
62
62
  - lib/new_relic/agent/instrumentation/active_merchant.rb
63
63
  - lib/new_relic/agent/instrumentation/active_record_instrumentation.rb
64
+ - lib/new_relic/agent/instrumentation/acts_as_solr.rb
64
65
  - lib/new_relic/agent/instrumentation/authlogic.rb
65
66
  - lib/new_relic/agent/instrumentation/controller_instrumentation.rb
66
67
  - lib/new_relic/agent/instrumentation/data_mapper.rb
@@ -78,6 +79,7 @@ files:
78
79
  - lib/new_relic/agent/instrumentation/rails3/action_controller.rb
79
80
  - lib/new_relic/agent/instrumentation/rails3/errors.rb
80
81
  - lib/new_relic/agent/instrumentation/sinatra.rb
82
+ - lib/new_relic/agent/instrumentation/sunspot.rb
81
83
  - lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb
82
84
  - lib/new_relic/agent/method_tracer.rb
83
85
  - lib/new_relic/agent/sampler.rb
@@ -217,7 +219,7 @@ post_install_message: |+
217
219
 
218
220
  Please see http://support.newrelic.com/faqs/docs/ruby-agent-release-notes
219
221
  for a complete description of the features and enhancements available
220
- in version 2.11 of the Ruby Agent.
222
+ in version 2.12 of the Ruby Agent.
221
223
 
222
224
  For details on this specific release, refer to the CHANGELOG file.
223
225