Module: Datadog::CacheStoreFetchExtension

Defined in:
lib/ddtrace/contrib/rails/core_extensions.rb

Overview

CacheStoreFetchExtension contains a new fetch function that notifies the framework of a fetch, then calls fetch.

Instance Method Summary collapse

Instance Method Details

#fetch(*args) ⇒ Object

It might seem redundant to instrument both read and fetch since fetch very often calls read. But there’s no garantee of this, in some cases fetch can call directly read_entry without calling read.



33
34
35
36
# File 'lib/ddtrace/contrib/rails/core_extensions.rb', line 33

def fetch(*args)
  ActiveSupport::Notifications.instrument('start_cache_fetch.active_support')
  super(*args)
end