doc/development/application_slis/zoekt_tasks.md
The Zoekt tasks SLIs track the performance and reliability of asynchronous indexing tasks for Zoekt code search.
The following metrics are emitted for Zoekt task processing:
gitlab_sli_search_zoekt_tasks_requests_total: Counter that tracks the rate of tasks
being added to the Zoekt indexing queue. This metric increments when tasks are created
via Search::Zoekt::Repository#create_bulk_tasks.gitlab_sli_search_zoekt_tasks_total: Counter for total number of task completion attempts.gitlab_sli_search_zoekt_tasks_error_total: Counter for tasks that reached final failure state
(after retries exhausted). This metric only increments when a task transitions to the :failed
state, not during intermediate retries.The Apdex SLI measures task completion performance with a 30-minute (1800 second) threshold. This threshold aligns with the indexing timeout to ensure consistency with task execution limits.
The following metrics track Apdex:
gitlab_sli_search_zoekt_tasks_apdex_total: Counter for total number of completed tasks.gitlab_sli_search_zoekt_tasks_apdex_success_total: Counter for tasks that completed
within the 30-minute threshold.All metrics include the following labels for detailed analysis:
zoekt_node: The Zoekt node identifier handling the task (from zoekt_node_id)task_type: The operation type, such as:
index_repo: Full repository indexingdelete_repo: Repository deletion from indexrate(gitlab_sli_search_zoekt_tasks_apdex_success_total[5m])
/
rate(gitlab_sli_search_zoekt_tasks_apdex_total[5m])
sum by (zoekt_node) (
rate(gitlab_sli_search_zoekt_tasks_error_total[5m])
)
/
sum by (zoekt_node) (
rate(gitlab_sli_search_zoekt_tasks_total[5m])
)
sum by (task_type) (
rate(gitlab_sli_search_zoekt_tasks_requests_total[5m])
)
rate(gitlab_sli_search_zoekt_tasks_apdex_total[5m])
-
rate(gitlab_sli_search_zoekt_tasks_apdex_success_total[5m])
sum by (zoekt_node, task_type) (
rate(gitlab_sli_search_zoekt_tasks_error_total[5m])
)
The SLI is defined in Gitlab::Metrics::ZoektTasksSlis and instrumented at key
points in the task lifecycle:
Search::Zoekt::Repository#create_bulk_tasksSearch::Zoekt::CallbackService#process_failureSearch::Zoekt::CallbackService#process_zoekt_successFor more information about Application SLIs, see the Application SLI framework documentation.