Skip to content

Add clickhouse logs to production

Felipe Artur requested to merge issue_424810_add_clickhouse_logging_to_prod into master

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.

  1. 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 and Gitlab::UrlBlocker#validate_local_network methods. This probably can be solved with a configuration somewhere, but I am not sure where it lies.
  2. Start GitLab rails console in production mode
  3. Execute any query in Clickhouse like'SELECT 1', :main)
  4. 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.

Edited by Felipe Artur

Merge request reports