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

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

Overview

Defines instrumentation for ActiveSupport cache fetching

Instance Method Summary collapse

Instance Method Details

#fetch(*args, &block) ⇒ Object



136
137
138
139
140
# File 'lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb', line 136

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

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