diff --git a/lib/datadog/tracing/contrib/active_support/cache/events/cache.rb b/lib/datadog/tracing/contrib/active_support/cache/events/cache.rb index af9cc664137..1a4f6fe2d97 100644 --- a/lib/datadog/tracing/contrib/active_support/cache/events/cache.rb +++ b/lib/datadog/tracing/contrib/active_support/cache/events/cache.rb @@ -81,7 +81,7 @@ def on_start(span, event, _id, payload) span.set_tag('EVENT', event) - set_cache_key(span, key, mapping[:multi_key]) if datadog_configuration[:cache_key_enabled] + set_cache_key(span, key, mapping[:multi_key]) if datadog_configuration[:active_support][:cache_key_enabled] rescue StandardError => e Datadog.logger.error(e.message) Datadog::Core::Telemetry::Logger.report(e) diff --git a/lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb b/lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb index d55bffd899d..9769b5e3364 100644 --- a/lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb +++ b/lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb @@ -59,7 +59,7 @@ def trace(action, store, key: nil, multi_key: nil) span.set_tag(Ext::TAG_CACHE_BACKEND, store) if store - set_cache_key(span, key, multi_key) if datadog_configuration[:cache_key_enabled] + set_cache_key(span, key, multi_key) if datadog_configuration[:active_support][:cache_key_enabled] yield end