Add new metric for advanced search limited indexing setting
What does this MR do and why?
Background
Related to #214601 (closed) and #413855
Index integrity is currently tied to search results, but it would be nice to move to a CronWorker. That CronWorker needs the ability to query all indexed projects which isn't possible due to the use of indexing limiting and allowing any namespace/group/subgroup to be limited. The queries just time out. It would be a lot easier to iterate through projects if top level namespaces were the only types allowed for indexing limiting.
I'd like to learn how customers are using limited indexing to determine if limiting could change to only top level namespaces. Currently any group (including subgroups) can used. On GitLab.com, we use it at the top level namespace only.
The what
This MR introduces a service ping metric to see how many customers are using indexing limiting for Advanced Search.
Screenshots or screen recordings
N/A
How to set up and validate locally
- setup GDK for elasticsearch, enable indexing
- enable index limiting in the Admin UI - Settings - Advanced Search (add any namespace or project)
-
test that
elastic_search_limited_indexing_enabled
is true (might need to wait for cache to expire)sp = Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values) sp['elasticsearch_limited_indexing_enabled'] # should be true
-
disable index limiting in the Admin UI - Settings - Advanced Search
-
test that
elastic_search_limited_indexing_enabled
is truesp = Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values) sp['elasticsearch_limited_indexing_enabled'] # should be false
-
disable Advanced Search indexing
-
verify that
elastic_search_limited_indexing_enabled
does not get populatedsp = Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values) sp['elasticsearch_limited_indexing_enabled'] # should be nil
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.