Module: Datadog::Tracing::Contrib::ActiveSupport::Cache::Instrumentation::FetchMulti

Includes:
InstanceMethods
Defined in:
lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb

Overview

Defines instrumentation for ActiveSupport cache fetching of multiple keys

Instance Method Summary collapse

Instance Method Details

#fetch_multi(*args, &block) ⇒ Object



147
148
149
150
151
152
# File 'lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb', line 147

def fetch_multi(*args, &block)
  return super if Instrumentation.nested_multiread?

  keys = args[-1].instance_of?(Hash) ? args[0..-2] : args
  Instrumentation.trace(Ext::RESOURCE_CACHE_MGET, dd_store_name, multi_key: keys) { super }
end