rpm_contrib 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ * Version 2.1.1
2
+
3
+ Fix namespacing problem with Resque
4
+ Add instrumentation to Mongo::Cursor #refresh and #close - thanks to Chris Griego
5
+
1
6
  * Version 2.1.0
2
7
 
3
8
  Included instrumentation from the community:
data/README.md CHANGED
@@ -30,30 +30,65 @@ initialized. No need for a separate require statement for `newrelic_rpm`. The
30
30
  A number of frameworks are supported in the contrib gem. They are all turned on
31
31
  by default but you can add settings to your newrelic.yml to disable any of them.
32
32
 
33
+ ### ActiveMQ
34
+
35
+ The gem will detect the underlying ActiveMessaging::Processor class and instrument the `on_message` method
36
+
37
+ It can be disabled with the `disable_active_mq` flag in your newrelic.yml file.
38
+
39
+ ### Cassandra
40
+
41
+ The gem will instrument Cassandra so it should be visible in transaction traces and the web transactions page.
42
+
43
+ You can disable it with `disable_cassandra_instrumentation` in your newrelic.yml file.
44
+
33
45
  ### Camping
34
46
 
35
47
  The gem will detect a Camping app but you need to manually add the
36
48
  instrumentation to your configuration file. See RPMContrib::Instrumentation::Camping
37
49
  for more information.
38
50
 
51
+ ### Crack
52
+
53
+ The gem will instrument the Crack parsers for JSON and XML - you
54
+ should see them in transaction traces and the web transactions page.
55
+
56
+ You can disable it with `disable_crack` in your newrelic.yml file.
57
+
58
+ ### Curb
59
+
60
+ The gem will instrument both Curl::Easy and Curl::Multi - they should show up similarly to Net::HTTP in the UI
61
+
62
+ You can disable it with `disable_curb` in your newrelic.yml file.
63
+
64
+ ## Elastic Search
65
+
66
+ The gem will instrument ElasticSearch::Client. The metrics should show up in the UI
67
+
68
+ You can disable it with `disable_elastic_search_instrumentation` in your newrelic.yml file.
69
+
39
70
  ### Paperclip
40
71
 
41
- No special configuration required for Paperclip visibility. You can disable
42
- it by setting `disable_paperclip` to true in the newrelic.yml file.
72
+ No special configuration required for Paperclip visibility.
73
+
74
+ You can disable it by setting `disable_paperclip` to true in your newrelic.yml file.
43
75
 
44
76
  ### MongoDB
45
77
 
46
- Both MongoMapper and Mongoid are supported. You can disable them both by setting
47
- 'disable_mongodb' to true in the newrelic.yml file.
78
+ Our instrumentation works on the underlying 'Mongo' library.
79
+
80
+ You can disable it by setting 'disable_mongodb' to true in your newrelic.yml file.
48
81
 
49
82
  ### Resque
50
83
 
51
84
  Make sure that your jobs either inherit from Resque::Job or else include our instrumentation:
52
85
 
86
+ ```ruby
53
87
  class MyJob
54
88
  require 'rpm_contrib/instrumentation/resque'
55
89
  include Resque::Plugins::NewRelicInstrumentation
56
90
  end
91
+ ```
57
92
 
58
93
  To disable resque, set 'disable_resque' to true in your newrelic.yml file.
59
94
 
@@ -61,8 +96,39 @@ To disable resque, set 'disable_resque' to true in your newrelic.yml file.
61
96
 
62
97
  Redis instrumentation will record operations as well as `allWeb` and `allOther`
63
98
  summary metrics under the `Database/Redis` metric namespace. This instrumentation
64
- supports Redis versions 1.x and 2.x. To disable Redis instrumentation, set
65
- 'disable_redis' to true in your newrelic.yml file.
99
+ supports Redis versions 1.x and 2.x.
100
+
101
+ To disable Redis instrumentation, set 'disable_redis' to true in your newrelic.yml file.
102
+
103
+ ### Sinatra view instrumentation
104
+
105
+ This adds instrumentation to the `render` methods in Sinatra::Base
106
+
107
+ You can disable it with `disable_sinatra_template` in your newrelic.yml file.
108
+
109
+ ### Typhoeus instrumentation
110
+
111
+ This adds instrumentation to the Typhoeus::Request class for 'GET' requests
112
+
113
+ You can disable it with `disable_typhoeus` in your newrelic.yml file.
114
+
115
+ ### Ultrasphinx instrumentation
116
+
117
+ This adds basic instrumentation to the `run` and `results` method of Ultrasphinx::Search
118
+
119
+ You can disable it with `disable_ultrasphinx` in your newrelic.yml file.
120
+
121
+ ### Workling
122
+
123
+ This adds instrumentation to the Workling::Base and all children, for all defined public methods not inherited from the Workling::Base class
124
+
125
+ You can disable it with `disable_workling` in your newrelic.yml file.
126
+
127
+ ### YAJL
128
+
129
+ This adds instrumentation to the YAJL json parser
130
+
131
+ You can disable it with `disable_yajl_instrumentation` in your newrelic.yml file.
66
132
 
67
133
  ### AWS/S3
68
134
 
@@ -25,8 +25,23 @@ module RpmContrib
25
25
  alias_method :instrument_without_newrelic_trace, :instrument
26
26
  alias_method :instrument, :instrument_with_newrelic_trace
27
27
  end
28
- end
29
28
 
29
+ ::Mongo::Cursor.class_eval do
30
+ include NewRelic::Agent::MethodTracer
31
+
32
+ def refresh_with_newrelic_trace
33
+ return if send_initial_query || @cursor_id.zero? # don't double report the initial query
34
+
35
+ trace_execution_scoped("Database/#{collection.name}/refresh") do
36
+ refresh_without_newrelic_trace
37
+ end
38
+ end
39
+
40
+ alias_method :refresh_without_newrelic_trace, :refresh
41
+ alias_method :refresh, :refresh_with_newrelic_trace
42
+ add_method_tracer :close, 'Database/#{collection.name}/close'
43
+ end
44
+ end
30
45
  end
31
46
  end
32
47
  end
@@ -24,7 +24,7 @@ module RPMContrib
24
24
  end
25
25
 
26
26
  ::Resque::Job.class_eval do
27
- include Resque::Plugins::NewRelicInstrumentation
27
+ include ::Resque::Plugins::NewRelicInstrumentation
28
28
  end
29
29
  end
30
30
  end
@@ -1,7 +1,7 @@
1
1
  module RpmContrib
2
2
  module Instrumentation
3
3
  module Typhoeus
4
- if defined?(::Typhoeus)
4
+ if defined?(::Typhoeus) and not ::NewRelic::Control.instance['disable_typhoeus']
5
5
  require 'uri'
6
6
  module ::Typhoeus
7
7
  Request.instance_eval do
@@ -3,7 +3,7 @@ require 'new_relic/agent/method_tracer'
3
3
  module RpmContrib
4
4
  module Instrumentation
5
5
  module UltraSphinx
6
- if defined?(::UltraSphinx)
6
+ if defined?(::UltraSphinx) and not ::NewRelic::Control.instance['disable_ultrasphinx']
7
7
  module ::Ultrasphinx
8
8
  class Search
9
9
  include NewRelic::Agent::MethodTracer
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpm_contrib
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
5
- prerelease:
4
+ hash: 9
5
+ prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 1
9
- - 0
10
- version: 2.1.0
9
+ - 1
10
+ version: 2.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Bill Kayser
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-12 00:00:00 -07:00
18
+ date: 2011-05-16 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  requirements: []
117
117
 
118
118
  rubyforge_project:
119
- rubygems_version: 1.5.2
119
+ rubygems_version: 1.3.7
120
120
  signing_key:
121
121
  specification_version: 3
122
122
  summary: Contributed Instrumentation for New Relic RPM