Enable the pipeline creation logger by default

What does this MR do and why?

This MR enables the ci_pipeline_creation_logger ops feature flag by default.

In config/feature_flags/ops/ci_pipeline_creation_logger.yml:

  • default_enabled changes from false to true.
  • milestone changes from '14.5' to '19.5'. This bump records the yearly review that ops flags require.

Nothing else changes.

The flag controls Gitlab::Ci::Pipeline::Logger. The logger writes one structured line to application_json.log for each pipeline creation, but only when one of these thresholds is crossed:

  • Any measured step takes 3 seconds or more.
  • Pipeline creation takes 20 seconds or more.
  • The pipeline has 2000 or more jobs.
  • The pipeline has 500 or more pipeline variables.
  • A pipeline variable value is 200 KiB or larger.

!253383 (merged) added the pipeline variable thresholds.

When the flag is on, the logger also times chain steps and counts the database queries around them. Tag scanning runs only when a line is written. For pipeline variables, only counts and byte sizes are logged. Variable keys and values are never logged.

The flag has been fully enabled on GitLab.com since December 2021, so this MR changes nothing there. GitLab Dedicated does not support feature flags, so Dedicated never produces these logs today. With the flag on by default, Dedicated gets the same pipeline creation logs as GitLab.com for triage. GitLab Self-Managed instances also start writing these lines.

Specs already cover both flag states in spec/lib/gitlab/ci/pipeline/logger_spec.rb and spec/services/ci/create_pipeline_service/logger_spec.rb. No spec changes are needed.

References

Screenshots or screen recordings

Not applicable. There is no UI change.

How to set up and validate locally

  1. Make sure the flag has no stored override. For example, run Feature.remove(:ci_pipeline_creation_logger) in a Rails console.
  2. Create a pipeline that crosses a threshold. For example, pass 500 or more pipeline variables through the API, or trigger a slow pipeline creation.
  3. Check log/application_json.log for an entry with "class":"Gitlab::Ci::Pipeline::Logger".

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Oleg Yakovenko

Merge request reports

Loading
Loading