Standardize project_id logging field across all index patterns

Problem

The project_id field is currently logged inconsistently across different components, making it difficult to correlate logs and debug issues efficiently. This is particularly problematic for GitLab Dedicated which experiences 2-3x more incidents than GitLab.com.

Current State

The following variations of project ID fields exist in our logs:

  • project_id
  • extra.project_id
  • meta.project_id
  • meta.search.project_id
  • job_project_id
  • target_project_id

Proposed Solution

Standardize on a single field name for project ID following the Observability Field Standardisation pattern.

Acceptance Criteria

  • Define the canonical field name for project ID in LabKit
  • Update all logging implementations to use the standardized field
  • Verify the field is consistently available across all index patterns
  • Update any dashboards or alerts that reference the old field names
  • Document the migration path for existing queries