Skip to content

Setup the click_house gem

Adam Hegyi requested to merge 358158-setup-clickhouse-gem into master

What does this MR do and why?

This MR sets up the ClickHouse database using the click_house gem. We plan to use ClikcHouse for the error tracking feature, see the related epic: &7772

Since the rollout of error tracking using ClickHouse is still WIP, we wanted to minimalize the impact on the .com and self-managed instances by not requiring the gem. If the click_house.yml is configured, the gem will be required within the initializer.

The MR also adds stub strategy implementation for the ErrorRepository. For now, it does not do anything...

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure click_house.yml
    cp config/click_house.example.yml config/click_house.yml
  2. Enable the feature flag for a project
    Feature.enable(:use_click_house_database_for_error_tracking, Project.find(2))
  3. Visit the error tracking page for the project: Monitor / ErrorTracking
  4. Verify that the page doesn't return any rows and the development.log file doesn't query the error_tracking_errors table.

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 Adam Hegyi

Merge request reports