mirror of https://github.com/rails/rails
Move default tagging configuration to the railtie
All other tags are there, so there is no need to keep them separated.
This commit is contained in:
parent
6d983e86da
commit
84376c3e03
|
@ -178,11 +178,3 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
ActiveSupport.on_load(:active_record) do
|
||||
ActiveRecord::QueryLogs.taggings.merge!(
|
||||
socket: -> { ActiveRecord::Base.connection_db_config.socket },
|
||||
db_host: -> { ActiveRecord::Base.connection_db_config.host },
|
||||
database: -> { ActiveRecord::Base.connection_db_config.database }
|
||||
)
|
||||
end
|
||||
|
|
|
@ -348,7 +348,10 @@ To keep using the current cache store, you can turn off cache versioning entirel
|
|||
if app.config.active_record.query_log_tags_enabled
|
||||
ActiveRecord::QueryLogs.taggings.merge!(
|
||||
application: -> { @application_name ||= Rails.application.class.name.split("::").first },
|
||||
pid: -> { Process.pid }
|
||||
pid: -> { Process.pid },
|
||||
socket: -> { ActiveRecord::Base.connection_db_config.socket },
|
||||
db_host: -> { ActiveRecord::Base.connection_db_config.host },
|
||||
database: -> { ActiveRecord::Base.connection_db_config.database }
|
||||
)
|
||||
|
||||
if app.config.active_record.query_log_tags.present?
|
||||
|
|
Loading…
Reference in New Issue