Sha256: db46dd07480ddd333b47c3c8b56afd87a0b6e9c6004d4c708270f44610c2b91a
Contents?: true
Size: 1.23 KB
Versions: 21
Compression:
Stored size: 1.23 KB
Contents
require 'ddtrace/contrib/patcher' require 'ddtrace/contrib/active_support/cache/instrumentation' module Datadog module Contrib module ActiveSupport module Cache # Patcher enables patching of 'active_support' module. module Patcher include Contrib::Patcher module_function def target_version Integration.version end def patch patch_cache_store_read patch_cache_store_fetch patch_cache_store_write patch_cache_store_delete end def cache_store_class(meth) ::ActiveSupport::Cache::Store end def patch_cache_store_read cache_store_class(:read).send(:prepend, Cache::Instrumentation::Read) end def patch_cache_store_fetch cache_store_class(:fetch).send(:prepend, Cache::Instrumentation::Fetch) end def patch_cache_store_write cache_store_class(:write).send(:prepend, Cache::Instrumentation::Write) end def patch_cache_store_delete cache_store_class(:delete).send(:prepend, Cache::Instrumentation::Delete) end end end end end end
Version data entries
21 entries across 21 versions & 2 rubygems