Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-08-23 15:05:38 +0300
committerSean McGivern <sean@gitlab.com>2019-08-28 18:39:33 +0300
commit9bfb012a56918e3412ce767c19f5f9ca2329a78c (patch)
tree1939721d21ad320347d614fac8ff1c6a5ba9f24b /config
parent23c1cfcc110b52c1060f35a4a4a7816fb38adc6c (diff)
Add top-level warnings key to performance bar response
This key is useful to reduce the amount of logic needed on the frontend: if `has_warnings` is true, then the frontend knows that the request in question has warnings for some metric.
Diffstat (limited to 'config')
-rw-r--r--config/initializers/peek.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/config/initializers/peek.rb b/config/initializers/peek.rb
index f9055285e5c..a3810be70b2 100644
--- a/config/initializers/peek.rb
+++ b/config/initializers/peek.rb
@@ -1,6 +1,7 @@
require 'peek/adapters/redis'
Peek::Adapters::Redis.prepend ::Gitlab::PerformanceBar::RedisAdapterWhenPeekEnabled
+Peek.singleton_class.prepend ::Gitlab::PerformanceBar::WithTopLevelWarnings
Rails.application.config.peek.adapter = :redis, { client: ::Redis.new(Gitlab::Redis::Cache.params) }