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 851b7e8b0c4..997e8bde0e4 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.tracing[:active_support][:cache_key_enabled] + set_cache_key(span, key, mapping[:multi_key]) if configuration[: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 9feeb0295dd..59d1405774d 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.tracing[:active_support][:cache_key_enabled] + set_cache_key(span, key, multi_key) if configuration[:cache_key_enabled] yield end