2019-07-26 09:03:00 -04:00
|
|
|
require 'peek/adapters/redis'
|
2018-01-11 11:34:01 -05:00
|
|
|
|
2019-07-26 09:03:00 -04:00
|
|
|
Peek::Adapters::Redis.prepend ::Gitlab::PerformanceBar::RedisAdapterWhenPeekEnabled
|
2019-08-23 08:05:38 -04:00
|
|
|
Peek.singleton_class.prepend ::Gitlab::PerformanceBar::WithTopLevelWarnings
|
2019-05-03 07:31:01 -04:00
|
|
|
|
2019-07-26 09:03:00 -04:00
|
|
|
Rails.application.config.peek.adapter = :redis, { client: ::Redis.new(Gitlab::Redis::Cache.params) }
|
2018-01-11 11:34:01 -05:00
|
|
|
|
2019-07-26 09:03:00 -04:00
|
|
|
Peek.into Peek::Views::Host
|
|
|
|
Peek.into Peek::Views::ActiveRecord
|
2018-03-08 04:58:24 -05:00
|
|
|
Peek.into Peek::Views::Gitaly
|
2019-07-17 15:33:49 -04:00
|
|
|
Peek.into Peek::Views::RedisDetailed
|
2020-05-28 02:08:26 -04:00
|
|
|
Peek.into Peek::Views::Elasticsearch
|
2019-07-21 01:34:46 -04:00
|
|
|
Peek.into Peek::Views::Rugged
|
2020-05-21 20:08:07 -04:00
|
|
|
Peek.into Peek::Views::BulletDetailed if defined?(Bullet)
|
2019-08-02 05:04:32 -04:00
|
|
|
|
2019-02-18 15:57:22 -05:00
|
|
|
Peek.into Peek::Views::Tracing if Labkit::Tracing.tracing_url_enabled?
|
2020-08-18 14:10:10 -04:00
|
|
|
|
|
|
|
ActiveSupport::Notifications.subscribe('endpoint_run.grape') do |_name, _start, _finish, _id, payload|
|
|
|
|
if request_id = payload[:env]['action_dispatch.request_id']
|
|
|
|
Peek.adapter.save(request_id)
|
|
|
|
end
|
|
|
|
end
|