cca61980d5
This ensures that we have more visibility in the number of SQL queries that are executed in web requests. The current threshold is hardcoded to 100 as we will rarely (maybe once or twice) change it. In production and development we use Sentry if enabled, in the test environment we raise an error. This feature is also only enabled in production/staging when running on GitLab.com as it's not very useful to other users.
9 lines
333 B
Ruby
9 lines
333 B
Ruby
if Gitlab::QueryLimiting.enable?
|
|
require_dependency 'gitlab/query_limiting/active_support_subscriber'
|
|
require_dependency 'gitlab/query_limiting/transaction'
|
|
require_dependency 'gitlab/query_limiting/middleware'
|
|
|
|
Gitlab::Application.configure do |config|
|
|
config.middleware.use(Gitlab::QueryLimiting::Middleware)
|
|
end
|
|
end
|