oboe 1.4.2.2 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +30 -0
- data/Gemfile.lock +103 -0
- data/Guardfile +24 -0
- data/README.md +36 -0
- data/Rakefile +12 -0
- data/ext/oboe_metal/extconf.rb +12 -4
- data/ext/oboe_metal/tests/test.rb +7 -0
- data/get_version.rb +5 -0
- data/lib/joboe_metal.rb +45 -0
- data/lib/oboe.rb +16 -7
- data/lib/oboe/api/logging.rb +1 -1
- data/lib/oboe/api/tracing.rb +1 -1
- data/lib/oboe/api/util.rb +1 -1
- data/lib/oboe/config.rb +0 -47
- data/lib/oboe/frameworks/rails.rb +9 -7
- data/lib/oboe/frameworks/rails/inst/action_controller.rb +1 -1
- data/lib/oboe/frameworks/rails/inst/action_view.rb +8 -8
- data/lib/oboe/frameworks/rails/inst/active_record.rb +18 -18
- data/lib/oboe/inst/cassandra.rb +3 -3
- data/lib/oboe/inst/dalli.rb +2 -2
- data/lib/oboe/inst/http.rb +1 -1
- data/lib/oboe/inst/memcache.rb +4 -4
- data/lib/oboe/inst/memcached.rb +2 -2
- data/lib/oboe/inst/mongo.rb +1 -1
- data/lib/oboe/inst/moped.rb +5 -5
- data/lib/oboe/inst/resque.rb +4 -4
- data/lib/oboe/instrumentation.rb +1 -1
- data/lib/oboe/loading.rb +8 -3
- data/lib/oboe/logger.rb +39 -0
- data/lib/oboe/version.rb +4 -4
- data/lib/oboe_metal.rb +67 -27
- data/oboe.gemspec +19 -0
- data/oboe_fu.gemspec +13 -0
- data/release.sh +65 -0
- data/spec/instrumentation/cassandra_spec.rb +18 -0
- data/spec/instrumentation/dalli_spec.rb +14 -0
- data/spec/instrumentation/http_spec.rb +14 -0
- data/spec/instrumentation/memcache_spec.rb +19 -0
- data/spec/instrumentation/memcached_spec.rb +22 -0
- data/spec/instrumentation/mongo_spec.rb +29 -0
- data/spec/instrumentation/moped_spec.rb +41 -0
- data/spec/instrumentation/resque_spec.rb +18 -0
- data/spec/spec_helper.rb +15 -0
- data/spec/support/config_spec.rb +27 -0
- data/spec/support/oboe_spec.rb +4 -0
- metadata +100 -41
@@ -18,7 +18,7 @@ module Oboe
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
rescue Exception => e
|
21
|
-
logger.warn "oboe_rum_header: #{e.message}."
|
21
|
+
Oboe.logger.warn "oboe_rum_header: #{e.message}."
|
22
22
|
return ""
|
23
23
|
end
|
24
24
|
end
|
@@ -32,7 +32,7 @@ module Oboe
|
|
32
32
|
return raw(@@rum_ftr_tmpl)
|
33
33
|
end
|
34
34
|
rescue Exception => e
|
35
|
-
logger.warn "oboe_rum_footer: #{e.message}."
|
35
|
+
Oboe.logger.warn "oboe_rum_footer: #{e.message}."
|
36
36
|
return ""
|
37
37
|
end
|
38
38
|
end
|
@@ -62,14 +62,14 @@ module Oboe
|
|
62
62
|
begin
|
63
63
|
require f
|
64
64
|
rescue => e
|
65
|
-
|
65
|
+
Oboe.logger.error "[oboe/loading] Error loading rails insrumentation file '#{f}' : #{e}"
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
69
|
if ::Rails::VERSION::MAJOR > 2
|
70
|
-
|
70
|
+
Oboe.logger.info "Tracelytics oboe gem #{Gem.loaded_specs['oboe'].version.to_s} successfully loaded."
|
71
71
|
else
|
72
|
-
|
72
|
+
Oboe.logger.info "Tracelytics oboe gem #{Oboe::Version::STRING} successfully loaded."
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
@@ -102,11 +102,12 @@ if defined?(::Rails)
|
|
102
102
|
end
|
103
103
|
|
104
104
|
initializer 'oboe.rack' do |app|
|
105
|
-
|
105
|
+
Oboe.logger.info "[oboe/loading] Instrumenting rack" if Oboe::Config[:verbose]
|
106
106
|
app.config.middleware.insert 0, "Oboe::Rack"
|
107
107
|
end
|
108
108
|
|
109
109
|
config.after_initialize do
|
110
|
+
Oboe::Loading.setup_logger
|
110
111
|
Oboe::Loading.load_access_key
|
111
112
|
Oboe::Inst.load_instrumentation
|
112
113
|
Oboe::Rails.load_instrumentation
|
@@ -114,11 +115,12 @@ if defined?(::Rails)
|
|
114
115
|
end
|
115
116
|
end
|
116
117
|
else
|
118
|
+
Oboe::Loading.setup_logger
|
117
119
|
Oboe::Rails.load_initializer
|
118
120
|
Oboe::Loading.load_access_key
|
119
121
|
|
120
122
|
Rails.configuration.after_initialize do
|
121
|
-
|
123
|
+
Oboe.logger.info "[oboe/loading] Instrumenting rack" if Oboe::Config[:verbose]
|
122
124
|
Rails.configuration.middleware.insert 0, "Oboe::Rack"
|
123
125
|
|
124
126
|
Oboe::Inst.load_instrumentation
|
@@ -84,7 +84,7 @@ if defined?(ActionController::Base) and Oboe::Config[:action_controller][:enable
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
end
|
87
|
-
|
87
|
+
Oboe.logger.info "[oboe/loading] Instrumenting actioncontroler" if Oboe::Config[:verbose]
|
88
88
|
end
|
89
89
|
# vim:set expandtab:tabstop=2
|
90
90
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
|
5
5
|
|
6
6
|
if Rails::VERSION::MAJOR == 3
|
7
|
-
|
7
|
+
Oboe.logger.info "[oboe/loading] Instrumenting actionview" if Oboe::Config[:verbose]
|
8
8
|
|
9
9
|
if Rails::VERSION::MINOR == 0
|
10
10
|
ActionView::Partials::PartialRenderer.class_eval do
|
@@ -13,12 +13,12 @@ if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
|
|
13
13
|
entry_kvs = {}
|
14
14
|
begin
|
15
15
|
entry_kvs[:Language] = :ruby
|
16
|
-
entry_kvs[:ProfileName] = @options[:partial] if @options.is_a?(Hash)
|
17
16
|
entry_kvs[:FunctionName] = :render_partial
|
18
17
|
entry_kvs[:Class] = :PartialRenderer
|
19
18
|
entry_kvs[:Module] = 'ActionView::Partials'
|
20
19
|
entry_kvs[:File] = __FILE__
|
21
20
|
entry_kvs[:LineNumber] = __LINE__
|
21
|
+
entry_kvs[:ProfileName] = @options[:partial].to_s if @options.is_a?(Hash)
|
22
22
|
rescue
|
23
23
|
end
|
24
24
|
|
@@ -28,7 +28,7 @@ if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
|
|
28
28
|
exit_kvs = {}
|
29
29
|
begin
|
30
30
|
exit_kvs[:Language] = :ruby
|
31
|
-
exit_kvs[:ProfileName] = @options[:partial] if @options.is_a?(Hash)
|
31
|
+
exit_kvs[:ProfileName] = @options[:partial].to_s if @options.is_a?(Hash)
|
32
32
|
rescue
|
33
33
|
end
|
34
34
|
|
@@ -71,12 +71,12 @@ if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
|
|
71
71
|
entry_kvs = {}
|
72
72
|
begin
|
73
73
|
entry_kvs[:Language] = :ruby
|
74
|
-
entry_kvs[:ProfileName] = @options[:partial] if @options.is_a?(Hash)
|
75
74
|
entry_kvs[:FunctionName] = :render_partial
|
76
75
|
entry_kvs[:Class] = :PartialRenderer
|
77
76
|
entry_kvs[:Module] = :ActionView
|
78
77
|
entry_kvs[:File] = __FILE__
|
79
78
|
entry_kvs[:LineNumber] = __LINE__
|
79
|
+
entry_kvs[:ProfileName] = @options[:partial].to_s if @options.is_a?(Hash)
|
80
80
|
rescue
|
81
81
|
end
|
82
82
|
|
@@ -86,7 +86,7 @@ if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
|
|
86
86
|
exit_kvs = {}
|
87
87
|
begin
|
88
88
|
exit_kvs[:Language] = :ruby
|
89
|
-
exit_kvs[:ProfileName] = @options[:partial] if @options.is_a?(Hash)
|
89
|
+
exit_kvs[:ProfileName] = @options[:partial].to_s if @options.is_a?(Hash)
|
90
90
|
rescue
|
91
91
|
end
|
92
92
|
|
@@ -124,7 +124,7 @@ if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
|
|
124
124
|
end
|
125
125
|
end
|
126
126
|
elsif Rails::VERSION::MAJOR == 2
|
127
|
-
|
127
|
+
Oboe.logger.info "[oboe/loading] Instrumenting actionview" if Oboe::Config[:verbose]
|
128
128
|
|
129
129
|
ActionView::Partials.module_eval do
|
130
130
|
alias :render_partial_without_oboe :render_partial
|
@@ -133,12 +133,12 @@ if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
|
|
133
133
|
entry_kvs = {}
|
134
134
|
begin
|
135
135
|
entry_kvs[:Language] = :ruby
|
136
|
-
entry_kvs[:ProfileName] = options[:partial]
|
137
136
|
entry_kvs[:FunctionName] = :render_partial
|
138
137
|
entry_kvs[:Class] = :Partials
|
139
138
|
entry_kvs[:Module] = :ActionView
|
140
139
|
entry_kvs[:File] = __FILE__
|
141
140
|
entry_kvs[:LineNumber] = __LINE__
|
141
|
+
entry_kvs[:ProfileName] = options[:partial].to_s if options.is_a?(Hash)
|
142
142
|
rescue
|
143
143
|
end
|
144
144
|
|
@@ -148,7 +148,7 @@ if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
|
|
148
148
|
exit_kvs = {}
|
149
149
|
begin
|
150
150
|
exit_kvs[:Language] = :ruby
|
151
|
-
exit_kvs[:ProfileName] = options[:partial]
|
151
|
+
exit_kvs[:ProfileName] = options[:partial].to_s if options.is_a?(Hash)
|
152
152
|
rescue
|
153
153
|
end
|
154
154
|
|
@@ -108,13 +108,13 @@ module Oboe
|
|
108
108
|
if ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::method_defined? :exec_query
|
109
109
|
alias exec_query_without_oboe exec_query
|
110
110
|
alias exec_query exec_query_with_oboe
|
111
|
-
else
|
111
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument activerecord layer. Partial traces may occur."
|
112
112
|
end
|
113
113
|
|
114
114
|
if ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::method_defined? :exec_delete
|
115
115
|
alias exec_delete_without_oboe exec_delete
|
116
116
|
alias exec_delete exec_delete_with_oboe
|
117
|
-
else
|
117
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument activerecord layer. Partial traces may occur."
|
118
118
|
end
|
119
119
|
end
|
120
120
|
end
|
@@ -128,7 +128,7 @@ module Oboe
|
|
128
128
|
if ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::method_defined? :execute
|
129
129
|
alias execute_without_oboe execute
|
130
130
|
alias execute execute_with_oboe
|
131
|
-
else
|
131
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument activerecord layer. Partial traces may occur."
|
132
132
|
end
|
133
133
|
end
|
134
134
|
end
|
@@ -142,7 +142,7 @@ module Oboe
|
|
142
142
|
if ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter::method_defined? :execute
|
143
143
|
alias execute_without_oboe execute
|
144
144
|
alias execute execute_with_oboe
|
145
|
-
else
|
145
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument activerecord layer. Partial traces may occur."
|
146
146
|
end
|
147
147
|
end
|
148
148
|
end
|
@@ -156,7 +156,7 @@ module Oboe
|
|
156
156
|
if ActiveRecord::ConnectionAdapters::MysqlAdapter::method_defined? :exec_query
|
157
157
|
alias exec_query_without_oboe exec_query
|
158
158
|
alias exec_query exec_query_with_oboe
|
159
|
-
else
|
159
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument activerecord layer. Partial traces may occur."
|
160
160
|
end
|
161
161
|
end
|
162
162
|
end
|
@@ -170,14 +170,14 @@ module Oboe
|
|
170
170
|
if ActiveRecord::ConnectionAdapters::MysqlAdapter::method_defined? :execute
|
171
171
|
alias execute_without_oboe execute
|
172
172
|
alias execute execute_with_oboe
|
173
|
-
else
|
173
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument activerecord layer. Partial traces may occur."
|
174
174
|
end
|
175
175
|
|
176
176
|
if ::Rails::VERSION::MAJOR == 3 and ::Rails::VERSION::MINOR == 1
|
177
177
|
if ActiveRecord::ConnectionAdapters::MysqlAdapter::method_defined? :begin_db_transaction
|
178
178
|
alias begin_db_transaction_without_oboe begin_db_transaction
|
179
179
|
alias begin_db_transaction begin_db_transaction_with_oboe
|
180
|
-
else
|
180
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument activerecord layer. Partial traces may occur."
|
181
181
|
end
|
182
182
|
end
|
183
183
|
|
@@ -185,13 +185,13 @@ module Oboe
|
|
185
185
|
if ActiveRecord::ConnectionAdapters::MysqlAdapter::method_defined? :exec_query
|
186
186
|
alias exec_query_without_oboe exec_query
|
187
187
|
alias exec_query exec_query_with_oboe
|
188
|
-
else
|
188
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument activerecord layer. Partial traces may occur."
|
189
189
|
end
|
190
190
|
|
191
191
|
if ActiveRecord::ConnectionAdapters::MysqlAdapter::method_defined? :exec_delete
|
192
192
|
alias exec_delete_without_oboe exec_delete
|
193
193
|
alias exec_delete exec_delete_with_oboe
|
194
|
-
else
|
194
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument activerecord layer. Partial traces may occur."
|
195
195
|
end
|
196
196
|
end
|
197
197
|
end
|
@@ -207,13 +207,13 @@ module Oboe
|
|
207
207
|
if ActiveRecord::ConnectionAdapters::Mysql2Adapter::method_defined? :execute
|
208
208
|
alias execute_without_oboe execute
|
209
209
|
alias execute execute_with_oboe
|
210
|
-
else
|
210
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument activerecord layer. Partial traces may occur."
|
211
211
|
end
|
212
212
|
else
|
213
213
|
if ActiveRecord::ConnectionAdapters::Mysql2Adapter::method_defined? :exec_insert
|
214
214
|
alias exec_insert_without_oboe exec_insert
|
215
215
|
alias exec_insert exec_insert_with_oboe
|
216
|
-
else
|
216
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument activerecord layer. Partial traces may occur."
|
217
217
|
end
|
218
218
|
|
219
219
|
# In Rails 3.1, exec_query was defined as a private method
|
@@ -221,13 +221,13 @@ module Oboe
|
|
221
221
|
ActiveRecord::ConnectionAdapters::Mysql2Adapter::private_method_defined? :exec_query
|
222
222
|
alias exec_query_without_oboe exec_query
|
223
223
|
alias exec_query exec_query_with_oboe
|
224
|
-
else
|
224
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument activerecord layer. Partial traces may occur."
|
225
225
|
end
|
226
226
|
|
227
227
|
if ActiveRecord::ConnectionAdapters::Mysql2Adapter::method_defined? :exec_delete
|
228
228
|
alias exec_delete_without_oboe exec_delete
|
229
229
|
alias exec_delete exec_delete_with_oboe
|
230
|
-
else
|
230
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument activerecord layer. Partial traces may occur."
|
231
231
|
end
|
232
232
|
end
|
233
233
|
end
|
@@ -236,7 +236,7 @@ module Oboe
|
|
236
236
|
|
237
237
|
module FlavorInitializers
|
238
238
|
def self.mysql
|
239
|
-
|
239
|
+
Oboe.logger.info "[oboe/loading] Instrumenting activerecord mysqladapter" if Oboe::Config[:verbose]
|
240
240
|
if ::Rails::VERSION::MAJOR == 3 and ::Rails::VERSION::MINOR > 1
|
241
241
|
::ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter.module_eval do
|
242
242
|
include Oboe::Inst::ConnectionAdapters::AbstractMysqlAdapter
|
@@ -253,14 +253,14 @@ module Oboe
|
|
253
253
|
end
|
254
254
|
|
255
255
|
def self.mysql2
|
256
|
-
|
256
|
+
Oboe.logger.info "[oboe/loading] Instrumenting activerecord mysql2adapter" if Oboe::Config[:verbose]
|
257
257
|
::ActiveRecord::ConnectionAdapters::Mysql2Adapter.module_eval do
|
258
258
|
include Oboe::Inst::ConnectionAdapters::Mysql2Adapter
|
259
259
|
end if defined?(::ActiveRecord::ConnectionAdapters::Mysql2Adapter)
|
260
260
|
end
|
261
261
|
|
262
262
|
def self.postgresql
|
263
|
-
|
263
|
+
Oboe.logger.info "[oboe/loading] Instrumenting activerecord postgresqladapter" if Oboe::Config[:verbose]
|
264
264
|
::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.module_eval do
|
265
265
|
if ::Rails::VERSION::MAJOR == 3 and ::Rails::VERSION::MINOR > 0
|
266
266
|
include Oboe::Inst::ConnectionAdapters::PostgreSQLAdapter
|
@@ -271,7 +271,7 @@ module Oboe
|
|
271
271
|
end
|
272
272
|
|
273
273
|
def self.oracle
|
274
|
-
|
274
|
+
Oboe.logger.info "[oboe/loading] Instrumenting activerecord oracleenhancedadapter" if Oboe::Config[:verbose]
|
275
275
|
::ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.module_eval do
|
276
276
|
include Oboe::Inst::ConnectionAdapters
|
277
277
|
end if defined?(::ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter)
|
@@ -291,7 +291,7 @@ if Oboe::Config[:active_record][:enabled]
|
|
291
291
|
Oboe::Inst::ConnectionAdapters::FlavorInitializers.oracle if adapter == "oracleenhanced"
|
292
292
|
|
293
293
|
rescue Exception => e
|
294
|
-
|
294
|
+
Oboe.logger.error "[oboe/error] Oboe/ActiveRecord error: #{e.message}" if Oboe::Config[:verbose]
|
295
295
|
end
|
296
296
|
end
|
297
297
|
# vim:set expandtab:tabstop=2
|
data/lib/oboe/inst/cassandra.rb
CHANGED
@@ -285,7 +285,7 @@ module Oboe
|
|
285
285
|
end
|
286
286
|
|
287
287
|
if defined?(::Cassandra) and Oboe::Config[:cassandra][:enabled]
|
288
|
-
|
288
|
+
Oboe.logger.info "[oboe/loading] Instrumenting cassandra" if Oboe::Config[:verbose]
|
289
289
|
|
290
290
|
class ::Cassandra
|
291
291
|
include Oboe::Inst::Cassandra
|
@@ -297,7 +297,7 @@ if defined?(::Cassandra) and Oboe::Config[:cassandra][:enabled]
|
|
297
297
|
if method_defined?(m)
|
298
298
|
class_eval "alias #{m}_without_oboe #{m}"
|
299
299
|
class_eval "alias #{m} #{m}_with_oboe"
|
300
|
-
else
|
300
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument Cassandra (#{m}). Partial traces may occur."
|
301
301
|
end
|
302
302
|
end
|
303
303
|
|
@@ -305,7 +305,7 @@ if defined?(::Cassandra) and Oboe::Config[:cassandra][:enabled]
|
|
305
305
|
if method_defined?(:exists?)
|
306
306
|
alias exists_without_oboe? exists?
|
307
307
|
alias exists? exists_with_oboe?
|
308
|
-
else
|
308
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument Cassandra (exists?). Partial traces may occur."
|
309
309
|
end
|
310
310
|
end # class Cassandra
|
311
311
|
end
|
data/lib/oboe/inst/dalli.rb
CHANGED
@@ -8,11 +8,11 @@ module Oboe
|
|
8
8
|
|
9
9
|
def self.included(cls)
|
10
10
|
cls.class_eval do
|
11
|
-
|
11
|
+
Oboe.logger.info "[oboe/loading] Instrumenting memcache (dalli)" if Oboe::Config[:verbose]
|
12
12
|
if ::Dalli::Client.private_method_defined? :perform
|
13
13
|
alias perform_without_oboe perform
|
14
14
|
alias perform perform_with_oboe
|
15
|
-
else
|
15
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument Memcache (Dalli). Partial traces may occur."
|
16
16
|
end
|
17
17
|
|
18
18
|
if ::Dalli::Client.method_defined? :get_multi
|
data/lib/oboe/inst/http.rb
CHANGED
@@ -37,5 +37,5 @@ Net::HTTP.class_eval do
|
|
37
37
|
alias request_without_oboe request
|
38
38
|
alias request request_with_oboe
|
39
39
|
|
40
|
-
|
40
|
+
Oboe.logger.info "[oboe/loading] Instrumenting net/http" if Oboe::Config[:verbose]
|
41
41
|
end
|
data/lib/oboe/inst/memcache.rb
CHANGED
@@ -7,7 +7,7 @@ module Oboe
|
|
7
7
|
include Oboe::API::Memcache
|
8
8
|
|
9
9
|
def self.included(cls)
|
10
|
-
|
10
|
+
Oboe.logger.info "[oboe/loading] Instrumenting memcache" if Oboe::Config[:verbose]
|
11
11
|
|
12
12
|
cls.class_eval do
|
13
13
|
MEMCACHE_OPS.reject { |m| not method_defined?(m) }.each do |m|
|
@@ -33,21 +33,21 @@ module Oboe
|
|
33
33
|
alias request_setup_without_oboe request_setup
|
34
34
|
alias request_setup request_setup_with_oboe
|
35
35
|
elsif Oboe::Config[:verbose]
|
36
|
-
|
36
|
+
Oboe.logger.warn "[oboe/loading] Couldn't properly instrument Memcache. Partial traces may occur."
|
37
37
|
end
|
38
38
|
|
39
39
|
if ::MemCache.method_defined? :cache_get
|
40
40
|
alias cache_get_without_oboe cache_get
|
41
41
|
alias cache_get cache_get_with_oboe
|
42
42
|
elsif Oboe::Config[:verbose]
|
43
|
-
|
43
|
+
Oboe.logger.warn "[oboe/loading] Couldn't properly instrument Memcache. Partial traces may occur."
|
44
44
|
end
|
45
45
|
|
46
46
|
if ::MemCache.method_defined? :get_multi
|
47
47
|
alias get_multi_without_oboe get_multi
|
48
48
|
alias get_multi get_multi_with_oboe
|
49
49
|
elsif Oboe::Config[:verbose]
|
50
|
-
|
50
|
+
Oboe.logger.warn "[oboe/loading] Couldn't properly instrument Memcache. Partial traces may occur."
|
51
51
|
end
|
52
52
|
end
|
53
53
|
end
|
data/lib/oboe/inst/memcached.rb
CHANGED
@@ -8,7 +8,7 @@ module Oboe
|
|
8
8
|
include Oboe::API::Memcache
|
9
9
|
|
10
10
|
def self.included(cls)
|
11
|
-
|
11
|
+
Oboe.logger.info "[oboe/loading] Instrumenting memcached" if Oboe::Config[:verbose]
|
12
12
|
|
13
13
|
cls.class_eval do
|
14
14
|
MEMCACHE_OPS.reject { |m| not method_defined?(m) }.each do |m|
|
@@ -44,7 +44,7 @@ module Oboe
|
|
44
44
|
alias get_multi_without_oboe get_multi
|
45
45
|
alias get_multi get_multi_with_oboe
|
46
46
|
elsif Oboe::Config[:verbose]
|
47
|
-
|
47
|
+
Oboe.logger.warn "[oboe/loading] Couldn't properly instrument Memcached. Partial traces may occur."
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
data/lib/oboe/inst/mongo.rb
CHANGED
@@ -21,7 +21,7 @@ module Oboe
|
|
21
21
|
end
|
22
22
|
|
23
23
|
if defined?(::Mongo) and Oboe::Config[:mongo][:enabled]
|
24
|
-
|
24
|
+
Oboe.logger.info "[oboe/loading] Instrumenting mongo" if Oboe::Config[:verbose]
|
25
25
|
|
26
26
|
if defined?(::Mongo::DB)
|
27
27
|
module ::Mongo
|
data/lib/oboe/inst/moped.rb
CHANGED
@@ -23,7 +23,7 @@ module Oboe
|
|
23
23
|
end
|
24
24
|
|
25
25
|
if defined?(::Moped) and Oboe::Config[:moped][:enabled]
|
26
|
-
|
26
|
+
Oboe.logger.info "[oboe/loading] Instrumenting moped" if Oboe::Config[:verbose]
|
27
27
|
|
28
28
|
if defined?(::Moped::Database)
|
29
29
|
module ::Moped
|
@@ -73,7 +73,7 @@ if defined?(::Moped) and Oboe::Config[:moped][:enabled]
|
|
73
73
|
if method_defined?(m)
|
74
74
|
class_eval "alias #{m}_without_oboe #{m}"
|
75
75
|
class_eval "alias #{m} #{m}_with_oboe"
|
76
|
-
else
|
76
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument moped (#{m}). Partial traces may occur."
|
77
77
|
end
|
78
78
|
end
|
79
79
|
end
|
@@ -133,7 +133,7 @@ if defined?(::Moped) and Oboe::Config[:moped][:enabled]
|
|
133
133
|
if method_defined?(m)
|
134
134
|
class_eval "alias #{m}_without_oboe #{m}"
|
135
135
|
class_eval "alias #{m} #{m}_with_oboe"
|
136
|
-
else
|
136
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument moped (#{m}). Partial traces may occur."
|
137
137
|
end
|
138
138
|
end
|
139
139
|
end
|
@@ -314,7 +314,7 @@ if defined?(::Moped) and Oboe::Config[:moped][:enabled]
|
|
314
314
|
if method_defined?(m)
|
315
315
|
class_eval "alias #{m}_without_oboe #{m}"
|
316
316
|
class_eval "alias #{m} #{m}_with_oboe"
|
317
|
-
else
|
317
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument moped (#{m}). Partial traces may occur."
|
318
318
|
end
|
319
319
|
end
|
320
320
|
end
|
@@ -408,7 +408,7 @@ if defined?(::Moped) and Oboe::Config[:moped][:enabled]
|
|
408
408
|
if method_defined?(m)
|
409
409
|
class_eval "alias #{m}_without_oboe #{m}"
|
410
410
|
class_eval "alias #{m} #{m}_with_oboe"
|
411
|
-
else
|
411
|
+
else Oboe.logger.warn "[oboe/loading] Couldn't properly instrument moped (#{m}). Partial traces may occur."
|
412
412
|
end
|
413
413
|
end
|
414
414
|
end
|