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

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

Overview

Defines the the legacy monkey-patching instrumentation for ActiveSupport cache fetch

Instance Method Summary collapse

Instance Method Details

#fetch(*args, &block) ⇒ Object



155
156
157
158
159
# File 'lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb', line 155

def fetch(*args, &block)
  return super if Instrumentation.nested_read?

  Instrumentation.trace(Ext::RESOURCE_CACHE_GET, dd_store_name, key: args[0]) { super }
end