lib/oboe/inst/dalli.rb in oboe-2.6.6.1 vs lib/oboe/inst/dalli.rb in oboe-2.6.7.1

- old
+ new

@@ -22,47 +22,47 @@ end end def perform_with_oboe(*all_args, &blk) op, key, *args = *all_args - + if Oboe.tracing? and not Oboe::Context.tracing_layer_op?(:get_multi) Oboe::API.trace('memcache', { :KVOp => op, :KVKey => key }) do result = perform_without_oboe(*all_args, &blk) info_kvs = {} info_kvs[:KVHit] = memcache_hit?(result) if op == :get and key.class == String info_kvs[:Backtrace] = Oboe::API.backtrace if Oboe::Config[:dalli][:collect_backtraces] - + Oboe::API.log('memcache', 'info', info_kvs) unless info_kvs.empty? result end else perform_without_oboe(*all_args, &blk) end end def get_multi_with_oboe(*keys) return get_multi_without_oboe(keys) unless Oboe.tracing? - + info_kvs = {} - + begin - info_kvs[:KVKeyCount] = keys.flatten.length + info_kvs[:KVKeyCount] = keys.flatten.length info_kvs[:KVKeyCount] = (info_kvs[:KVKeyCount] - 1) if keys.last.is_a?(Hash) || keys.last.nil? rescue Oboe.logger.debug "[oboe/debug] Error collecting info keys: #{e.message}" Oboe.logger.debug e.backtrace end Oboe::API.trace('memcache', { :KVOp => :get_multi }, :get_multi) do values = get_multi_without_oboe(keys) - + info_kvs[:KVHitCount] = values.length info_kvs[:Backtrace] = Oboe::API.backtrace if Oboe::Config[:dalli][:collect_backtraces] Oboe::API.log('memcache', 'info', info_kvs) - values + values end end end end end