diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-08-05 19:09:48 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-08-05 19:09:48 +0000 |
commit | e9918b1a949f478f42ebf8daee04cd0cb08977be (patch) | |
tree | 20bf71492e0f8c6e0d5dfad443369c19222428a7 /lib | |
parent | f3e2d04870907e12c4e79582b377a930f7e3f1e3 (diff) | |
parent | a43c84e6ab34056262cc6b831afa01043936b343 (diff) | |
download | gitlab-ce-e9918b1a949f478f42ebf8daee04cd0cb08977be.tar.gz |
Merge branch 'sh-disable-redis-peek' into 'master'
Only track Redis calls if Peek is enabled
See merge request gitlab-org/gitlab-ce!31438
Diffstat (limited to 'lib')
-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 |