rpm_contrib 2.1.6.beta1 → 2.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,13 @@
1
+ * Version 2.1.6
2
+ Community contributed instrumentation
3
+ - ThinkingSphinx instrumentation (W. Andrew Loe III)
4
+ - Riak instrumentation (Bryce Kerley)
5
+ - KyotoTycoon instrumentation (Keisuke Kawahara)
6
+ Community Contributed Bug Fixes
7
+ - MongoDB instrumentation (Kenn Ejima)
8
+ - Yajl instrumentation (Chris Griego)
9
+ Renamed ActiveMQ instrumentation to ActiveMessaging (W. Andrew Loe III)
10
+
1
11
  * Version 2.1.5
2
12
 
3
13
  Changed the resque detection so it does not depend on the load
@@ -10,7 +20,7 @@
10
20
  Converted instrumentation to install with DependencyDetection in the latest Agent
11
21
  Changed Resque instrumentation from a plugin back to method chaining
12
22
  Fixed several reported bugs related to resque
13
-
23
+
14
24
  * Version 2.1.3
15
25
 
16
26
  Fixed typo in Resque instrumentation
@@ -21,7 +31,7 @@
21
31
  Add a manual shutdown to the Resque instrumentation to make sure data is saved and sent - thanks to Jade Rubick
22
32
 
23
33
  * Version 2.1.1
24
-
34
+
25
35
  Fix namespacing problem with Resque
26
36
  Add instrumentation to Mongo::Cursor #refresh and #close - thanks to Chris Griego
27
37
 
@@ -97,7 +107,7 @@
97
107
  MongoDB instrumentation contributed by John Nunemaker
98
108
 
99
109
  * Version 1.0.2
100
-
110
+
101
111
  Improved Camping support
102
112
 
103
113
  * Version 1.0.1
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source :rubygems
2
+
3
+ gem 'newrelic_rpm', '>=3.1.1'
4
+
5
+ group :test do
6
+ gem 'resque'
7
+ gem 'json'
8
+ gem 'mocha'
9
+ end
10
+
11
+ group :build do
12
+ gem 'jeweler'
13
+ end
data/README.md CHANGED
@@ -48,11 +48,11 @@ and examine the `newrelic_agent.log` file for errors after restarting your app.
48
48
  A number of frameworks are supported in the contrib gem. They are all turned on
49
49
  by default but you can add settings to your newrelic.yml to disable any of them.
50
50
 
51
- ### ActiveMQ
51
+ ### ActiveMessaging
52
52
 
53
53
  The gem will detect the underlying ActiveMessaging::Processor class and instrument the `on_message` method
54
54
 
55
- It can be disabled with the `disable_active_mq` flag in your newrelic.yml file.
55
+ It can be disabled with the `disable_active_messaging` flag in your newrelic.yml file.
56
56
 
57
57
  ### Cassandra
58
58
 
@@ -88,6 +88,12 @@ The gem will instrument ElasticSearch::Client. The metrics should show up in the
88
88
 
89
89
  You can disable it with `disable_elastic_search_instrumentation` in your newrelic.yml file.
90
90
 
91
+ ## KyotoTycoon
92
+
93
+ The gem will instrument KyotoTycoon.
94
+
95
+ You can disable it with `disable_kyototycoon` in your newrelic.yml file.
96
+
91
97
  ### Paperclip
92
98
 
93
99
  No special configuration required for Paperclip visibility.
@@ -116,12 +122,33 @@ supports Redis versions 1.x and 2.x.
116
122
 
117
123
  To disable Redis instrumentation, set 'disable_redis' to true in your newrelic.yml file.
118
124
 
125
+ ### Riak
126
+
127
+ RiakClient is instrumented. Its opereations are recorded under Database in the
128
+ the response time graph.
129
+
130
+ To disable Riak instrumentation, set 'disable_riak_client' to true in your newrelic.yml file.
131
+
132
+ ### Ripple
133
+
134
+ Ripple is instrumented. Its opereations are recorded under Database in the
135
+ the response time graph.
136
+
137
+ To disable Riak instrumentation, set 'disable_ripple' to true in your newrelic.yml file.
138
+
119
139
  ### Sinatra view instrumentation
120
140
 
121
141
  This adds instrumentation to the `render` methods in Sinatra::Base
122
142
 
123
143
  You can disable it with `disable_sinatra_template` in your newrelic.yml file.
124
144
 
145
+ ### ThinkingSphinx instrumentation
146
+
147
+ This adds instrumentation to the `initialize` and `results` method of ThinkingSphinx::Search
148
+
149
+ You can disable it with `disable_thinking_sphinx` in your newrelic.yml file.
150
+
151
+
125
152
  ### Typhoeus instrumentation
126
153
 
127
154
  This adds instrumentation to the Typhoeus::Request class for 'GET' requests
data/Rakefile CHANGED
@@ -26,6 +26,7 @@ begin
26
26
  gem.add_dependency 'newrelic_rpm', '>=3.1.1'
27
27
  gem.version = version
28
28
  gem.files = FileList['LICENSE', 'README*', 'lib/**/*.rb', 'bin/*', '[A-Z]*', 'test/**/*'].to_a
29
+ gem.files.exclude *File.read(File.join(File.dirname(__FILE__), '.gitignore')).split
29
30
  gem.rdoc_options <<
30
31
  "--line-numbers" <<
31
32
  "--inline-source" <<
@@ -1,16 +1,17 @@
1
- # == ActiveMQ Instrumentation ==
1
+ # == ActiveMessaging Instrumentation ==
2
2
  # Robert R. Meyer
3
3
  # Blue-Dog-Archolite @ GitHub
4
4
 
5
5
  DependencyDetection.defer do
6
- @name = :active_mq
6
+ @name = :active_messaging
7
7
 
8
8
  depends_on do
9
- defined?(::ActiveMessaging::Processor) && !NewRelic::Control.instance['disable_active_mq']
9
+ defined?(::ActiveMessaging::Processor) && !NewRelic::Control.instance['disable_active_messaging'] &&
10
+ !NewRelic::Control.instance['disable_active_mq']
10
11
  end
11
12
 
12
13
  executes do
13
- NewRelic::Agent.logger.debug 'Installing ActiveMQ instrumentation'
14
+ NewRelic::Agent.logger.debug 'Installing ActiveMessaging instrumentation'
14
15
  end
15
16
 
16
17
  executes do
@@ -0,0 +1,28 @@
1
+ # KyotoTycoon instrumentation
2
+
3
+ DependencyDetection.defer do
4
+ @name = :kyototycoon
5
+
6
+ depends_on do
7
+ defined?(::KyotoTycoon) && !NewRelic::Control.instance['disable_kyototycoon']
8
+ end
9
+
10
+ executes do
11
+ NewRelic::Agent.logger.debug 'Installing KyotoTycoon instrumentation'
12
+ end
13
+
14
+ executes do
15
+ ::KyotoTycoon.class_eval do
16
+ require 'new_relic/agent/method_tracer'
17
+ include NewRelic::Agent::MethodTracer
18
+
19
+ [:get, :remove, :set, :add, :replace,
20
+ :append, :cas, :increment, :decrement, :increment_double,
21
+ :set_bulk, :get_bulk, :remove_bulk, :clear, :vacuum,
22
+ :sync, :report, :status, :match_prefix, :match_regex,
23
+ :keys].each do |method|
24
+ add_method_tracer method
25
+ end
26
+ end
27
+ end
28
+ end
@@ -37,8 +37,6 @@ DependencyDetection.defer do
37
37
  include NewRelic::Agent::MethodTracer
38
38
 
39
39
  def refresh_with_newrelic_trace
40
- return if send_initial_query || @cursor_id.zero? # don't double report the initial query
41
-
42
40
  trace_execution_scoped("Database/#{collection.name}/refresh") do
43
41
  refresh_without_newrelic_trace
44
42
  end
@@ -20,11 +20,15 @@ module Resque
20
20
  end
21
21
  end
22
22
 
23
- module RPMContrib::Instrumentation::ResqueInstrumentationInstaller
24
- def payload_class
25
- klass = super
26
- klass.instance_eval do
27
- extend ::Resque::Plugins::NewRelicInstrumentation
23
+ module RPMContrib
24
+ module Instrumentation
25
+ module ResqueInstrumentationInstaller
26
+ def payload_class
27
+ klass = super
28
+ klass.instance_eval do
29
+ extend ::Resque::Plugins::NewRelicInstrumentation
30
+ end
31
+ end
28
32
  end
29
33
  end
30
34
  end
@@ -0,0 +1,48 @@
1
+ DependencyDetection.defer do
2
+ @name = :riak_client
3
+
4
+ depends_on do
5
+ defined?(::Riak) and not NewRelic::Control.instance['disable_riak_client']
6
+ end
7
+
8
+ executes do
9
+ NewRelic::Agent.logger.debug 'Installing Riak client instrumentation'
10
+ end
11
+
12
+ executes do
13
+ backend_tracers = proc do
14
+ add_method_tracer :ping, 'Database/Riak/ping'
15
+
16
+ add_method_tracer :list_buckets, 'Database/Riak/list_buckets'
17
+ add_method_tracer :get_bucket_props, 'Database/Riak/get_bucket_props'
18
+ add_method_tracer :set_bucket_props, 'Database/Riak/set_bucket_props'
19
+
20
+ add_method_tracer :mapred, 'Database/Riak/mapred'
21
+
22
+ add_method_tracer :list_keys, 'Database/Riak/list_keys'
23
+ add_method_tracer :fetch_object, 'Database/Riak/fetch_object'
24
+ add_method_tracer :reload_object, 'Database/Riak/reload_object'
25
+ add_method_tracer :store_object, 'Database/Riak/store_object'
26
+ add_method_tracer :delete_object, 'Database/Riak/delete_object'
27
+ end
28
+
29
+ ::Riak::Client::BeefcakeProtobuffsBackend.class_eval &backend_tracers
30
+ ::Riak::Client::BeefcakeProtobuffsBackend.class_eval do
31
+ add_method_tracer :server_info, 'Database/Riak/server_info'
32
+ add_method_tracer :get_client_id, 'Database/Riak/get_client_id'
33
+ add_method_tracer :set_client_id, 'Database/Riak/set_client_id'
34
+ end
35
+ ::Riak::Client::HTTPBackend.class_eval &backend_tracers
36
+ ::Riak::Client::HTTPBackend.class_eval do
37
+ add_method_tracer :stats, 'Database/Riak/stats'
38
+ add_method_tracer :link_walk, 'Database/Riak/link_walk'
39
+ add_method_tracer :get_index, 'Database/Riak/get_index'
40
+ add_method_tracer :search, 'Database/Riak/search'
41
+ add_method_tracer :update_search_index, 'Database/Riak/update_search_index'
42
+ end
43
+
44
+ ::Riak::RObject.class_eval do
45
+ add_method_tracer :serialize, 'Database/Riak/serialize'
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,37 @@
1
+ DependencyDetection.defer do
2
+ @name = :ripple
3
+
4
+ depends_on do
5
+ defined?(::Ripple) and not
6
+ NewRelic::Control.instance['disable_ripple']
7
+ end
8
+
9
+ executes do
10
+ NewRelic::Agent.logger.debug 'Installing Ripple instrumentation'
11
+ end
12
+
13
+ executes do
14
+ ::Ripple::Callbacks::InstanceMethods.class_eval do
15
+ add_method_tracer :valid?, 'Database/Riak/Ripple/valid?'
16
+ end
17
+
18
+ ::Ripple::Document::Persistence::ClassMethods.class_eval do
19
+ add_method_tracer :create, 'Database/Riak/Ripple/create'
20
+ add_method_tracer :destroy_all, 'Database/Riak/Ripple/destroy_all'
21
+ end
22
+
23
+ ::Ripple::Document::Persistence::InstanceMethods.class_eval do
24
+ add_method_tracer :really_save, 'Database/Riak/Ripple/really_save'
25
+ add_method_tracer :reload, 'Database/Riak/Ripple/reload'
26
+ add_method_tracer :delete, 'Database/Riak/Ripple/delete'
27
+ add_method_tracer :destroy, 'Database/Riak/Ripple/destroy'
28
+ add_method_tracer :update_attribute, 'Database/Riak/Ripple/update_attribute'
29
+ add_method_tracer :update_attributes, 'Database/Riak/Ripple/update_attributes'
30
+ end
31
+
32
+ ::Ripple::Document::Finders::ClassMethods.class_eval do
33
+ add_method_tracer :find, 'Database/Riak/Ripple/find'
34
+ add_method_tracer :list, 'Database/Riak/Ripple/list'
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,21 @@
1
+ DependencyDetection.defer do
2
+ @name = :thinking_sphinx
3
+
4
+ depends_on do
5
+ defined?(::ThinkingSphinx) and not ::NewRelic::Control.instance['disable_thinking_sphinx']
6
+ end
7
+
8
+ executes do
9
+ NewRelic::Agent.logger.debug 'Installing Thinking Sphinx instrumentation'
10
+ end
11
+
12
+ executes do
13
+ class ::ThinkingSphinx::Search
14
+ include NewRelic::Agent::MethodTracer
15
+
16
+ add_method_tracer :initialize
17
+ add_method_tracer :results
18
+ end
19
+ end
20
+ end
21
+
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpm_contrib
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.6.beta1
5
- prerelease: 6
4
+ version: 2.1.6
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Bill Kayser
@@ -10,12 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-09-23 00:00:00.000000000 -07:00
14
- default_executable:
13
+ date: 2011-11-08 00:00:00.000000000Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: newrelic_rpm
18
- requirement: &2153791500 !ruby/object:Gem::Requirement
17
+ requirement: &70329403038300 !ruby/object:Gem::Requirement
19
18
  none: false
20
19
  requirements:
21
20
  - - ! '>='
@@ -23,10 +22,10 @@ dependencies:
23
22
  version: 3.1.1
24
23
  type: :runtime
25
24
  prerelease: false
26
- version_requirements: *2153791500
25
+ version_requirements: *70329403038300
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: newrelic_rpm
29
- requirement: &2153790140 !ruby/object:Gem::Requirement
28
+ requirement: &70329403022960 !ruby/object:Gem::Requirement
30
29
  none: false
31
30
  requirements:
32
31
  - - ! '>='
@@ -34,7 +33,7 @@ dependencies:
34
33
  version: 3.1.1
35
34
  type: :runtime
36
35
  prerelease: false
37
- version_requirements: *2153790140
36
+ version_requirements: *70329403022960
38
37
  description: ! 'Community contributed instrumentation for various frameworks based
39
38
  on
40
39
 
@@ -50,6 +49,7 @@ extra_rdoc_files:
50
49
  - README.md
51
50
  files:
52
51
  - CHANGELOG
52
+ - Gemfile
53
53
  - LICENSE
54
54
  - README.md
55
55
  - Rakefile
@@ -59,18 +59,22 @@ files:
59
59
  - lib/rpm_contrib/detection.rb
60
60
  - lib/rpm_contrib/detection/camping.rb
61
61
  - lib/rpm_contrib/instrumentation.rb
62
- - lib/rpm_contrib/instrumentation/active_mq.rb
62
+ - lib/rpm_contrib/instrumentation/active_messaging.rb
63
63
  - lib/rpm_contrib/instrumentation/aws.rb
64
64
  - lib/rpm_contrib/instrumentation/camping.rb
65
65
  - lib/rpm_contrib/instrumentation/cassandra.rb
66
66
  - lib/rpm_contrib/instrumentation/crack.rb
67
67
  - lib/rpm_contrib/instrumentation/curb.rb
68
68
  - lib/rpm_contrib/instrumentation/elastic_search.rb
69
+ - lib/rpm_contrib/instrumentation/kyototycoon.rb
69
70
  - lib/rpm_contrib/instrumentation/mongo.rb
70
71
  - lib/rpm_contrib/instrumentation/paperclip.rb
71
72
  - lib/rpm_contrib/instrumentation/redis.rb
72
73
  - lib/rpm_contrib/instrumentation/resque.rb
74
+ - lib/rpm_contrib/instrumentation/riak_client.rb
75
+ - lib/rpm_contrib/instrumentation/ripple.rb
73
76
  - lib/rpm_contrib/instrumentation/sinatra.rb
77
+ - lib/rpm_contrib/instrumentation/thinking_sphinx.rb
74
78
  - lib/rpm_contrib/instrumentation/typhoeus.rb
75
79
  - lib/rpm_contrib/instrumentation/ultrasphinx.rb
76
80
  - lib/rpm_contrib/instrumentation/workling.rb
@@ -83,7 +87,6 @@ files:
83
87
  - test/test_redis.rb
84
88
  - test/test_resque.rb
85
89
  - test/test_workling.rb
86
- has_rdoc: true
87
90
  homepage: http://github.com/newrelic/rpm_contrib
88
91
  licenses: []
89
92
  post_install_message:
@@ -102,6 +105,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
105
  - - ! '>='
103
106
  - !ruby/object:Gem::Version
104
107
  version: '0'
108
+ segments:
109
+ - 0
110
+ hash: -3341867622411034151
105
111
  required_rubygems_version: !ruby/object:Gem::Requirement
106
112
  none: false
107
113
  requirements:
@@ -110,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
116
  version: '0'
111
117
  requirements: []
112
118
  rubyforge_project:
113
- rubygems_version: 1.6.2
119
+ rubygems_version: 1.8.10
114
120
  signing_key:
115
121
  specification_version: 3
116
122
  summary: Contributed Instrumentation for New Relic RPM