Skip to content

Store hostname of workerutil Record processor on job dequeue

Warren Gifford requested to merge nsc/dbworker-hostname into main

Created by: Strum355

This PR originally came out of a desire to know what gcloud VM was processing a particular code-intel autoindex job. Previously, if issues occurred relating to a particular host, we would have to go through logs for each host to track down which one was the offending one. This issue is compounded when trying to do aggregated analysis over a longer period of time. As we extract job processing out into separate services (such as through @efritz's work, this data point may become increasingly useful.

A new column is added to the tables of all processes that build upon dbworker/workerutil to track the hostname of the service processing a particular record. The hostname is overridable by setting the HOSTNAME environment variable. Affected tables: changeset_jobs, changesets, cm_action_jobs, cm_trigger_jobs, external_service_sync_jobs, insights_query_runner_jobs, lsif_dependency_indexing_jobs, lsif_indexes, lsif_uploads

Merge request reports

Loading