diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-05 22:58:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-05 22:58:23 +0300 |
commit | 09432c7f561449734e2ae298496dc0f1d7da0d6a (patch) | |
tree | b444ddf7f6f8d25aa1af899f9c1f9a41feafaec7 /config | |
parent | e2aba30891c3deff4174df08b92817095eec38d5 (diff) |
Add latest changes from gitlab-org/gitlab@12-8-stable-ee
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/0_marginalia.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/config/initializers/0_marginalia.rb b/config/initializers/0_marginalia.rb index f88a90854e3..a697f67dbf2 100644 --- a/config/initializers/0_marginalia.rb +++ b/config/initializers/0_marginalia.rb @@ -9,7 +9,13 @@ require 'marginalia' # Refer: https://github.com/basecamp/marginalia/blob/v1.8.0/lib/marginalia/railtie.rb#L67 ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend(Gitlab::Marginalia::ActiveRecordInstrumentation) -Marginalia::Comment.components = [:application, :controller, :action, :correlation_id, :jid, :job_class, :line] +Marginalia::Comment.components = [:application, :controller, :action, :correlation_id, :jid, :job_class] + +# As mentioned in https://github.com/basecamp/marginalia/pull/93/files, +# adding :line has some overhead because a regexp on the backtrace has +# to be run on every SQL query. Only enable this in development because +# we've seen it slow things down. +Marginalia::Comment.components << :line if Rails.env.development? Gitlab::Marginalia.set_application_name |