Skip to content

Add missing `prometheus_metrics_measure` feature flag definition files [RUN ALL RSPEC] [RUN AS-IF-FOSS]

What does this MR do?

There is a bunch of feature flags prometheus_metrics_measure_*_cpu_duration discovered which do not have definition files.

Related to #326201 (closed)

Setup & Testing

Install and enable Prometheus for your GitLab instance (e.g. GDK).

Feature.enable(:prometheus_metrics_measure_banzai_cacheless_render_cpu_duration)

Visit any page which makes use of banzai rendering e.g. http://127.0.0.1:3000/gitlab-org/gitlab-test/-/environments/1

Verify via

curl http://127.0.0.1:3000/-/metrics | grep gitlab_banzai_cacheless_render_cpu_duration_seconds

# HELP gitlab_banzai_cacheless_render_cpu_duration_seconds Multiprocess metric
# TYPE gitlab_banzai_cacheless_render_cpu_duration_seconds histogram
gitlab_banzai_cacheless_render_cpu_duration_seconds_bucket{controller="Projects::EnvironmentsController",action="show",feature_category="continuous_delivery",le="+Inf"} 10
gitlab_banzai_cacheless_render_cpu_duration_seconds_bucket{controller="Projects::EnvironmentsController",action="show",feature_category="continuous_delivery",le="0.001"} 0
gitlab_banzai_cacheless_render_cpu_duration_seconds_bucket{controller="Projects::EnvironmentsController",action="show",feature_category="continuous_delivery",le="0.01"} 9
gitlab_banzai_cacheless_render_cpu_duration_seconds_bucket{controller="Projects::EnvironmentsController",action="show",feature_category="continuous_delivery",le="0.1"} 9
gitlab_banzai_cacheless_render_cpu_duration_seconds_bucket{controller="Projects::EnvironmentsController",action="show",feature_category="continuous_delivery",le="1"} 10
gitlab_banzai_cacheless_render_cpu_duration_seconds_count{controller="Projects::EnvironmentsController",action="show",feature_category="continuous_delivery"} 10
gitlab_banzai_cacheless_render_cpu_duration_seconds_sum{controller="Projects::EnvironmentsController",action="show",feature_category="continuous_delivery"} 0.15487444599999911

Screenshots (strongly suggested)

Prometheus Graphs
Screenshot_from_2021-03-29_13-55-53

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Peter Leitzen

Merge request reports