diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-29 03:07:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-29 03:07:51 +0000 |
commit | d94ed2a46aad78435de66af05c84060ae78c8fc0 (patch) | |
tree | 19b057ae567e8bdd10289d290608362f466ca589 /config/initializers | |
parent | e56fd471503e00167ca96e7792f75a0d1f3b7891 (diff) | |
download | gitlab-ce-d94ed2a46aad78435de66af05c84060ae78c8fc0.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/initializers')
-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 |