Add clickhouse logs to production
What does this MR do and why?
Add clickhouse logging to production environment. Introduces a new logfile log/clickhouse.log
related to #424810 (closed)
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Setup clickhouse in your local environment. For this test, it is easier to use Clickhouse cloud as localhost requests are blocked in production environment. Another option is to comment
Gitlab::UrlBlocker#validate_localhost
,Gitlab::UrlBlocker#validate_loopback
andGitlab::UrlBlocker#validate_local_network
methods. This probably can be solved with a configuration somewhere, but I am not sure where it lies. - Start GitLab rails console in production mode
- Execute any query in Clickhouse like
ClickHouse::Client.select('SELECT 1', :main)
- Check the output at
log/clickhouse.log
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Felipe Cardozo