dd-trace-rb icon indicating copy to clipboard operation
dd-trace-rb copied to clipboard

WIP:Report correct ActiveSupport cache backend

Open marcotc opened this issue 2 years ago • 0 comments

Solves #1252

We currently report the globally configured Rails.configuration.cache_store as the cache backend tag (rails.cache.backend) regardless if the instrumented ActiveSupport cache object is actually the global cache_store.

This causes applications with multiple caching backends to incorrectly always report Rails.configuration.cache_store as the backend of all cache clients.

This PR now reports the respective client for the instrument ActiveSupport cache object. Current users should see no change, as the tag value is kept backwards compatible for Rails applications using only the global cache_store object.

Users with multiple cache backends will now see them correctly reported in the rails.cache.backend span tag.

marcotc avatar Sep 08 '22 01:09 marcotc