diff options
Diffstat (limited to 'lib/peek/views')
-rw-r--r-- | lib/peek/views/redis_detailed.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/peek/views/redis_detailed.rb b/lib/peek/views/redis_detailed.rb index b95307deddb..f36f581d5e9 100644 --- a/lib/peek/views/redis_detailed.rb +++ b/lib/peek/views/redis_detailed.rb @@ -16,6 +16,7 @@ module Gitlab private def add_call_details(duration, args) + return unless peek_enabled? # redis-rb passes an array (e.g. [:get, key]) return unless args.length == 1 @@ -26,6 +27,10 @@ module Gitlab } end + def peek_enabled? + Gitlab::SafeRequestStore.store[:peek_enabled] + end + def detail_store ::Gitlab::SafeRequestStore['redis_call_details'] ||= [] end |