Enable labkit logging field validator in the monolith

Summary

Enable the labkit logging field validator in the GitLab monolith. This validator detects usage of deprecated logging field names at runtime and supports iterative migration to standardized field names.

Background

The field validator was implemented in labkit-ruby MR !213 and performance-optimized in issue #60. It is now ready for monolith rollout.

Related epic: &338

Implementation

  1. Update gitlab-labkit gem to v1.3.4 (lockfile-only change, constraint ~> 1.3.0 already allows it)
    • Contains all performance optimizations from issue #60 (closed)
  2. Add .labkit_logging_todo.yml to the monolith root with skip_ci_failure: true for initial baseline generation
  3. Run a CI pipeline to generate the initial baseline of field offenses
  4. Use labkit-logging fetch to populate the todo file from pipeline output

How It Works

  • In non-production environments, the field validator intercepts JsonLogger.format_data calls
  • It detects deprecated field names (e.g., user_idgl_user_id) and records the callsite
  • In CI, offenses are emitted as NDJSON lines (LABKIT_LOGGING_OFFENSE: {...})
  • The labkit-logging fetch CLI tool collects offenses from CI jobs and updates the baseline
  • New offenses fail CI (once skip_ci_failure is removed), preventing regressions

Acceptance Criteria

  • gitlab-labkit updated to v1.3.4 in Gemfile.lock
  • .labkit_logging_todo.yml created with skip_ci_failure: true
  • CI pipeline runs successfully with the validator enabled
  • Initial baseline of offenses is captured

CI dashboards to track (performance)

Edited by Doug Barrett