Skip to content

Add service ping for exact code search

Ravi Kumar requested to merge 461686-add-service-ping-for-exact-code-search into master

What does this MR do and why?

Add a metric class ZoektSearchEnabledMetric to track if a self managed customer has zoekt enabled in its application setting.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2024-06-04_at_09.13.15 Screenshot_2024-06-04_at_09.11.07

How to set up and validate locally

When setting zoekt_search_enabled is true

Run the following command in rails console

ApplicationSetting.last.update(zoekt_settings: {"zoekt_search_enabled"=>true, "zoekt_indexing_paused"=>false, "zoekt_indexing_enabled"=>true})

Now run the following script on terminal

bin/rake gitlab:usage_data:dump_sql_in_json | jq '.settings'

Notice that zoekt_search_enabled is true in the JSON

When setting zoekt_search_enabled is false

Run the following command in rails console

ApplicationSetting.last.update(zoekt_settings: {"zoekt_search_enabled"=>false, "zoekt_indexing_paused"=>false, "zoekt_indexing_enabled"=>true})

Now run the following script on terminal

bin/rake gitlab:usage_data:dump_sql_in_json | jq '.settings'

Notice that zoekt_search_enabled is false in the JSON

Related to #461686 (closed)

Edited by Ravi Kumar

Merge request reports