oboe 2.6.6.1 → 2.6.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +6 -0
  3. data/Appraisals +6 -16
  4. data/CHANGELOG.md +30 -14
  5. data/Gemfile +4 -3
  6. data/Gemfile.lock +20 -25
  7. data/Rakefile +5 -1
  8. data/ext/oboe_metal/extconf.rb +2 -2
  9. data/gemfiles/mongo.gemfile +33 -0
  10. data/gemfiles/moped.gemfile +33 -0
  11. data/lib/base.rb +28 -10
  12. data/lib/joboe_metal.rb +12 -34
  13. data/lib/method_profiling.rb +3 -3
  14. data/lib/oboe/api/layerinit.rb +14 -14
  15. data/lib/oboe/api/logging.rb +11 -11
  16. data/lib/oboe/api/profiling.rb +7 -6
  17. data/lib/oboe/api/tracing.rb +3 -3
  18. data/lib/oboe/api/util.rb +4 -4
  19. data/lib/oboe/config.rb +7 -7
  20. data/lib/oboe/frameworks/padrino.rb +2 -2
  21. data/lib/oboe/frameworks/rails.rb +11 -11
  22. data/lib/oboe/frameworks/rails/inst/action_controller.rb +4 -4
  23. data/lib/oboe/frameworks/rails/inst/action_view.rb +2 -2
  24. data/lib/oboe/frameworks/rails/inst/action_view_2x.rb +1 -1
  25. data/lib/oboe/frameworks/rails/inst/action_view_30.rb +1 -1
  26. data/lib/oboe/frameworks/rails/inst/active_record.rb +1 -1
  27. data/lib/oboe/frameworks/rails/inst/connection_adapters/mysql.rb +3 -3
  28. data/lib/oboe/frameworks/rails/inst/connection_adapters/mysql2.rb +2 -2
  29. data/lib/oboe/frameworks/rails/inst/connection_adapters/postgresql.rb +1 -1
  30. data/lib/oboe/frameworks/rails/inst/connection_adapters/utils.rb +8 -8
  31. data/lib/oboe/frameworks/sinatra.rb +33 -3
  32. data/lib/oboe/frameworks/sinatra/templates.rb +2 -2
  33. data/lib/oboe/inst/cassandra.rb +19 -19
  34. data/lib/oboe/inst/dalli.rb +7 -7
  35. data/lib/oboe/inst/http.rb +5 -5
  36. data/lib/oboe/inst/memcache.rb +14 -14
  37. data/lib/oboe/inst/memcached.rb +8 -8
  38. data/lib/oboe/inst/mongo.rb +2 -2
  39. data/lib/oboe/inst/moped.rb +29 -29
  40. data/lib/oboe/inst/rack.rb +3 -3
  41. data/lib/oboe/inst/redis.rb +24 -24
  42. data/lib/oboe/inst/resque.rb +4 -4
  43. data/lib/oboe/loading.rb +6 -6
  44. data/lib/oboe/logger.rb +4 -4
  45. data/lib/oboe/version.rb +1 -1
  46. data/lib/oboe_metal.rb +11 -39
  47. data/test/frameworks/apps/grape_simple.rb +1 -1
  48. data/test/frameworks/apps/sinatra_simple.rb +1 -1
  49. data/test/frameworks/padrino_test.rb +3 -3
  50. data/test/frameworks/sinatra_test.rb +3 -3
  51. data/test/instrumentation/cassandra_test.rb +45 -45
  52. data/test/instrumentation/http_test.rb +6 -6
  53. data/test/instrumentation/mongo_test.rb +347 -345
  54. data/test/instrumentation/moped_test.rb +40 -40
  55. data/test/instrumentation/redis_hashes_test.rb +20 -20
  56. data/test/instrumentation/redis_keys_test.rb +19 -19
  57. data/test/instrumentation/redis_lists_test.rb +22 -22
  58. data/test/instrumentation/redis_misc_test.rb +14 -14
  59. data/test/instrumentation/redis_sets_test.rb +20 -20
  60. data/test/instrumentation/redis_sortedsets_test.rb +25 -25
  61. data/test/instrumentation/redis_strings_test.rb +27 -27
  62. data/test/instrumentation/resque_test.rb +7 -7
  63. data/test/minitest_helper.rb +18 -6
  64. data/test/profiling/method_test.rb +24 -24
  65. data/test/support/liboboe_settings_test.rb +3 -3
  66. data/test/support/xtrace_test.rb +2 -2
  67. metadata +26 -32
  68. data/gemfiles/rails2.3.gemfile +0 -18
  69. data/gemfiles/rails2.3.gemfile.lock +0 -95
  70. data/gemfiles/rails3.0.gemfile +0 -18
  71. data/gemfiles/rails3.0.gemfile.lock +0 -142
  72. data/gemfiles/rails3.1.gemfile +0 -18
  73. data/gemfiles/rails3.1.gemfile.lock +0 -152
  74. data/gemfiles/rails3.2.gemfile +0 -18
  75. data/gemfiles/rails3.2.gemfile.lock +0 -150
@@ -11,7 +11,7 @@ module Oboe
11
11
  alias_method_chain :render, :oboe
12
12
  end
13
13
  end
14
-
14
+
15
15
  def process_with_oboe(*args)
16
16
  Oboe::API.trace('rails', {}) do
17
17
  process_without_oboe *args
@@ -38,7 +38,7 @@ module Oboe
38
38
  end
39
39
  end
40
40
  end
41
-
41
+
42
42
  module Rails4ActionController
43
43
  def self.included(base)
44
44
  base.class_eval do
@@ -46,7 +46,7 @@ module Oboe
46
46
  alias_method_chain :render, :oboe
47
47
  end
48
48
  end
49
-
49
+
50
50
  def process_action_with_oboe(method_name, *args)
51
51
  return process_action_without_oboe(method_name, *args) if Oboe::Config[:action_blacklist].present? &&
52
52
  Oboe::Config[:action_blacklist][[self.controller_name, self.action_name].join('#')]
@@ -75,7 +75,7 @@ if defined?(ActionController::Base) and Oboe::Config[:action_controller][:enable
75
75
  class ActionController::Base
76
76
  include Oboe::Inst::Rails4ActionController
77
77
  end
78
-
78
+
79
79
  elsif ::Rails::VERSION::MAJOR == 3
80
80
 
81
81
  class ActionController::Base
@@ -4,7 +4,7 @@
4
4
  if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
5
5
 
6
6
  ##
7
- # ActionView Instrumentation is version dependent. ActionView 2.x is separate
7
+ # ActionView Instrumentation is version dependent. ActionView 2.x is separate
8
8
  # and ActionView 3.0 is a special case.
9
9
  # Everything else goes here. (ActionView 3.1 - 4.0 as of this writing)
10
10
  #
@@ -48,7 +48,7 @@ if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
48
48
  ret = render_collection_without_oboe
49
49
  end
50
50
  end
51
-
51
+
52
52
  end
53
53
  end
54
54
  end
@@ -29,7 +29,7 @@ if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
29
29
  render_partial_without_oboe(options)
30
30
  end
31
31
  end
32
-
32
+
33
33
  alias :render_partial_collection_without_oboe :render_partial_collection
34
34
  def render_partial_collection(options = {})
35
35
  entry_kvs = {}
@@ -23,7 +23,7 @@ if defined?(ActionView::Base) and Oboe::Config[:action_view][:enabled]
23
23
  render_partial_without_oboe(object)
24
24
  end
25
25
  end
26
-
26
+
27
27
  alias :render_collection_without_oboe :render_collection
28
28
  def render_collection
29
29
  entry_kvs = {}
@@ -16,7 +16,7 @@ if Oboe::Config[:active_record][:enabled]
16
16
  Oboe::Inst::ConnectionAdapters::FlavorInitializers.postgresql if adapter == "postgresql"
17
17
  Oboe::Inst::ConnectionAdapters::FlavorInitializers.oracle if adapter == "oracleenhanced"
18
18
 
19
- rescue Exception => e
19
+ rescue StandardError => e
20
20
  Oboe.logger.error "[oboe/error] Oboe/ActiveRecord error: #{e.inspect}"
21
21
  Oboe.logger.debug e.backtrace.join("\n")
22
22
  end
@@ -9,7 +9,7 @@ module Oboe
9
9
  Oboe.logger.info "[oboe/loading] Instrumenting activerecord mysqladapter" if Oboe::Config[:verbose]
10
10
 
11
11
  # ActiveRecord 3.2 and higher
12
- if (::ActiveRecord::VERSION::MAJOR == 3 and ::ActiveRecord::VERSION::MINOR >= 2) or
12
+ if (::ActiveRecord::VERSION::MAJOR == 3 and ::ActiveRecord::VERSION::MINOR >= 2) or
13
13
  ::ActiveRecord::VERSION::MAJOR == 4
14
14
 
15
15
  # AbstractMysqlAdapter
@@ -24,13 +24,13 @@ module Oboe
24
24
 
25
25
  else
26
26
  # ActiveRecord 3.1 and below
27
-
27
+
28
28
  # MysqlAdapter
29
29
  Oboe::Util.send_include(::ActiveRecord::ConnectionAdapters::MysqlAdapter,
30
30
  Oboe::Inst::ConnectionAdapters::Utils)
31
31
 
32
32
  Oboe::Util.method_alias(::ActiveRecord::ConnectionAdapters::MysqlAdapter, :execute)
33
-
33
+
34
34
  if ::ActiveRecord::VERSION::MAJOR == 3 and ::ActiveRecord::VERSION::MINOR == 1
35
35
  Oboe::Util.method_alias(::ActiveRecord::ConnectionAdapters::MysqlAdapter, :begin_db_transaction)
36
36
  Oboe::Util.method_alias(::ActiveRecord::ConnectionAdapters::MysqlAdapter, :exec_delete)
@@ -7,12 +7,12 @@ module Oboe
7
7
  module FlavorInitializers
8
8
  def self.mysql2
9
9
  Oboe.logger.info "[oboe/loading] Instrumenting activerecord mysql2adapter" if Oboe::Config[:verbose]
10
-
10
+
11
11
  Oboe::Util.send_include(::ActiveRecord::ConnectionAdapters::Mysql2Adapter,
12
12
  Oboe::Inst::ConnectionAdapters::Utils)
13
13
 
14
14
  if (::ActiveRecord::VERSION::MAJOR == 3 and ::ActiveRecord::VERSION::MINOR == 0) or
15
- ::ActiveRecord::VERSION::MAJOR == 2
15
+ ::ActiveRecord::VERSION::MAJOR == 2
16
16
  # ActiveRecord 3.0 and prior
17
17
  Oboe::Util.method_alias(::ActiveRecord::ConnectionAdapters::Mysql2Adapter, :execute)
18
18
  else
@@ -12,7 +12,7 @@ module Oboe
12
12
  Oboe::Util.send_include(::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter,
13
13
  Oboe::Inst::ConnectionAdapters::Utils)
14
14
 
15
- if (::ActiveRecord::VERSION::MAJOR == 3 and ::ActiveRecord::VERSION::MINOR > 0) or
15
+ if (::ActiveRecord::VERSION::MAJOR == 3 and ::ActiveRecord::VERSION::MINOR > 0) or
16
16
  ::ActiveRecord::VERSION::MAJOR == 4
17
17
 
18
18
  # ActiveRecord 3.1 and up
@@ -5,7 +5,7 @@ module Oboe
5
5
  module Inst
6
6
  module ConnectionAdapters
7
7
  module Utils
8
-
8
+
9
9
  def extract_trace_details(sql, name = nil, binds = [])
10
10
  opts = {}
11
11
 
@@ -26,7 +26,7 @@ module Oboe
26
26
  config = ::Rails.configuration.database_configuration[::Rails.env]
27
27
  else
28
28
  config = ::Rails.application.config.database_configuration[::Rails.env]
29
- end
29
+ end
30
30
 
31
31
  opts[:Database] = config["database"] if config.has_key?("database")
32
32
  opts[:RemoteHost] = config["host"] if config.has_key?("host")
@@ -42,7 +42,7 @@ module Oboe
42
42
  # We don't want to trace framework caches. Only instrument SQL that
43
43
  # directly hits the database.
44
44
  def ignore_payload?(name)
45
- %w(SCHEMA EXPLAIN CACHE).include? name.to_s or
45
+ %w(SCHEMA EXPLAIN CACHE).include? name.to_s or
46
46
  (name and name.to_sym == :skip_logging) or
47
47
  name == "ActiveRecord::SchemaMigration Load"
48
48
  end
@@ -50,7 +50,7 @@ module Oboe
50
50
  #def cfg
51
51
  # @config
52
52
  #end
53
-
53
+
54
54
  def execute_with_oboe(sql, name = nil)
55
55
  if Oboe.tracing? and !ignore_payload?(name)
56
56
 
@@ -62,7 +62,7 @@ module Oboe
62
62
  execute_without_oboe(sql, name)
63
63
  end
64
64
  end
65
-
65
+
66
66
  def exec_query_with_oboe(sql, name = nil, binds = [])
67
67
  if Oboe.tracing? and !ignore_payload?(name)
68
68
 
@@ -74,7 +74,7 @@ module Oboe
74
74
  exec_query_without_oboe(sql, name, binds)
75
75
  end
76
76
  end
77
-
77
+
78
78
  def exec_delete_with_oboe(sql, name = nil, binds = [])
79
79
  if Oboe.tracing? and !ignore_payload?(name)
80
80
 
@@ -86,7 +86,7 @@ module Oboe
86
86
  exec_delete_without_oboe(sql, name, binds)
87
87
  end
88
88
  end
89
-
89
+
90
90
  def exec_insert_with_oboe(sql, name = nil, binds = [], *args)
91
91
  if Oboe.tracing? and !ignore_payload?(name)
92
92
 
@@ -98,7 +98,7 @@ module Oboe
98
98
  exec_insert_without_oboe(sql, name, binds, *args)
99
99
  end
100
100
  end
101
-
101
+
102
102
  def begin_db_transaction_with_oboe()
103
103
  if Oboe.tracing?
104
104
  opts = {}
@@ -31,11 +31,41 @@ module Oboe
31
31
  dispatch_without_oboe
32
32
  end
33
33
  end
34
-
34
+
35
35
  def handle_exception_with_oboe(boom)
36
36
  Oboe::API.log_exception(nil, boom) if Oboe.tracing?
37
37
  handle_exception_without_oboe(boom)
38
38
  end
39
+
40
+ @@rum_xhr_tmpl = File.read(File.dirname(__FILE__) + '/rails/helpers/rum/rum_ajax_header.js.erb')
41
+ @@rum_hdr_tmpl = File.read(File.dirname(__FILE__) + '/rails/helpers/rum/rum_header.js.erb')
42
+ @@rum_ftr_tmpl = File.read(File.dirname(__FILE__) + '/rails/helpers/rum/rum_footer.js.erb')
43
+
44
+ def oboe_rum_header
45
+ return unless Oboe::Config.rum_id
46
+ if Oboe.tracing?
47
+ if request.xhr?
48
+ return ERB.new(@@rum_xhr_tmpl).result
49
+ else
50
+ return ERB.new(@@rum_hdr_tmpl).result
51
+ end
52
+ end
53
+ rescue StandardError => e
54
+ Oboe.logger.warn "oboe_rum_header: #{e.message}."
55
+ return ""
56
+ end
57
+
58
+ def oboe_rum_footer
59
+ return unless Oboe::Config.rum_id
60
+ if Oboe.tracing?
61
+ # Even though the footer template is named xxxx.erb, there are no ERB tags in it so we'll
62
+ # skip that step for now
63
+ return @@rum_ftr_tmpl
64
+ end
65
+ rescue StandardError => e
66
+ Oboe.logger.warn "oboe_rum_footer: #{e.message}."
67
+ return ""
68
+ end
39
69
  end
40
70
  end
41
71
  end
@@ -54,11 +84,11 @@ if defined?(::Sinatra)
54
84
  # When in TEST environment, we load this instrumentation regardless.
55
85
  # Otherwise, only when Padrino isn't around.
56
86
  unless defined?(::Padrino) and not (ENV['RACK_ENV'] == "test")
57
- # Padrino has 'enhanced' routes and rendering so the Sinatra
87
+ # Padrino has 'enhanced' routes and rendering so the Sinatra
58
88
  # instrumentation won't work anyways. Only load for pure Sinatra apps.
59
89
  ::Oboe::Util.send_include(::Sinatra::Base, ::Oboe::Sinatra::Base)
60
90
  ::Oboe::Util.send_include(::Sinatra::Templates, ::Oboe::Sinatra::Templates)
61
-
91
+
62
92
  # Report __Init after fork when in Heroku
63
93
  Oboe::API.report_init unless Oboe.heroku?
64
94
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Oboe
5
5
  module Sinatra
6
- module Templates
6
+ module Templates
7
7
  def self.included(klass)
8
8
  ::Oboe::Util.method_alias(klass, :render, ::Sinatra::Templates)
9
9
  end
@@ -16,7 +16,7 @@ module Oboe
16
16
  report_kvs[:template] = data
17
17
 
18
18
  if Oboe::Context.tracing_layer_op?('render')
19
- # For recursive calls to :render (for sub-partials and layouts),
19
+ # For recursive calls to :render (for sub-partials and layouts),
20
20
  # use method profiling.
21
21
  begin
22
22
  name = data
@@ -11,7 +11,7 @@ module Oboe
11
11
  report_kvs[:Op] = op.to_s
12
12
  report_kvs[:Cf] = column_family.to_s if column_family
13
13
  report_kvs[:Key] = keys.inspect if keys
14
-
14
+
15
15
  # Open issue - how to handle multiple Cassandra servers
16
16
  report_kvs[:RemoteHost], report_kvs[:RemotePort] = @servers.first.split(":")
17
17
 
@@ -20,7 +20,7 @@ module Oboe
20
20
  if options.empty? and args.is_a?(Array)
21
21
  options = args.last if args.last.is_a?(Hash)
22
22
  end
23
-
23
+
24
24
  unless options.empty?
25
25
  [:start_key, :finish_key, :key_count, :batch_size, :columns, :count, :start,
26
26
  :stop, :finish, :finished, :reversed, :consistency, :ttl].each do |k|
@@ -73,10 +73,10 @@ module Oboe
73
73
  send :count_columns_without_oboe, *args
74
74
  end
75
75
  end
76
-
76
+
77
77
  def get_columns_with_oboe(column_family, key, *columns_and_options)
78
78
  args = [column_family, key] + columns_and_options
79
-
79
+
80
80
  if Oboe.tracing? and not Oboe::Context.tracing_layer_op?(:multi_get_columns)
81
81
  report_kvs = extract_trace_details(:get_columns, column_family, key, columns_and_options)
82
82
 
@@ -87,7 +87,7 @@ module Oboe
87
87
  send :get_columns_without_oboe, *args
88
88
  end
89
89
  end
90
-
90
+
91
91
  def multi_get_columns_with_oboe(column_family, key, *columns_and_options)
92
92
  return send :multi_get_columns_without_oboe, *args unless Oboe.tracing?
93
93
 
@@ -109,10 +109,10 @@ module Oboe
109
109
  send :get_without_oboe, *args
110
110
  end
111
111
  end
112
-
112
+
113
113
  def multi_get_with_oboe(column_family, key, *columns_and_options)
114
114
  args = [column_family, key] + columns_and_options
115
-
115
+
116
116
  if Oboe.tracing? and not Oboe::Context.tracing_layer_op?(:get)
117
117
  report_kvs = extract_trace_details(:multi_get, column_family, key, columns_and_options)
118
118
 
@@ -134,7 +134,7 @@ module Oboe
134
134
  send :exists_without_oboe?, *args
135
135
  end
136
136
  end
137
-
137
+
138
138
  def get_range_single_with_oboe(column_family, options = {})
139
139
  if Oboe.tracing? and not Oboe::Context.tracing_layer_op?(:get_range_batch)
140
140
  report_kvs = extract_trace_details(:get_range_single, column_family, nil, nil)
@@ -147,10 +147,10 @@ module Oboe
147
147
  get_range_single_without_oboe(column_family, options)
148
148
  end
149
149
  end
150
-
150
+
151
151
  def get_range_batch_with_oboe(column_family, options = {})
152
152
  return get_range_batch_without_oboe(column_family, options) unless Oboe.tracing?
153
-
153
+
154
154
  report_kvs = extract_trace_details(:get_range_batch, column_family, nil, nil)
155
155
  args = [column_family, options]
156
156
 
@@ -158,7 +158,7 @@ module Oboe
158
158
  get_range_batch_without_oboe(column_family, options)
159
159
  end
160
160
  end
161
-
161
+
162
162
  def get_indexed_slices_with_oboe(column_family, index_clause, *columns_and_options)
163
163
  return send :get_indexed_slices_without_oboe, *args unless Oboe.tracing?
164
164
 
@@ -174,7 +174,7 @@ module Oboe
174
174
  unless Oboe.tracing?
175
175
  return create_index_without_oboe(keyspace, column_family, column_name, validation_class)
176
176
  end
177
-
177
+
178
178
  report_kvs = extract_trace_details(:create_index, column_family, nil, nil)
179
179
  begin
180
180
  report_kvs[:Keyspace] = keyspace.to_s
@@ -190,7 +190,7 @@ module Oboe
190
190
 
191
191
  def drop_index_with_oboe(keyspace, column_family, column_name)
192
192
  return drop_index_without_oboe(keyspace, column_family, column_name) unless Oboe.tracing?
193
-
193
+
194
194
  report_kvs = extract_trace_details(:drop_index, column_family, nil, nil)
195
195
  begin
196
196
  report_kvs[:Keyspace] = keyspace.to_s
@@ -216,7 +216,7 @@ module Oboe
216
216
  add_column_family_without_oboe(cf_def)
217
217
  end
218
218
  end
219
-
219
+
220
220
  def drop_column_family_with_oboe(column_family)
221
221
  return drop_column_family_without_oboe(column_family) unless Oboe.tracing?
222
222
 
@@ -226,7 +226,7 @@ module Oboe
226
226
  drop_column_family_without_oboe(column_family)
227
227
  end
228
228
  end
229
-
229
+
230
230
  def add_keyspace_with_oboe(ks_def)
231
231
  return add_keyspace_without_oboe(ks_def) unless Oboe.tracing?
232
232
 
@@ -237,10 +237,10 @@ module Oboe
237
237
  add_keyspace_without_oboe(ks_def)
238
238
  end
239
239
  end
240
-
240
+
241
241
  def drop_keyspace_with_oboe(keyspace)
242
242
  return drop_keyspace_without_oboe(keyspace) unless Oboe.tracing?
243
-
243
+
244
244
  report_kvs = extract_trace_details(:drop_keyspace, nil, nil, nil)
245
245
  report_kvs[:Name] = keyspace.to_s rescue ""
246
246
 
@@ -254,11 +254,11 @@ end
254
254
 
255
255
  if defined?(::Cassandra) and Oboe::Config[:cassandra][:enabled]
256
256
  Oboe.logger.info "[oboe/loading] Instrumenting cassandra" if Oboe::Config[:verbose]
257
-
257
+
258
258
  class ::Cassandra
259
259
  include Oboe::Inst::Cassandra
260
260
 
261
- [ :insert, :remove, :count_columns, :get_columns, :multi_get_columns, :get,
261
+ [ :insert, :remove, :count_columns, :get_columns, :multi_get_columns, :get,
262
262
  :multi_get, :get_range_single, :get_range_batch, :get_indexed_slices,
263
263
  :create_index, :drop_index, :add_column_family, :drop_column_family,
264
264
  :add_keyspace, :drop_keyspace].each do |m|
@@ -24,7 +24,7 @@ module Oboe
24
24
 
25
25
  def perform_with_oboe(*all_args, &blk)
26
26
  op, key, *args = *all_args
27
-
27
+
28
28
  if Oboe.tracing? and not Oboe::Context.tracing_layer_op?(:get_multi)
29
29
  Oboe::API.trace('memcache', { :KVOp => op, :KVKey => key }) do
30
30
  result = perform_without_oboe(*all_args, &blk)
@@ -32,7 +32,7 @@ module Oboe
32
32
  info_kvs = {}
33
33
  info_kvs[:KVHit] = memcache_hit?(result) if op == :get and key.class == String
34
34
  info_kvs[:Backtrace] = Oboe::API.backtrace if Oboe::Config[:dalli][:collect_backtraces]
35
-
35
+
36
36
  Oboe::API.log('memcache', 'info', info_kvs) unless info_kvs.empty?
37
37
  result
38
38
  end
@@ -43,11 +43,11 @@ module Oboe
43
43
 
44
44
  def get_multi_with_oboe(*keys)
45
45
  return get_multi_without_oboe(keys) unless Oboe.tracing?
46
-
46
+
47
47
  info_kvs = {}
48
-
48
+
49
49
  begin
50
- info_kvs[:KVKeyCount] = keys.flatten.length
50
+ info_kvs[:KVKeyCount] = keys.flatten.length
51
51
  info_kvs[:KVKeyCount] = (info_kvs[:KVKeyCount] - 1) if keys.last.is_a?(Hash) || keys.last.nil?
52
52
  rescue
53
53
  Oboe.logger.debug "[oboe/debug] Error collecting info keys: #{e.message}"
@@ -56,12 +56,12 @@ module Oboe
56
56
 
57
57
  Oboe::API.trace('memcache', { :KVOp => :get_multi }, :get_multi) do
58
58
  values = get_multi_without_oboe(keys)
59
-
59
+
60
60
  info_kvs[:KVHitCount] = values.length
61
61
  info_kvs[:Backtrace] = Oboe::API.backtrace if Oboe::Config[:dalli][:collect_backtraces]
62
62
  Oboe::API.log('memcache', 'info', info_kvs)
63
63
 
64
- values
64
+ values
65
65
  end
66
66
  end
67
67
  end