module Datadog::Contrib::ActiveSupport::Cache::Patcher

Patcher enables patching of 'active_support' module.

Public Instance Methods

cache_store_class(meth) click to toggle source
# File lib/ddtrace/contrib/active_support/cache/patcher.rb, line 25
def cache_store_class(meth)
  ::ActiveSupport::Cache::Store
end
patch() click to toggle source
# File lib/ddtrace/contrib/active_support/cache/patcher.rb, line 18
def patch
  patch_cache_store_read
  patch_cache_store_fetch
  patch_cache_store_write
  patch_cache_store_delete
end
patch_cache_store_delete() click to toggle source
# File lib/ddtrace/contrib/active_support/cache/patcher.rb, line 41
def patch_cache_store_delete
  cache_store_class(:delete).send(:prepend, Cache::Instrumentation::Delete)
end
patch_cache_store_fetch() click to toggle source
# File lib/ddtrace/contrib/active_support/cache/patcher.rb, line 33
def patch_cache_store_fetch
  cache_store_class(:fetch).send(:prepend, Cache::Instrumentation::Fetch)
end
patch_cache_store_read() click to toggle source
# File lib/ddtrace/contrib/active_support/cache/patcher.rb, line 29
def patch_cache_store_read
  cache_store_class(:read).send(:prepend, Cache::Instrumentation::Read)
end
patch_cache_store_write() click to toggle source
# File lib/ddtrace/contrib/active_support/cache/patcher.rb, line 37
def patch_cache_store_write
  cache_store_class(:write).send(:prepend, Cache::Instrumentation::Write)
end
target_version() click to toggle source
# File lib/ddtrace/contrib/active_support/cache/patcher.rb, line 14
def target_version
  Integration.version
end