Skip to content

Add scheduling task to report zoekt metrics

Terri Chu requested to merge tchu-add-zoekt-metrics-reporting into master

What does this MR do and why?

Add a new task to scheduling service to log metrics about each node

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

N/A

How to set up and validate locally

  1. setup gdk for zoekt
  2. stop the gdk versions of zoekt
    gdk stop gitlab-zoekt-indexer-development
  3. run the gdk indexer from that repository manually (this is needed to tests tasks at this time)
  4. tail the zoekt logs: tail -f logs/zoekt.log
  5. open rails console: rails c
  6. run the scheduling service task
    Search::Zoekt::SchedulingService.new('report_metrics').execute
  7. verify the logs output
{
  "severity": "INFO",
  "time": "2024-07-25T16:01:54.128Z",
  "class": "Search::Zoekt::SchedulingService",
  "meta": {
    "zoekt.node_name": "terrichus-MBP.localdomain",
    "zoekt.node_id": 9,
    "zoekt.used_bytes": 328197648384,
    "zoekt.total_bytes": 994662584320,
    "zoekt.task_count": 0,
    "zoekt.concurrency": 10
  },
  "indices_count": 4,
  "task_count_pending": 0,
  "task_count_failed": 3,
  "task_count_orphaned": 1,
  "task_count_done": 9,
  "message": "Reporting metrics",
  "task": "report_metrics"
}
Edited by Terri Chu

Merge request reports